Geography 387 Lab Home | Geography 387 Home | Geography Home

Lab 8: Vector Spatial Analysis


Outline

  1. Purpose
  2. Download data
  3. Selecting nearby features
  4. Selecting features within
  5. Buffering features
  6. Overlaying layers
  7. Conclusion
  8. To turn in

1.0 Purpose

This lab will introduce vector spatial analysis functions found in ArcMap. In particular, we will learn about selecting based on location, buffers and overlay. We will use a variety of scenarios and datasets to illustrate these concepts.

2.0 Download data

Before we begin, download the lab8.zip data archive onto your local or network drive. Unzip the archive. You should have a lab8 folder with 4 sub-folders, one for each part of this lab.

3.0 Selecting nearby features

When you analyze the relationships between map features, you might need to know which features are within a certain distance of other features (proximity) or share the same boundary (adjacency).

The Scenario: Suppose you are interested in buying a gas station near Interstate 40 in Old Town , New Mexico. One of your requirements is that it must be within 1,000 feet of the interstate so you can attract as many drivers as possible.

Start ArcMap and open the map document lab8_part1.mxd in the lab8_part1 folder. When the map document opens, you will see a gas stations layer, a streets layer, a business layer, and a zoning layer. These are all shapefiles. The stations layer is active and the I-40 freeway is selected (shown in light blue, also called cyan). You will use this feature to select gas stations within 1,000 feet.

Lab 8 part 1

Go to the Selection menu, and scroll to Select by Location. The select by location lets you do simple GIS selection analysis. Keep in mind that the window provides a multitude of criteria that form a single “selection sentence.” I will provide you with the criteria for now, but later, you will have to try some of these criteria on your own. Enter the criteria as shown on the screen below:

Select by location

This tool will select features from gas stations that are within a distance of 1,000 feet of the selected streets. Read the critieria from top to bottom so that you understand the logic in this spatial query.

Click OK when all your criteria are entered. Close the Select by Location window.

Question 1 :

a. How many gas stations were selected? Hint: Gas stations are point features and the selected set is in light blue (cyan).

b. What are the names of the selected gas stations? Hint: use the identify tool identify tool or look in the attribute table .

Unfortunately, neither of these two gas stations is for sale. You would like to make a tempting offer, but first you must know the market potential for each station. Because you want to sell gasoline to business customers and employees as well as freeway travelers on I-40, you decide to find out which gas station is closer to more businesses.

Go to the Selection menu, and scroll to Select by Location. Enter the selection criteria as shown on the screen below:

Select by location

You want to select features from businesses that are within a distance of 1,320 feet (1/4 mile) from the selected features of gas stations. Notice that the check box next to "Use selected features" is checked, indicating that we are only going to consider the distance from selected gas stations (STATIONS). It tells you how many features are selected, although I blurred this out in the screen shot above. Also understand that I arbitrarily chose 1/4 of a mile as a buffer distance, but you could have put at 1 mile, 1 km, etc by changing the buffer distance parameters.

Click OK when all your criteria are entered as above.

To see which business were selected and examine their attributes, open the Attribute Table for businesses. Notice that many of the business have the same address, indicating that they are located in a shopping center. Also note that your selected gas station points (from Question #1) also show up in the business selection. This is because the gas station layer was originally created by selecting gas stations from the business layer. For the question below, count the number of business points for each gas station by using the identify tool identify tool. When you click on a highlighted point with this tool, you will see in the results all of the businesses at that location.

Question 2 :

a. Based on this selection of businesses, which of gas stations you identified in Question #1 do you think would service more customers?

b. How many businesses are there around this gas station within 1/4 of a mile?

ArcMap can also find features adjacent to selected features. To see how this works, consider a situation involving parcels of land.

The Scenario: Suppose that Old Town is planning major improvements to its drainage system. Municipal planners need answers to these questions: 1) which parcels are part of or adjacent to drainage ditches? 2) how many of these parcels are in the city’s jurisdiction and how many in the county’s jurisdiction? 3) what is the total acreage of parcels by jurisdiction?

Turn off all the layers in the table of contents (TOC) and turn on the Zoning layer. Notice that drainage ditch polygons are already selected for you (cyan color). First, we’ll find out which parcels are adjacent to drainage ditches.

Select by location 3

You want to select features from the zoning layer that touch the boundaries of the selected features in the zoning layer (i.e., drainage ditiches).

Click OK when all your criteria are entered. To see which parcels were selected, open the Attribute Table for the zoning layer.

Question 3 :

How many parcels will be affected by the drainage ditch improvement project?

Now we need to determine the total acreage of these selected parcels by jurisdiction. In the Attributes of Zoning table, right click on the Jurisdiction field (it is called JURIDICTI) and navigate to Summarize. Enter the options exactly as you see them below. Be sure to select the check box to summarize the selected set.

Summarize juridiction

Click OK when all your criteria are entered. Click Yes to add the table to the map document.

Question 4 :

a. How many city acres will be affected by the improvement project?

b. How many county acres will be affected by the improvement project?

Congratulations on your spatial analysis -- now Old Town will know how much city and county land the new drainage improvement program will affect.

4.0 Selecting features within

The Select By Location tool also allows us to select features that fall completely within a polygon. Conversely, you can find polygons in one layer that contain particular points, lines, or polygons in another layer. This type of spatial relationship, features inside other features, is known as containment. Finding out where a feature is inside or outside a boundary can be crucial to making decisions.

The Scenario: Your company is transferring you to the Atlanta region, and you would like to purchase a home after you get there. Before you call a real estate agent long distance, you’d like to become familiar with the region yourself, and possibly even identify some areas you might like to live in. You are primarily interested in areas where population is low compared to the rest of the region, and more importantly, areas where your thirteen year-old daughter can attend middle school close to home.

Open the map document lab8_part2.mxd in the lab8_part2 folder. We are done with lab8_part1.mxd, so you can save changes if you want (optional). When the lab8_part2.mxd opens, you will see middle schools, census tracts, and counties layers.

Lab 8 Part 2

First, we will find areas that have a low population density. We will search for areas that have population with less than the mean population. We will use 1990 population attribute data in the census tracts layer to do this analysis. Open the attribute table for census tracts and calculate the statistics for 1990 population. Note the mean population value. Now go to the Selection menu, and navigate to Select by Attribute. Remember this tool? You may have only used this tool from the attribute table of a layer, but it is also available from the Selection menu. Enter the appropriate selection based on the criteria stated above, applied to the census tract layer (i.e., find census tract polygons with a 1990 population less than the mean population). Click Apply when you are done and close this screen to view your selection.

By looking at the map view, you can see that some of the highlighted census tracts have middle schools. You want to find census tracts that have low population and middle schools. Since the census tracts and middle schools are in separate layers, we need to use a layer-on-layer selection to find census tracts that meet both of your criteria.

select4

Go to the Selection menu, and scroll to Select by Location. Enter the criteria as follows:

Select by location 5

You are selecting features from the currently selected features in census tract layer that complete contain the features of middle schools. Read through the criteria from top to bottom to make sure understand the selection statement. Click Apply when you are done and close this screen to view your selection. You should see census tracts that meet both your criteria -- low population and contain a middle school (see below).

Select by location map output

The Scenario: Now you have just learned from a future coworker in the Atlanta region that property taxes are lower in Cobb County than in other counties in the region. As a bonus, you also learn that your future boss lives there, too! You now need to find out which census tracts fall within the Cobb County to help narrow your search for a home.

Turn off the middle schools and census tract layers in the TOC. Open the attributes table for counties and select Cobb County. Hint: you can build a query or just click the row in the attribute table that has Cobb County. Notice that the Cobb County polygon is selected in the map (cyan color).

Now turn on all the layers in the TOC again. Go to the Selection menu, and navigate to Select by Location. Enter the selection criteria as follows:

Select by location 7

This tells ArcMap to select from the currently selected features in census tracts only those polygons that are completely within the selected features of counties (Cobb county). Click OK when you are done.

Question 5 :

How many census tracts were in your final result?

What is the mean per capita income for your selected set?

5.0 Buffering features

Buffering and overlay are two of the most common operations in cartographic modeling. A buffer zone is an area that is within a given distance from a map feature. Points, lines, or polygons can be buffered. Buffers are used to identify areas surrounding geographic features. For example, you may wish to keep septic systems over 100 meters away from streams, locate housing within a quarter mile of existing roads, keep hiking trails away from seasonally flooded rivers, or make sure most of your city is within some maximum distance from a fire station or school. When you buffer on a set of features, the output is a set of polygons (buffering points or lines creates a new layer that contains polygon geometry). These polygons define an inside region, an area less than the specified buffer distance from the features of interest (e.g., less than 300 meters from a stream), and an outside region, an area more than the specified buffer distance from the features of interest. The figure below shows streams buffered at 300 meters. Be sure that you understand what areas are inside of the buffer zone and what areas are outside of the buffer zone.

Buffer

 

Sometimes when you buffer a stream network with a large buffer distance, the buffers from different streams intersect and you get enclosed polygons (see figure above). These areas are still more than the specified buffer distance from the stream (they are outside of the buffer zone), but are isolated because you must cross a buffer zone to get to them. Some GIS software identify these areas as being different from areas which are totally outside the requested buffer.

The Scenario: California Proposition 83 was on the November 2006 election ballot. This initiative passed and prohibits sex offenders from living 2,000 feet from schools. However, a federal judge promptly blocked this provision until its consitutionality is resolved. A summary of the proposition is shown below.

Proposition 83

The cities of Cotati and Rohnert Park have contracted you to make a map of pacels that would be off limits to sex offenders under Proposition 83. The map should include a 2,000 foot radius around each school. All selected parcels off-limits to sex offenders should be gray and all other parcels should be white (or hollow).

We will use buffers and Select by Location to make this map. Load the map document lab8_part3.mxd in the lab8_part3 folder. This map document uses feature classes from the cotati_rohnert_park.mdb geodatabase. You do not need to save lab8_part2.mxd.

Part 3

First we will make a 2,000 foot radius buffer around the schools. Open the ArcToolbox window and navigate to Analysis Tools -> Proximity -> Buffer. Select schools as the input feature and choose an appropriate name for the output polygon feature class (store the output in the geodatabase). Enter in 2000 feet for the buffer distance. Select ALL in Dissolve Type to dissolve all the buffers together in to one output feature and remove overlapping features. You can expand the help window with Show Help >> and then click in any parameter window to see what the different options mean. This is particularly helpful when buffering lines and polygons, as there are more options available.

Buffering schools

Click OK to run the buffer tool. Turn on the output school buffer in the TOC.

Buffer output

This give us a circular off-limits zone around schools. We need this for our final map. We now need to select those parcels that are within these zones. We can do this with Select by Location. As with many GIS tasks, there are different options for doing this. One would be to select parcels that "are within a distance of" schools, and set the distance at 2000 feet. See example of this selection below.

Select by location 8

However, there is an equivalent way that will allow you to learn another selection type called intersect. When features share the same geographic space, they overlap, or intersect. ArcMap can find features that intersect, whether they are in the same layer or in different layers. Using layer-on-layer selection, you can find and select features that intersect other features in another layer. Here we can select parcels (polygons) that intersect the schools buffer polygons (2000 radius polygons around schools). The results are the same as using the "within distance of" method shown above.

Select by location 9

Click OK.

Select10

Notice that some parcels go beyond the bounds of the off-limits buffer zones. This is because only a portion of any given parcel must intersect the buffer zone for it to be selected. We can select only those parcels that are completely within the buffer zones by modifying the query once again. This time we will use the "are completely within" option. Do this and then click OK. Note: On an older computer, this selection process may take several minutes to run.

Select by location 11

Your selected parcels should look like this:

Select12

Notice that only parcels completely within the buffer zones are now selected. Let's export this selected set of parcels to a new feature class. Right-click on parcels, and navigate to Data->Export Data. Save your output parcels the cotati_rohnert_park personal geodatabase in the lab8_part3 folder. You may have to select the personal and file geodatabase feature class type to see the personal geodatabase as an option.

You can now clear the selected parcels. Do this by going to Selection, then Clear Selected Features.

Map 1
Make a map of parcels off-limits to sex offenders for the cities of Cotati and Rohnert Park. The map should be in gray-scale colors for printing in the Press Democrat. Include a 2,000-foot radius circle around each school (hint: make the fill transparent). All selected parcels off-limits to sex offenders should be dark gray and all other parcels be light gray. Include a scalebar, title, name, legend, etc. Export the map to a PDF file with 150 dpi.

6.0 Overlaying layers

Overlays are another common analytical operation. They are the primary way in which information from two separate layers may be brought together in an analysis. Overlays are most common for polygon data. A geometric intersection of 2 polygon layers results in a new layer with the combined attributes of both input layers. For example, suppose we wish to identify all the areas in a given county that are also forested. We might have a counties layer and a forest layer, both with polygons. If we overlay these two layers, we will have a single output layer that has both county and forest cover information. By selecting only those polygons that are both in a desired county and that are forested, we will identify the forested portion of the desired county.

The Scenario: This final lab exercise will use roads and water layers to find potential campgrounds sites for the Desoto National forest. The campground will have ‘drive in’ sites -- which must be within a buffer zone around roads. The final map will show locations that are both within 150 m of a lake and 500 m of a river plus those locations within 300 meters of a road.

Open a new map document in ArcMap. Load the roads line shapefile and the water polygon shapefile from the lab8_part4 folder. Use the buffer tool to make a 300 meter buffer around the roads. For buffer parameters, use Side Type "FULL", End Type "ROUND" and Dissolve Type "ALL". Remember, you can use the help window and click in the parameter windows to learn more about these options. Give your output roads buffer an appropriate name.

road buffer

Open the water layer's attribute table. Note that there is a column called Buff_Dist that has 150 coded for Lake polygons and 500 coded for the River polygon. We will use this field to produce a variable-distance buffer. Again go to the buffer tool and select water for the input feature. This time chose the Field option instead of a fixed distance. For the field, chose Buff_Dist. This will make the buffer distance around each water polygon to be defined by the value in the Buff_Dist field.

Variable distance buffer

Click OK to run the buffer. Notice that the lakes and rivers have different buffer sizes.

Water buffer

We are now going to overlay the variable-distance water buffer and the fixed-distance roads buffer. To overlay them, we need to do a few things.

When overlaying layers you must set up the two files in a manner that allows the results to show from which input layer a particular feature originated. To do this, add a field to the water buffer layer, call it insd_wbuf, and calculate a value of 1 for all the buffer areas (you should know how to do this by now without step-by-step instructions). Do the same for the road buffer layer. Add a new attribute called insd_rbuf and assign it a value of 1 to indicate it is inside the road buffer.

You may ask why we don’t assign the outside a value, too? We are trying to find areas away from the water. Right now, there are no features outside our water or road buffers. We can’t assign values without an underlying feature.

The Overlay toolset in ArcTools contains tools to overlay multiple feature classes. Options are to combine, erase, modify, or update spatial features in a new feature class. New information is created when overlaying one set of features with another. There are six types of overlay operations; all involve joining two existing feature classes into a single feature class, allowing us to identify spatial relationships between the input features. The following table lists the tools available in the Overlay toolset and provides a brief description of each.

Tool

Description

Erase

This tool creates a feature class from those features or portions of features outside the erase feature class.

Identity

This tool combines the portions of features that overlap the identity features to create a new feature class.

image2

Intersect

This tool builds a new feature class from the intersecting features common in both feature classes.

image3

Symmetrical Difference

This tool creates a feature class from those features or portions of features that are not common to any of the other inputs.

image4

Union

This tool builds a new feature class by combining the features and attributes of each feature class.

image5

Update

This tool updates the attributes and geometry of an input feature class or layer by the Update feature class or layer that they overlap.

The final step of this section is to overlay our two buffer layers. Go to the ArcToolbox again and navigate to Analysis Tools -> Overlay -> Union. Enter the following criteria, and remember that you can drag and drop layers into the Features list from the TOC.


Union tool

Click OK. Display the “unioned” layer and open its attribute table. Your output should look similar to the screen shot below.

Union output

Question 6 :

How many records are there in the Union layer? Why do you think you have more records than in your input buffer layers?

Use Select by Attributes to find those areas that are BOTH within the roads buffer and the water buffer (hint: insd_wbuf=1 AND insd_rbuf = 1). Export your selected polygons to a new layer, called acceptable_sites.

Map 2
Create a map of the acceptable camping sites (acceptable_sites). Include roads and water features, but not their buffer layers. Include a scalebar, title, name, legend, etc. If you want a background shade of the study area extent, you can add the study.shp file in the lab8_part4 folder. Export the map to a PDF file with 150 dpi.

7.0 Conclusions

You now have first-hand experience with the basic tools that you need for vector spatial analysis. I have not shown you all the tools available. For example, the overlay tools intersect, identity, update were not covered. It is up to you to explore these tools and their many parameters. The datasets from this and previous labs are relativley small and make great layers for experimenting with the outputs from various analytical tools. Always remember to use the ArcGIS help to get a more detailed explanation. Have fun exploring!

8.0 To turn in

  • The question sheet, with typed answers (Word document)
  • Map 1
  • Map 2

Submit electronic files via email to klacefie@sonoma-county.org, with the subject "G387, Lab 8, [your last name]".


This lab was designed by Matthew Clark, Geography and Global Studies Department, Sonoma State University. Data layers and much of the text for Sections 3, 4 and 6 were modified from materials provided by Paul Bolstad (Univ. of Minnesota) and George Raber (Univ. of Southern Mississippi).

This page was last modified on Sep. 3, 2008 by Matthew Clark