Introduction to ArcGIS
General resources at MIT are available at http://libraries.mit.edu/gis. For help, contact Daniel Sheehan at email@example.com.
This tutorial is intended to introduce you to the basic use of ArcGIS 8.2. ArcGIS is a large program with many extensions and many uses. We will concentrate on ArcMAP and ArcCatalog. In this workshop, you will learn how to:
ArcMAP is the desktop interface for ArcGIS. Look for ArcGIS in the Start menu then look for ArcMAP. You will be prompted on whether or not you want to open a new project or an existing one. You should open a new project.
What does the ArcGIS interface looks like?
It looks like this, more or less:
This is approximately what ArcGIS might look like. All of the controls are dockable. That is, the tools panel, which has the pan and zoom tools, is free floating. You can anchor it to the top bar of the window, if you wish, which makes it easier to find. My version is what I have modified slightly from the base that you will see when you start ArcMAP.
What's on the interface, besides the pan and zoom tools? Some drawing tools (see the bottom of the window), some menus which give you access to customizing tools among other things, and some map management tools. We will use many of these in the course of this tutorial.
The first button you need to know about
There are actually two buttons you need to know about but the first leads to the second. Look for the button that looks like this:
Use this button to add layers to your map. Click on it and you see a dialog like this one:
This is the tool you use to add data. An important button on this dialog is this:
This is the Connect To Folder button. When you first start, the only folder you can see is your C:\ drive. In this tutorial, and at other times, you will be using data not in the C:\ drive. You will need to connect to that folder before accessing data. Use this button to connect to the folder (drive) where tutorial data is stored. Follow the directions handed out in class for attaching and navigating to the Athena directory with the data you will use. If you are not using this in a workshop, please download this data and refer to the folder where you store it. You will need to import the DEM. Please follow the instructions in the README.txt file.
There are four types of data that you will be using:
There are examples of each in this directory/folder. Attach each of the following files in this order (the data types and description follow the name in parentheses):
Notice that the first layer establishes the map extent - where the map boundaries are. The counties layer has a much larger spatial extent that the DEM, which covers parts of only two towns, Ashfield and Buckland. All of the layers of the map are literally overlaid on the first layer, the DEM. Here is what your ArcMAP may look like:
Notice that layers that are added are automatically visible. The names of the layers are different than what you should see in the exercise.
You can also open ArcCatalog, which is also available from the Start menu (then through the ArcGIS 8.2 menu) or from the Tools menu in ArcMAP. Try delete all of the layers (right click on the layer name and then click on Remove. Now click on the layers you want to add (using the shift and control keys where appropriate) and drag the files over to the ArcGIS table of contents.
Symbolizing Raster Data
The basic way that a DEM is displayed is as a gray scale image with the lowest values black and the highest values white. This can be useful but there will be times when you want to see a different representation of your data.
Start by turning all of the layers except the DEM. You do this by clicking on the checkbox beside each layer name.
Right click on dem in the table of contents. This brings up a menu of choices that pertain to the dem layer. Choose Properties from the bottom of the menu. This Layers Property Dialog. The default setting for grid data is Stretched. Changes this Classified. Much of the rest of the entire dialog will change so it looks like this:
Change the Classes to 20 and change the color ramp to something you like without repeating colors. Then click OK. Is this easier to see the elevation differences?
One thing we didn't do was alter the Classification scheme, which, by default is Jenk's Natural Breaks. Click on Classify to change this. There are several available. Look at Quantiles, Equal Intervals, and others to see how they categorize data differently. It is very easy to lie with maps and one way of lying is by having an inappropriate classification for your data. Be careful!
Now that you've modified the way you represented the DEM, you can save this so that you will see the same representation when you open the data in the future. You do this by saving the layer. This is different than the data, which is owned by another user. You are merely saving the way it is displayed in ArcMAP.
Start by right clicking on dem in the table of contents then clicking then Save As Layer File. You will be prompted for a filename and location for saving this. In the future you would open up the layer file that you saved rather than the original data file. You can still open up the original DEM but it will be displayed as it was when you first opened it.
Working with DEMS - Creating hillshading and Contour Lines
One benefit of DEMs is that you can do fast and varied processing on them. We will try two: creating hillshading and contour lines. Adding hillshading to the display of a DEM gives the illusion of a more realistic landscape and makes the display easier to read. Contours are lines of equal elevation and are the basis of modern topographic maps.
For both of these you will need the Spatial Analyst Extension and Toolbar. Add these by clicking on the Tools menu then on Extensions. This brings up the Extensions dialog. Click on Spatial Analyst and close the dialog. Now click on Tools then on Customize. This brings up the Customize dialog. On the Toolbars tab, click on Spatial Analyst then close the dialog. Now you will have a new tool bar, which should look like this:
Set the Layer to dem using the drop down menu. Click on the Spatial Analyst menu and then click on Surface Analysis then click on Hillshading. You will see the Hillshading dialog. Keep the defaults, except the input surface, which should be dem. The rest of the defaults determine the angle and height of the lightsource (which gives the illusion of "hillshading") and the cellsize, which should correspond to the DEM cellsize, which 30 meters. The file that the hillshading is written to is by default a temporary file, which should not be changed for this exercise.
This is what you should see:
Now move this to below the DEM in the table of contents by clicking on it and dragging it. Now make the DEM transparent. Right click on dem in the table of contents and click on Properties. Change to the Display tab and change the value of Transparent to 30 percent. Now you should see this:
Adding Contour lines
Contour lines are also available by clicking on the Spatial Analyst menu and then clicking on Surface Analysis. Click on Contour. On the Contour dialog, keep all of the defaults. The default contour interval is determined from the data and is usually a good choice. Click OK and look at the contours. You will notice that at screen resolution it looks crowded. Printing on an 8.5 by 11 inch paper might be less so. What the best contour interval is depends on use of the map and the data as well as the display size.
Once you are complete, make the DEM, hillshading, and contour layers invisible by clicking their checkboxes in the table of contents.
Working With Vector Data - Joins and Normalization
In this part of the exercise you will be joining a table with the spatial data and then mapping based on the data in the table.
Click on the checkbox next to counties to make it visible. Then right click on counties then click on Zoom to Layer to see the full extent of the data.
You will need to add another element to your map, Masscty.dbf. This dbf (database file) contains population data for each of the Massachusetts Counties for the past 20 century. There is no population data in the attribute table attached to the spatial data so you will need to join the table to the spatial data in order to make a map of populations.
First look at the counties attribute table by right clicking on counties in the table of contents then clicking on Open Attribute Table. Notice which fields are included. There are many more than 13 polygons (13 is the number of counties in the state) but there is a single area for the total area of each county that is included for each polygon. Close the attribute table.
Join the table to the layer by right clicking on counties in the table of contents then click on Joins and Relates then click on Join. In the drop down list under What do you want to join to this layer?, change Join data from another layer based on spatial location to Join attributes from a table. You will see this dialog:
Change the fields to match those above. The FIPS_ID in the layer attribute table and FIPS in the data table are the same. It is the Federal Information Process Standard codes for counties. There is a one to one relate from the layer to the table. Click on OK. Once this dialog disappears, look at the attribute table again and note the new columns.
Now map with this new data. When you added the layer, it was given a random color. Now you can change this color to something meaningful. Open the Properties Dialog by right clicking on counties in the table of contents then clicking on properties, which brings up the properties dialog. Change to the Symbology tab. The dialog should look like this:
In the Show list, Change Features -> Single Symbol to Categories -> Graduated Color. In the Fields section, change the Value to MASSCTY.P1990 and click OK.
Look at the map and notice that Worcester, Norfolk, Middlesex and Essex Counties in eastern Massachusetts are the same symbol as Suffolk County (Boston). It appears that the population density is the same, while it is very different because. In fact, Boston is much less populated than Middlesex County and the roughly the same population as the other counties in the same category but is a much smaller area. What might be a more realistic version is having the data normalized by area. This would show population density, which would distinguish Suffolk from Middlesex County and from Worcester County, which has an even lower population density.
Bring up the Properties dialog again (by right clicking on counties in the table of contents then clicking on properties) and click on the Symbology tab. In the Fields section, change None to COUNTIES.AREA_ACRES then click OK. This changes the variable from Population to Population Per Acre. Does this make a difference in how the map appears?
Make the Counties layer invisible by clicking the checkbox next to its name in the table of contents.
Working With Vector Data - Labeling
In this part of the exercise you will be labeling a road network, which is line data (vector format). You can label any layer with any attribute that appears in the layer's feature attribute table.
Click on the checkbox next to roads to make it visible. Then right click on roads then click on Zoom to Layer to see the full extent of the data. This is the road network for Ashfield, MA.
Labeling in ArcMAP is quite easy and flexible. Open the Properties dialog as you have down for other layers. Click on the Layers tab. Your dialog should look like this:
Click the Label features in this layer checkbox. Leave the Method as it is. Click on Label Field and change to Street. This list is in alphabetical order, not the order that appears in the feature attribute table. Click on Symbol to change the size and color of the text. You should see this dialog:
You can change the color of the text as well as its size here. If you want a text size smaller than 8, simply type it in. There are a variety of text styles, which you can experiment with later. Click on OK to complete.
Click on Label Placement Options to open this dialog:
Following the examples in the image but also experiment to see how this works. Click on OK to complete.
Click on OK to complete the labeling.
The labels are a fixed size. As you zoom in, your text label size will remain constant. In some cases, there isn't room for all text labels and all are not drawn. You can see in the Roads example that more labels appear as you zoom in.
Vector Geoprocessing - Selecting by Attributes and Creating buffers around features
Buffers are zones of specified distance from a given feature and are useful in proximity analysis. In this example, we will find a 30 meter buffer around a section of Creamery Brook, nearly in the center of the map.
Selecting by attributes
You can select any feature by using the Selection tool, which is the depressed tool:
and clicking on the screen. This is useful but at times you will want to be sure that you have selected all of the features that you need. In that case, you will use the Selection by attribute dialog, which you can open clicking on the Selection menu then clicking on Select By Attributes. It looks like this:
Selections are made using SQL. Notice the SELECT * FROM roads WHERE: statement. You will be completing this statement and must follow the syntax of an SQL statement exactly. Rather than typing the examples, you should click on FIELDS "=", etc, and UNIQUE VALUES rather than typing them in manually. If you don't see all of the values, click on Complete List to see all of the values.
Set your dialog to match the on in the example above.
Buffers require defined map units, which you haven't done yet. Click on the View menu the on Data Frame Properties. Click on the General tab. Change the Map Units to meters as shown:
ArcMAP has a buffer wizard to help you through the process. Open this wizard by clicking on the Tools Menu then on Buffer Wizard. You should see this dialog:
Change the defaults to match these. Notice that the Buffer Wizard recognizes that there is a selected set for the Roads layer. This is what you want to use. Click on next to see this dialog:
Change the distance to 30 and click on next to see this dialog:
Retain the defaults that you see. The center section is grayed out since you are working on a line layer and this section is for polygons. Write this file to the $TEMP folder. Click on Finish to complete the buffer.
Zoom in to look at the buffer and Creamery Road. Is the Creamery Road within 30 meters of the road, except when the stream crosses the road?
Make the buffer layer invisible by clicking the checkbox next to its name in the table of contents. Keep the road layer visible.
Spatial joins are similar to the join we used to match the FIPS code in the Counties layer to the MASSCTY.dbf table except that the join is by location rather than matching of attributes. In general, a spatial join is a point in polygon search. In our example, we will find out which Roads (lines) the Vernal Pools (points) are closest to. We will create a new layer which will be a point layer but will have the attribute of both the points and the lines layers and will have the distance that each point is from the nearest line.
To start the process, right click on vernalpools in the table of contents and then click on Joins and Relates then click on Joins. Your dialog will look something like this.
Change the What do you want to join to this layer? field to Join data from another layer based on spatial location. Change the selection in the second section to Each point will be given the all of attribute of the line that is closest to it ... . Change the output folder in section 3 to $TEMP with the same layer name. Click on OK.
Look at the attribute table of the output layer. Notice that you have the street information as well as the point information. Distance is the last attribute in the table. Select one of the points graphically then find it in the attribute table. Use the distance tool to check the distance in the table. Is it accurate?
Make the points and buffer layer invisible.