Massachusetts Institute of Technology - Department of Urban Studies and Planning
11.520: A Workshop on Geographic Information Systems |
11.188: Urban Planning and Social Science Laboratory |
Lab Exercise 7 In-Class Notes: Vector Spatial Analysis
Overview
In this exercise you will use the spatial analysis
capabilities of ArcGIS to:
- Examine the location patterns of Cambridge stores by using the 'spatial
join' tools to tag store location data (bookstores, ice cream shops,
record stores) with the demographic characteristics of their neighborhood.
(This is a 'point-in-polygon' operation.)
- Create a two-thirds-mile buffer around Ames St.
- Estimate the number of young kids living near Ames Street by:
- Creating a two-thirds-mile buffer aournd Ames St.
- Intersecting this buffer with the Cambridge blockgroup
data
- Apportioning kids in each blockgroup that is split
by the buffer in proportion to the block group area in the buffer
Before starting the lab, I will finish my demonstration from last Wednesday
of the steps needed to determine which block groups are in which towns in the
5-town area around Cambridge.
- Strategy:
- Can't intersect the block group layer with the town boundaries because
of 'sliver' problems at the edges
- Create a 'point' layer of the centroids of all the blockgroups in the
area
- Select blockgroup in and around the 5 towns and save to a new shapefile
- add X,Y fields to the attribute table (as double precision numbers)
- Use this VBA script to enter the centroid X,Y values into the new
fields
Dim dblX As Double
Dim pArea As IArea
Set pArea = [Shape]
dblX = pArea.Centroid.X
- Create a new point shapefile of these X,Y centroid points using
Tools/Add-X-Y-data (after exporting a table containing these X,Y points)
- Use the 'spatial join' tools to tag each centroid with the town that
it is in
- Once you have the centroids saved as a shapefile, it is easy to
highlight those blockgroups that are in the 5 towns.
- Select the 5 towns from matowns00.shp and use the Select-by-location
option to highlight those blockgroup centroids that fall inside
the 5 towns.
- HOWEVER, this is not enough. We want to add a column
to the blockgroup attribute table with the name of the town that
contains that blockgroup.
- Adding town names to the blockgroup attribute table:
- You have to add them to the blockgroup centroid attribute table
first and then join that table to the original block group table.
- Adding the MATOWN00.SHP attrbiute information (including town
name) to the blockgroup centroid attribute table can be done as
a spatial join. However, ArcMap must
know the coordinate system of each layer that is being combined.
Worse yet, if the coordinate system for your centroid shapefile
has not been set, you will have to close ArcMap and use ArcCatalog
to set it. Then, finally, you can join the matown00.shp layer
into the block group centroid attribute table and then join (by
attribute) that table to the original blockgroup table in order
to associate town with blockgroup ID.
- Because this took so many steps, we did not include it in the
homework #1 assignment.
Back to the 11.520
Home Page. Back to the CRN Home
Page.
Last modified 29 October 2007 by Joe Ferreira.