Archaeological Research Facility at UC Berkeley
Cartography with GPS-derived Field Data in Arcmap 9.3.1
Friday Dec 4, 2009
Data used in workshop (same datasets as used in previous workshops on this website):
Note: These are not real data! These data files are based on real survey data from South America, but they've been relocated to false positions to an area where everyone is familiar with the geography and scale: the South-east corner of the UC Berkeley campus. The following exercise uses a table from Lithics lab analysis but the table from Ceramics analysis can be substituted.
I. Starting with Tabular data in Excel
Examining these in Excel
- Open, view the tables
- Look at field names in Excel, note that the column header (fieldnames) are simple text (ASCII, 8 char max)
- If necessary, export out as CSV (choose first CSV in Save As... File Format list)
- Close Excel
II. Bringing GPS point data into Arcmap
ArcMap is where most of the data exploration, analysis, and mapping occurs in the ArcGIS suite.
- Open ArcMap by double-clicking on Campus_UTM.mxd (map document).
A. View UC Berkeley data
- Zoom and pan to ARF area using Arcmap zoom and pan tools.
For your information, I got the underlying imagery and DEM data from the USGS Seamless Server.
B. Add Bing Maps background layer
- Click on this link (it will open in a new window)
- Click on the link that reads
Bing Maps group layer with all three services (LYR)
that file will download a .LYR file to your hard drive.
- Navigate to the same directory as the Cal_UTM project and save it there.
- Click the Add Data tool and add that Lyr layer.
An LYR file is an ArcGIS file that contains symbology (defining its appearance in Arcmap) as well as a link to data sets that are either stored locally, on the local network, or on the internet. In this case, we are adding a layer referencing imagery hosted by the Microsoft Bing Maps (formerly Virtual Earth) servers.
Note: You will get a Coordinate System warning when you add this layer.
Normally these warnings are very important and you should not ignore them. In this case, however, we are going to ignore it (click the Close button).
The issue is that we are in the NAD1983 datum appropriate to North America whereas Bing Maps, being a global dataset, is in the WGS1984 datum for worldwide data. These two mapping datums were essentially the same 25 years ago when they were created, but they have drifted gradually apart, and now they differ by perhaps 1m. For our purposes today, this can be ignored.
- Click on the layer called "Bing Maps - Aerial with Labels" and drag it down so that it falls just under "cal_SE_30cm.tif".
- Uncheck the "cal_SE_30cm.tif" layer to turn it off -- look at how the imagery changes, recheck it and see that you can compare these two layers (the flicker test).
- Zoom waaaay in by drawing a very small box with the Zoom + tool and do a flicker test to compare the two layers.
Do they align well? You can use the ruler tool to determine their offset.
Note that the Bing layer appears to have some blurring - perhaps from compression algorithms.
D. Add Locs.csv file to map document
- why doesn’t it show in the Display tab, only in the Sources tab?
Answer: because only spatially referenced data appears in the Display tab.
E. Right click on Locs.csv and choose Add XY Data…
- Add East and North
Do you think Eastings belong as the X coordinate or the Y coordinate?
- choose a Coordinate System (use Projected, NAD83, UTM Zone 10 North).
F. These data become Events, which are spatial but they are not Shapefiles (you're almost there...)
They must be saved out to Shapefiles.
- Right click Locs_event > Data... > Export Data > Shapefile...
- Add the Shapefile to your map.
- Change the color of the dots by right-clicking the Layer Locs, going to Properties, and then choosing the Symbology tab. Click the dot under Symbol to change it.
- Choose a bright color that stands out against the imagery. You can choose a pre-defined symbol from the palette, but note that they're quite large. Choose a simple one that you like, but be sure to reduce the symbol size to 5.
GPS software frequently allows you to export directly to Shapefile so this may not be an issue.
If you map lines and polygons, you will probably need to be able to convert directly to Shapefile from the GPS software. However, it's possible to bring in polygons and polylines just using GPS points where the points are converted to become vertices in a larger geographical object.
III. Symbolizing data from the Attribute Table
All records in a Shapefile also appear in the Attribute Table for that Shapefile. In this exercise we will only briefly explore the Attribute Table but note that there are many important aspects to data management in archaeology that involve Attribute Tables (for example, handling One to Many relates). These were covered in more detail in my Spring 2008 ARF GIS Workshop, and that workshop uses these same practice data.
Here, the focus is on map production so we will not do much data manipulation.
A. Visit tabular data behind the map display.
- Right click on the layer name (Locs) and choose "Open Attribute Table".
Note that the LocID field is a unique identifier for each point, while the Descrip field contains nominal classes A, B, or C. Think of these as values that you might log in the field with your GPS.
The goal here is to make a map that displays those Descrip field classes in a useful way.
B. The simplest mapping: For display purposes, let's highlight all the "B" values
It's easy to select contiguous rows in the table and they appear highlighted in the map view. But how to get all the B values to be grouped together?
Currently it's sorted by LocID number.
- right click the field label Descrip and choose Sort Ascending.
- scroll down the list until you see the first B value
- click in the left-most column (a blank column) to select a row and hold the mouse button down and move down the list
- stop when you get to the end of the Bs.
Note that you can add and remove from your selection by holding down the "Control" key.
Move the Attribute table window out of the way and note that you can immediately see where the "B" classes are.
[As an aside, there are other ways to select by an Attribute, such as in the Options... menu at the bottom of the Attribute Table choose "Select by Attribute".]
- Unselect to revert back to the original state by going to the Selection Menu and choosing "Clear Selected Features"
C. Mapping symbology to Classes
The three classes in the Descrip column can be assigned specific symbols to make mapping clearer.
- Right-click the Locs layer and choose Properties...
- Choose the Symbology tab and select Categories from the left side list
- Under Value Field choose Descrip
- At the bottom of the window click "Add All Values".
Note the colors automatically chosen - are they distinct enough? You can uncheck the <all other values> row.
- Double-click the colored dots and choose different symbols for them, but make sure to make them small (size 4 or 5) as the default symbols are large.
As an aside: when you have many different values with sub-groupings you can aggregate them and manage them together by Shift-selecting here, then right-clicking and choosing Group. That isn't relevant here with our simple 3 class data.
There is a lot of power in Arcmap's Symbology system, and you can read more about it in the ESRI Online Help - Drawing Features and Symbolizing Categories (opens in new window). There are many ways to symbolize quantitative data as well -- something we don't cover in this Workshop.
D. Labeling points
Here we will label points by a field such as LocID
- Right click the layer Locs, go to Properties, and go to Labels
- Check "Label features in this layer"
- For Label Field choose LocID
- Click Apply (this leaves the window open) and look in the background -- what do you think?
The labels are a bit large and hard to read against the background.
- Click "Symbol...", Click "Properties..." then click the "Mask" tab.
- Select Halo and make it a size of 1.5
- Click OK, OK then Click Apply again.
Play with these settings until you get labels that are readable given the crowded points. Your current zoom level will determine the appropriate size.
VIII. Cartographic output
A final map was produced by going from Data Mode to Layout Mode.
- Turn off the Bing Maps and cal_SE_30cm.tif imagery layers. Background imagery is often distracting so we'll make a map using only topographic data from the ucb_hillshd and ucb_elev layers.
A. Layout Mode
- Click on the Layout button on the bottom-left of the map pane.This small button is important because it allows you to switch between between Arcmap data layout mode and page layout mode.
There is another Arcmap toolbar known as "Layout" that is used for panning and zooming on the page layout. This is an important distinction. The zoom/pan tools you used before will continue to move your overall data set. Experiment with Zoom on the two toolbars to learn how they differ.
Layout Mode is like Print Preview in some ways. You can see the border of your printed page, and you can determine how your map symbology scales to the page. The printed page size and dimensions are defined in File > Print and Page Setup...
- Zoom in so only one area data points is showing and choose the appropriate page direction (Portrait or Landscape) to fit them on a page.
B. Add Legend
- Choose Insert > Legend (only available in Layout mode)
- Use the arrows to move all Legend Items over to the left "Map Layers" except Locs and Buildings
- Leave the defaults for the rest of the legend.
- Under Legend Frame choose Border: 1 px, Background: white (scroll the list down)
- Leave defaults for the rest of the Wizard (next, next)
This legend is "Live" in that it is still connected to your data. If you change a symbol color, the legend will update immediately. This limits your ability to tweak the appearance, however, so often one ends up breaking the Live legend and converting it to graphics.
- Right click the Legend and choose "Convert to Graphics"
- Right click again and choose "Ungroup"
- Click on "Descrip" and press the Backspace key on your keyboard.
- Make other modifications if you wish.
Note that the Right-Click menu has useful tools when multiple objects are selected -- for example, "Align" (use is obvious) and "Order" to reach behind one graphic to reach another.
C. North Arrow and Scale
Cartographers will tell you that this is not a map without a north arrow and scale! It's just a diagram until these features are added to give it bearing and relative size in the real world.
The North Arrow is simple, just choose one you like and drag the corner to resize and position. Note that north arrow design can convey information about whether it refers to magnetic or true north.
The Scale bar often requires more tweaking.
- Choose a Scale bar by appearance. Resize it to the approximate space you have available.
How many divisions can you realistically include? Have it fall on a round number.
For example, if the scale bar goes to 8 units, change it slightly so it goes to 5 or 10.
If it goes to 10, lets adjust the subdivisions so they're appropriate.
- Right click and change Number of Divisions to 2, and number of subdivisions to 0.
- You may change the units from Meters to Km or Feet or Miles.
- Under the Numbers and Marks tab change the Frequency to "Divisions".
If you click Number Format you can adjust the size and spacing of numbers.
The scale bar simply takes some trial and error.
D. Including a grid or graticule
- Right click Layers... > Properties, then click Grid tab. Choose Measured Grid to add UTM grid or Gradicule to add the Lat/Long grid.
- It is often easiest to accept the defaults, see how the grid looks, then go back in and adjust it.
Common tasks include
- Turning the right and left labels to Vertical orientation. I often turn off the Bottom and Left labels because they can interfere with Figure captions in text.
- If you click "Additional Properties" in the Labels tab, then "Number Format" you can get rid of the Zeros after the metric distance (lower the number of decimal places).
- Under Lines you can turn off the grid lines by choosing "Do not show lines or ticks"
E. Output Formats
PDF files are a good way to digitally distribute maps from Arcmap.
- users can zoom in on PDF files, and vector file format and font quality is preserved (unlike JPG, TIFF, PNG).
- output a high resolution PDF (400-600 dpi) to distribute and print.
- output an EPS file to place in a Word Processor for high res output to a Postscript device or PDF. EPS is a good format to use for map figures included in reports (theses) distributed as PDF or for publication.