ArcGIS Lesson 5: Overlay and Spatial Analysis

[Please Leave Comments and Suggestions for Revisions]

by Jessica DeWitt and Geoff Cunfer


The power of historical GIS is partly its ability to “overlay” or simultaneously display multiple “layers” of spatial information in a dynamic mapping environment. However, beyond displaying spatial information, the software allows us to query and analyze large amounts of data in relation to each other across space and time.

A common visual example of the utility of GIS, layering spatial information.

A common visual example of the utility of GIS, layering spatial information.

This tutorial will guide users through the process of adding multiple forms of data (aerial photographs, parcel-level land use vectors, and county-level agricultural data) to a GIS and conducting spatial analysis on the data those layers contain. We will learn how to manipulate features in layers and create new ones based on their spatial relationships. For instance, we will create buffers at a set distance around features like roads and then query and calculate the forms of land use inside that road-side buffer zone.

Add data

  • Download and save in your Documents\ArcGIS folder (Remember to unzip the folder).

From the AirPhotoImages folder add the following scanned aerial photos (rasters) from Weld County, Colorado:

  • co_weld_mosaic_1930s.jp2
  • co_weld_mosaic_1950s.jp2
  • co_weld_mosaic_1970s.sid
  • co_weld_mosaic_1990s.jp2
  • co_weld_mosaic_2000s.jp2

Your screen should look like this:

1From the Overlay1.gdb geodatabase add the following polygon layers (vectors), digitized from the same images:

  • Weld_1930s
  • Weld_1950s
  • Weld_1970s
  • Weld_1990s
  • Weld_2000s

The air photo and polygon layers will look like this:


Now symbolize the polygon layers so that they have no fill and red outlines.

3 4

From the Overlay1.gdb geodatabase add the following polygon layers (vectors), from the county-level census of agriculture:

  • AgCensus_1935
  • AgCensus_1954
  • AgCensus_1978
  • AgCensus_1992
  • AgCensus_1997

Your screen should look something like this, in the next step you will reorganize the layers:


Explore and organize your data

Turn layers on and off, zoom in and out, and pan around to explore your data. Since these all draw on top of one another, you’ll need to uncheck (deselect) some layers in order to see others. Rearrange the Table of Contents into a logical order, remembering that items at the bottom of the list are drawn first, with those above drawn over top.

6Match up aerial photo-land cover pairs and consider the photo interpretation and digitizing work. For example, turn on co_weld_mosaic_1950s.jp2 with Weld_1950s drawn over top. Evaluate the digitizing job—would you have drawn the geography differently?


Use the Info button 8 to check the land cover classification for a handful of parcels—are they correct?

10Look at the attribute tables for the polygon layers and try to understand the information they contain. Refer to the reference keys.


Tip: Scale is a very important issue in GIS work.  Here we have data at 2 very different ‘scales.  The AgCensus layers come from primary sources that were reported at the county level.  They cover a huge area—more than 1000 counties, but don’t provide much information about individual farms or fields.  We can analyze land use at a relatively coarse level, but for a large area.  The land cover layers come from a primary source—aerial photos—with information at a much finer scale, down to about +/- 3 meters.  From this source we can evaluate land use at a very fine level.  But imagine trying to digitize aerial photos for all portions of the entire 1000+ counties (they exist!).  On this project we adopted a sampling strategy, randomly selecting 8 cells in each of 50 counties.  The result is a GIS database of 400 cells at very fine resolution, but with a lot of blank spaces on the map.  Often the trade-off is coverage detail vs. time and cost.

Select by attribute

A simple initial analysis tool is to simply explore the spatial patterns of your datasets.  Where is cropland?  Where is grassland?  Where is developed land?

Use the Select by Attributes dialog box to explore the spatial patterns of your data. First, turn off all layers except the 1930 photo-land cover pair, with land cover on top.


Click on the Selection menu and then Select by Attributes. This box will appear:


This box helps you create some computer code that tells the software which polygons to select.  Make the following settings:

Layer:  Weld_1930s

Method:  Create a new selection

Then double click on “Land_cover” in the list of attributes.  Note that it appears in the window below.  Click on = and note that it too appears in the window below.

Click the Get Unique Values button.  This shows all of the Land Cover options from the attribute table.  Double click on 21 – Cropland.  At the bottom you now have some computer code that reads:

Select * FROM Weld_1930s WHERE “Land_cover” = 21


Click Apply, and some of the polygons on your map will turn blue to show they are selected.


Explore your maps and get a sense of where there is cropland where there is not.

Use the Select by Attribute dialog box to select other land covers, and then to explore the same variables in other years.  For example, you could, one by one, select developed land in each of the 5 years, then click yearly layers on and off to follow their change through time.

Note, if you make an error in the dialog box code, it is better to clear the form completely and start over.  I’ve found over the years that trying to correct one element rarely works.  The computer is very sensitive to correct syntax in the code, and even one letter’s difference can cause an error message.

Tip: Data exploration of this sort is more an art than a science, but it often raises important research questions, reveals surprizing patterns, and sometimes delivers quick answers to things you’ve been wondering about.  This is typically a very creative process, as your mind wonders about patterns, their causes and consequences, and how they’ve changed over time.  In essence, you are taking a vast amount of raw data that our brains cannot evaluate, and visualizing it in a way that our brains can understand.  After the long effort of creating or digitizing GIS data, the data exploration phase is sometimes the most fun, where you first discover answers to questions you’ve been pursuing for a long time.

Select by location

So far we’ve been selecting polygons based on their attribute values.  We can also select polygons by their location.  In this scenario, we’ll ask the following question:

Which polygons within 10 meters of a road are cropland?

First, we’ll select a subset of road polygons and then export them as a new layer. Use the Select by Attribute dialog box to select all Transportation polygons from the Weld_2000s land cover layer. Then right click on the Weld_2000s name in the Table of Contents and select Data—Export Data. Make sure the following settings are in place:

Export:  Selected features

Use the same coordinate systems as:  this layer’s source data

Output feature class:  Overlay1.gdb


Click OK.  When it asks if you would like to add the exported data to the map as a layer click Yes.  You’ve now created a map layer of only the road polygons, which has been given the default name of Export_Output.  Take a look at it.

17Make sure you have the 2000s aerial photo and the 2000s land cover map turned on, plus the new Export_Output layer. Go to the Selection menu, but this time choose Select by Location. Engage the following settings:

Selection method:  select features from

Target layer:  Weld_2000s

Source layer:  Export_Output

Spatial selection method:  are within a distance of the source layer feature

10 Meters


You are instructing the software to select all polygons from Weld_2000s that are within 10 meters of any of the Transportation polygons in Export_Output.  Click OK and inspect the results.

You’ve now selected polygons of any type that are within 10 meters of a road, but we wanted only the cropland. To narrow down the results, to this time to Selection—Select by Attributes.  Change the Method to Select from current selection.  This will narrow the currently selected features, rather than starting over with all features.  Use the previous procedure to identify polygons where “Land_cover” = 21.


The result is a selection of all polygons that are BOTH cropland and within 10 meters of a road.


Tip: GIS analysis can quickly become complex, and it is important to think through in advance the logical order of each step.  Here we started with a selection of Transportation features, then exported them as a new layer.  Next, we conducted a spatial selection to identify polygons near roads, and then an attribute selection to pull out only cropland polygons.  The order of steps becomes a logic puzzle—be prepared to abort and start over sometimes.  Sometimes GIS people use flow chart diagrams to model the key steps.  For complex analyses, take notes so you can remember what you did if you ever need to repeat it or to explain it in a footnote or appendix.

Overlay analysis

Tip: Overlay analysis allows you to compare both attribute and location information about multiple map layers.  It is one of the most powerful components of GIS.  For historical GIS, overlay allows you to analyze two different historical sources, for example a map of land use created by a government agency with an aerial photo taken at about the same time.  Or, it allows you to analyze change over time by comparing similar sources created a different points in time.  Here we’ll do the latter, comparing digitized aerial photos from the 1930s with those from the 2000s.

ESRI calls the key overlay tools “Geoprocessing,” and you can access them from the Geoprocessing menu:

  • Buffer
  • Clip
  • Intersect
  • Union
  • Merge
  • Dissolve

Go to the Help menu then ArcGIS Desktop Help and type in each term, one by one.  For the first 4 click on the “(Analysis)” link and read the Summary, Illustration, and Usage sections of each.  For the last two, do the same, selecting the “(Data Management)” link.  In each case, think about what happens to the attribute information when these actions are performed.


  • Which land areas have ever been used for cropland?

To answer this question we’ll use the Union function.

From the Geoprocessing menu select Union. Use the Open Folder icon next to Input Features to select, one at a time, all five of the land cover layers. As you add each one it will appear in the list of Features.  Accept the default Output Feature Class name, Weld_1930s_Union and click OK.


Be patient—the GIS is busy cookie-cutting all of your polygons, so this may take a little while. It might not even look like the program is doing anything at first, but eventually a small window will appear at the bottom right of the screen with a green box and a check mark in it. Your new layer will appear in the table of contents.

Inspect the results. It will look like a bit of a mess, with lots of little slivers and tiny polygons.


Try zooming in close to see some of them. Also inspect the attribute table. As you scroll across you’ll see each of the attributes repeated 5 times, once for each layer you input.

Now that we’ve created a single layer with each distinct geographical space that existed in the 5 aerial photos, it is time to select every polygon that was ever cropland. In GIS terms, we want to select every polygon for which the Land Use attribute was 21-Cropland in any one or more of the 5 time points. To do this we’ll use the Select by Attributes dialog box, but with a much more complex selection code than before.

Go to Select by Attributes. Make sure the Layer is set to Weld_1930s_Union and the Method is set to Create a new selection. Clear the code box at the bottom.  Scroll down in the list of attributes, and you’ll see that the Land_cover attribute we are interested in repeats, with a numeric extension.  Because of the input order, the following attributes correspond to the aerial photo years:

  • Land_cover                             1930s
  • Land_cover_1                         1950s
  • Land_cover_12                       1970s
  • Land_cover_12_13                 1990s
  • Land_cover_12_13_14           2000s

Why these strange numbers?  Who knows!

By double clicking on sequential Land_cover = 21 Cropland sequences, with OR between each one, create code syntax as follows:

Select * FROM Weld_1930s_Union WHERE “Land_cover” = 21 OR “Land_cover_1” = 21 OR “Land_cover_12” = 21 OR “Land_cover_12_13” = 21 OR “Land_cover_12_13_14” = 21


If you make a mistake, click Clear and start over.  You have to click Get Unique Values each time.  No, this is not very user friendly.  When you’re done, click OK and cross your fingers.  If all goes well, you will have selected every area (in blue) that was ever plowed between the 1930s and 2000s.


Note:  For this query we use OR because we want each polygon that was cropland at least once.  If we used AND instead, we would select only polygons that were cropland in every one of the 5 years.  Basic Boolean!

Now that you’ve selected all the parcels that were in cropland at least once, you have the answer to our research question: “Which land areas have ever been used for cropland?”

You can now do some simple analysis with this query result, such as summarizing the spatial data for each variable. Open the attribute table for Weld_1930s_Union and note how many rows are selected (blue). The total number of selected features is given in parenthesis at the bottom of the attribute table.

Scroll to the far right, until you see the field titled “Shape_Area”. This is a field generated by the GIS showing the area (in map units) of each parcel in your layer. We want to know the total Shape_Area of all the selected (cropland) parcels.


Right click on the field heading for Shape_Area and click on Statistics.


This produces a summary and frequency distribution for the field Shape_Area. You can change the summary to any other numerical field in the first drop down box.


The “Count” is the number of fields selected (this will be the same as the number in parenthesis at the bottom of the attribute table). The other statistics are the smallest, largest, total, mean, and standard deviation for the selected fields.

The answer to the question “How much land was ever in cropland” in the study area is beside “Sum”.

Tip: If the map units don’t make sense to you you’ll have to convert them. In this case, square meters would likely be better converted to hectares or acres using a separate conversion calculation.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s