copyright © 2006 by maribeth h. price 8-1 chapter 8 geoprocessing
TRANSCRIPT
Copyright © 2006 by Maribeth H. Price
8-1
Chapter 8
Geoprocessing
Copyright © 2006 by Maribeth H. Price
8-2
Outline
• Spatial analysis and overlays
• Types of overlays
• How to perform overlays
• Other geoprocessing tools– Clip, dissolve, buffer, append
• Tips for overlay
• Geoprocessing methods
Copyright © 2006 by Maribeth H. Price
8-3
Geoprocessing• Executing analysis functions and tools• Stringing together analysis functions to achieve
a result
Copyright © 2006 by Maribeth H. Price
8-4
Geoprocessing Environment
• Familiar ways to execute functions– Menus– Tools in ArcToolbox
• Environment settings• New ways to execute
functions– Command line– Creating new tools with
ModelBuilder– Writing scripts
Copyright © 2006 by Maribeth H. Price
8-5
Key analysis functions
• Overlay– Without attributes (clip, erase)– With attributes (intersect, union)
• Dissolve
• Buffer
• Append
Copyright © 2006 by Maribeth H. Price
8-6
Without attributes (extraction)
Extracts portions of features based on an overlay layer.
Clip keeps the features inside the feature boundary.
Erase keeps the features outside the feature boundary.clip/erase layer
Ignores interior boundaries; brings attributes through unchanged.
Copyright © 2006 by Maribeth H. Price
8-7
On-the-fly clipping
• Temporary clip applied to a map layout
• Does not create new layers
• Can be performed on many layers simultaneously
• Can be removed when no longer needed
• Set as a data frame property
Copyright © 2006 by Maribeth H. Price
8-8
Copyright © 2006 by Maribeth H. Price
8-9
Overlay with attributes
• Similar to a spatial join
• Combines attributes based on common location (inside join)
• Enforces one-to-one cardinality between features
Copyright © 2006 by Maribeth H. Price
8-10
The problem with spatial joins
Associate the land use type with the road
BUT
The road does not stop at the land use boundary.
Copyright © 2006 by Maribeth H. Price
8-11
Map overlay
A map overlay forces features to split at polygon boundaries.
Copyright © 2006 by Maribeth H. Price
8-12
Now a land use type can be associated with each road.
Sum to give total length of each land use.
Copyright © 2006 by Maribeth H. Price
8-13
Steps to overlay
• Combine features spatially, producing all possible new features
• Combine attribute tables, bringing original values from each table and assigning to each new polygon
• New spatial data set is created with features and attribute table
Copyright © 2006 by Maribeth H. Price
8-14
1. Combine spatial features by producing all possible polygons
Geology
Slope class
Copyright © 2006 by Maribeth H. Price
8-15
Geology
Slope class
2. Combine tables, bringing original values from each table for each new polygon
Copyright © 2006 by Maribeth H. Price
8-16
Intersect: keeps common areas
Union: keeps all areas
Overlay types
Copyright © 2006 by Maribeth H. Price
8-17
Geology
Slope class
Union example
Find combinations of geology and slope that are high risk for landslides
Copyright © 2006 by Maribeth H. Price
8-18
Intersect example
Find residential areas that are at risk of radon infiltration from the Opeche formation
Residential areas
Opeche formation
Copyright © 2006 by Maribeth H. Price
8-19
Hazards mapping
Residential areas Opeche formation Areas of both
Copyright © 2006 by Maribeth H. Price
8-20
Habitat analysis with Intersect
Use of multiple input layers to define regions with specific characteristics
Copyright © 2006 by Maribeth H. Price
8-21
Other overlay examples
Point-in-polyWells in geology
Line-in-polyRoads in landuse
Poly-on-polyZoning on geology
Copyright © 2006 by Maribeth H. Price
8-22
Output geometry choices
Intersecting polygons: choose polygons, lines, or points
Intersecting lines: choose lines or points
Output dimension must be less than or same as lowest input dimension.
Copyright © 2006 by Maribeth H. Price
8-23
Output geometries
Intersecting polygons and lines
Copyright © 2006 by Maribeth H. Price
8-24
Overlay operations summary
union
clip
erase
intersect
outputoverlayinput
Attributes not joined
Attributes joined
Copyright © 2006 by Maribeth H. Price
8-25
Geoprocessing Environment
• Familiar ways to execute functions– Menus– Tools in ArcToolbox
• Environment settings• New ways to execute
functions– Command line– Creating new tools with
ModelBuilder– Writing scripts
Copyright © 2006 by Maribeth H. Price
8-26
Using a tool
Copyright © 2006 by Maribeth H. Price
8-27
Copyright © 2006 by Maribeth H. Price
8-28
The Intersect tool
Copyright © 2006 by Maribeth H. Price
8-29
Dissolving
Choose to summarize other
attributes
Only attribute preserved in output layer
Copyright © 2006 by Maribeth H. Price
8-30
Dissolving
Dissolve polygons on habitat class
Dissolve lines on street name
Mai
n S
t
Mai
n S
t
Mai
n S
t
Mai
n S
t
Main St Choose an attribute to dissolve on…
Copyright © 2006 by Maribeth H. Price
8-31
Dissolving eliminates all of the attributes in the table except the dissolved one…
However, you can choose to summarize the other attributes…
Avg_ crown_cov_percentSum_acres
Copyright © 2006 by Maribeth H. Price
8-32
Buffering
Constructs polygon areas within a specified distance of features.
Single buffers around linesMultiple buffers around points
Copyright © 2006 by Maribeth H. Price
8-33
The Buffer tool
Copyright © 2006 by Maribeth H. Price
8-34
Buffering with the NONE option
Buffering with the ALL option
The Dissolve option
Copyright © 2006 by Maribeth H. Price
8-35
Append
Copyright © 2006 by Maribeth H. Price
8-36
Appending attributes
• Combines feature classes without overlay
• To bring attributes along, tables of input features classes must match exactly.– same classes, same order, same definitions
Copyright © 2006 by Maribeth H. Price
8-37
Efficient overlay
• Overlay is time intensive
• Minimize number of features– Intersect geology
and elevation first– Dissolve vegetation
before intersecting with other layers
Copyright © 2006 by Maribeth H. Price
8-38
Geoprocessing Environment
• Familiar ways to execute functions– Menus– Tools in ArcToolbox
• Environment settings• New ways to execute
functions– Command line– Creating new tools with
ModelBuilder– Writing scripts
Copyright © 2006 by Maribeth H. Price
8-39
Geoprocessing Environment
• Settings that influence function inputs and outputs
Copyright © 2006 by Maribeth H. Price
8-40
Environment Settings
• Hierarchical—can be set for the document or models or individual tools
• Most specific setting takes precedence
Copyright © 2006 by Maribeth H. Price
8-41
Using environment settings
• You are clipping a series of layers in order to place them in a new geodatabase with a different coordinate system.
Slow way:
Clip each file
Project each clipped file and put into final geodatabase
Delete intermediate files
Clever way:
Set the current workspace and output geodatabase in Environments
Clip each file. Output automatically projected into the final geodatabase.
Copyright © 2006 by Maribeth H. Price
8-42
Coordinate systems
• Output coordinate system rules– If output is placed in a feature dataset, the output CS
matches the dataset CS– If the environment setting is set to a coordinate
system, that CS is used.– If the environment is not set, the CS of the first input
data set to the tool will be used.
• Using projected coordinate systems is best– More convenient when areas/lengths are needed– Fewer distortions to worry about
Copyright © 2006 by Maribeth H. Price
8-43
Managing slivers with settings
• Tiny areas of overlap created during geoprocessing
• Result of slight differences in boundaries
• Can build up as a result of multiple operations
• Nuisance for some applications
You can reduce sliver problems by specifying an XY tolerance in the Environment Settings
Copyright © 2006 by Maribeth H. Price
8-44
Tolerances• During geometry operations (like buffering, intersect,
editing, etc) tolerances are used to determine whether two features should be the same. The tolerance is the maximum distance a feature vertex can be moved to coincide with another vertex.
Tolerance
ac
b
ac
b
gap
overlap
Coincident lines?
Clustering
Copyright © 2006 by Maribeth H. Price
8-45
The XY tolerance• XY Tolerance is a property of a feature class
– Set at time feature class is created– Used during geoprocessing operations such as clip,
buffer, intersect, etc.– Avoids tiny slivers and dangles– Can override it using geoprocessing environment
settings if needed (General Settings)
• Default setting– 0.001 meter– 0.003281 feet (0.03937 inches)– 0.0000000556 degrees
Defaults are calibrated to preserve coordinate precision, not resolve differences between data sets during geoprocessing.
Copyright © 2006 by Maribeth H. Price
8-46
Setting the tolerance
If slivers are a problem for your analysis, you may wish to increase the XY Tolerance in the Environments settings to several meters or more.
The XY Tolerance box is way down the list of settings under the General Settings heading.
Measure to see typical size of slivers. If 5 meters, then an XY tolerance of 8-10 meters or so might work well.
Copyright © 2006 by Maribeth H. Price
8-47
Geoprocessing Environment
• Familiar ways to execute functions– Menus– Tools in ArcToolbox
• Environment settings• New ways to execute
functions– Command line– Creating new tools with
ModelBuilder– Writing scripts
Copyright © 2006 by Maribeth H. Price
8-48
Other ways to execute functions
Menus
Tools
Command line
ModelBuilder
Scripts
Copyright © 2006 by Maribeth H. Price
8-49
Command line geoprocessing• Type command instead of using tool or menu• Can be faster than using the mouse• Smart interface helps you complete commands
correctly with right syntax
Type commands here
Messages/progress here
Copyright © 2006 by Maribeth H. Price
8-50
ModelBuilder• Create models built from sequences of tools• Store processing steps for later reference• Execute models repeatedly with different inputs• Share models with others
Copyright © 2006 by Maribeth H. Price
8-51
Scripts
• Programs to execute geoprocessing steps
• Include looping, if-then control etc.
• Choose from several languages
• Python used by ESRI for examples
• Can convert models to scripts and then modify them
Copyright © 2006 by Maribeth H. Price
8-52
Areas and lengths
• Often analysis involves areas or lengths– Total length of
streams in each watershed?
– Total snail habitat area?
Copyright © 2006 by Maribeth H. Price
8-53
Geodatabase geometry measures
• Automatically created and maintained– Usually appear at end of table
• Shape_Area field• Shape_Length field
– Units will match units of the coordinate system
Copyright © 2006 by Maribeth H. Price
8-54
Coverage geometry measures
– Automatically constructed– Updated whenever the BUILD or CLEAN
command is used to update topology• LENGTH field in arc tables• AREA field in polygon tables• PERIMETER field in polygon tables
Copyright © 2006 by Maribeth H. Price
8-55
Shapefile geometry measures
• Shapefiles DO NOT create or maintain these fields automatically!– Must be created and updated manually
Copyright © 2006 by Maribeth H. Price
8-56
Be careful!
Before After
AREA/LENGTH/PERIMETER fields in shapefiles are NOT automatically updated if features change.
Don’t use one of these fields unless you are CERTAIN that they are correct.
These area/perimeter fields are likely from a coverage
Copyright © 2006 by Maribeth H. Price
8-57
User geometry calculationsCreate field to hold values
Choose type, coordinate system, and units
Not automatically updated if features change!!!
Copyright © 2006 by Maribeth H. Price
8-58
Test yourself: True or False?
• A field named AREA in a shapefile will always have the correct area?– False. Shapefile area fields are not automatically
maintained.
• A field named AREA in a geodatabase will always have the correct area?– False. Automatically updated fields in a geodatabase
are called Shape_Area.
• A field named AREA in a coverage will always have the correct area?– True. Automatically updated area fields in a
coverage ARE called AREA.