GIS Lecture 8 Spatial Data Processing
Outline Extracting Features by Attributes Location Proximities Geoprocessing Tools Model Builder
Extracting Features
Attribute Query Extraction You have tracts for state but want one county only
Attribute Query Extraction Select tracts by County ID
Export Selected Features Right-click to export selected features
Add Exported Layer
Location Proximities
Select by Location Identify spatial relationships between layers Finds features that are within another layer. Input: County Census Tracts Can’t use Select By Attributes Output: City tracts only
Select by Location Select feature to extract tracts to (city outline)
Select by Location Selection, Select By Location
Export Selection and Add Layer
Other Select by Location Queries Toxic release sites within 1 mile of a river
Other Select by Location Queries Points near points Schools within ½ mile of polluting companies
Other Select by Location Queries Polygons intersecting lines Municipalities that intersect Interstates
Other Select by Location Queries Lines intersecting polygons
Other Select by Location Queries Buildings whose centers are in emergency zones
Geoprocessing Tools Overview Clipping Features
Geoprocessing Tools GIS Operation to manipulate data Typically take input data sets, manipulate, and produce output data sets Often use multiple data sets
Geoprocessing Tools Clip Dissolve Intersect Union Append
Clipping Features
Clip “Cookie cutter” to select features =
Clipping Features (Points, Lines, Polygons) X Y Z = = =
Line (Arc) Clipping Input layer - Streets Clip layer – Central Business District (selected) Output layer - Streets within Central Business District
Clip Geoprocessing Tool
Difference Between Clipping and Select by Location Clip: Clean “cut” Select by Location: Dangle edges
Dissolving Features
Dissolve Aggregates items that have the same value # Item 1 C 2 R 3 C
Dissolve Example You have states but need regions
Dissolve Functions ArcToolBox or Command Line Window
Dissolve Field Field with a common value for each feature (e.g. Sub_Region)
Statistics Field Aggregated field can be summarized using a statistics type (i.e. state population can be aggregated by population for each region)
Resultant Dissolved Regions Layer
Appending Features
Append Appends features together
Append Streets Separate street layers for neighborhoods
Append Streets Choose both street layers to append
Resultant Layer One street layer with all records and field items
Union Features
Union Use Union when you want to overlay two polygon layers so that the resulting output layer a) has the combined attribute data of the polygons in the two inputs, and b) contains all the polygons from the inputs, whether or not they overlap.
Union Start with Pittsburgh ZIP codes and Neighborhoods
Union Attributes tables contain different data
Union Union neighborhoods and ZIP Codes to include the zip on each neighborhood polygon
Union Result: Polygons are unioned with same information Tips: Same Projections, Order of Layers
Intersecting Features
Intersect Use Intersect when you want to overlay a layer with the polygons in another layer so that the resulting output layer - has the combined attribute data of the features in the two inputs, and - only contains features that fall within the spatial extent of the overlay polygons
Intersect Flood zones that intersect buildings
Intersect Result is only building polygons that intersect floodzones with combined data fields
Model Builder
Model Builder Workflow processes can be complicated Automates and strings functions together
Model Builder Problem: You have census tracts from a state with population data but only want population for neighborhoods in a small region Solution: Use Model Builder functions to clip census tracts and union to aggregate data to neighborhoods
Model Builder Example Begin with census tracts for the state of Pennsylvania
Model Builder Example Clip only tracts whose centers are located within Pittsburgh neighborhoods Union the census tracts and neighborhoods
Model Builder Example Run the model…
Model Builder Example Display and query the results
Summary Converting Shapefiles Geoprocessing Tools Model Builder Extracting Features Attribute Queries Select by Location Converting Shapefiles Geoprocessing Tools Clip Dissolve Union Intersect Append Model Builder