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 #6 - In-Class Notes: Vector Spatial Analysis
Overview - Join.me =
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.)
- Estimate the number of young kids living near Ames Street by:
- Creating a 1 km buffer around Ames St.
- Intersecting the Ames street 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
Administrative:
- Labs #4 and #5 both due today
- Homework Set #2 part 1 due Thursday
Lab #6 Issues:
- Buffering Ames St. is similar to previous buffering of Mass Ave; pay attention to setting map and display units (so you buffer at 1 km)
- Apportioning Cambridge kids to the parts of each block group that falls within the buffer
- Union and Intersect operations retain the old polygon areas
- You need to compute the new-polygon areas after the buffer cuts the block groups into smaller sections
- The Field/Calculate-geometry option (used in lecture) simplifies the area calculations
- but this lab shows you how to do it with Python code
- Using VB Script or Python code permits access to the internal data model and is a powerful key to building customized GIS apps
General ArcMap Tips:
- Folder, shapefile, and table names:
- Use only letters and number with NO spaces, special characters, etc.
- Start all names with a letter
- Save early and often
- Always have a recent unused copy of any MXD document (the ArcMap document
mymapfile.mxd)
- Every time you start an ArcMap session from a saved document, save it
right away into an mxd document with a new name (version2, ver3, ...)
Leftover from last Wednesday's lecture:
In last Wednesday's lecture, I did not have time to cover all of the part of the lecture notes on finding the XY centroids of blockgroup polygons in the
5-town area around Cambridge. Instead of using the 'Field/Calculate-geometry' option, we could have done our own 'Field/Calculate' and used aVB Script or Python code to pull the XY values from the in-memory data model. ArcGIS v.10 changed the syntax of the VB scripting and adds a Python option. The lecture notes showed the old VBA script for ArcGIS 9.3, but the notes have now been updated to also show the Python code.
- The Python code to pull the centroids from the internal ArcMap data structure is equivalent to what we do with NewArea in lab today. However, instead of using !shape.area! compute area, we use
!shape.centroid.X! and !shape.centroid.Y!
to calculate the X and Y values of the centroid.
- We can do today's lab without having to construct our own shapefile of block group centroids (since ArcMap supports an operator that determines whether features 'have their centroid within' another polygon layer). However, we wanted to explain how you could use the scripting capability of ArcMap to grab and manipulated some of the internal feature properties that ArcMap stores.
Back to the 11.520
Home Page. Back to the CRN Home
Page.
Last modified 17 March 2014 by Joe Ferreira.