Basic Spatial Analysis
This process involves systems and systems thinking
Many times a picture of a system process or steps is worth a thousand words
Take out a blank sheet of paper Diagram/Draw the steps you took to get up today and come to school Try and have at least 5 steps; Such as: turn off alarm, get out of bed, get dressed……..
Spatial dataanalysis Input-> spatial operation -> output
Spatial dataanalysis Input-> spatial operation -> output
Input Scope Local – “point” to “point” Neighborhood – adjacent regions have input Global – the entire input data layer may influence output
Spatial dataanalysis Usually involves manipulations or calculation of coordinates or attribute variables with a various operators (tools), such as: Selection Reclassification Dissolving Buffering Overlay Cartographic Modeling (a combination of the above)
Spatial Selection Identifying features based on spatial criteria Adjacency, connectivity, containment, arrangement
Spatial Selection Identifying features based on spatial criteria Adjacency, connectivity, containment, arrangement
Selection based on spatial and non-spatial attributes
Adjacency depends on the algorithm used (the same is true for all spatial operations)
Spatial dataanalysis Usually involves manipulations or calculation of coordinates or attribute variables with a various operators (tools), such as: Selection Reclassification Dissolving Buffering Overlay Cartographic Modeling (a combination of the above)
Reclassification An assignment of a class or value based on the attributes or geography o an object Example: Parcels Reclassified By size Spatial data analysis: f
Spatial data analysis: Reclassification
Reclassification: defining categories
Spatial data analysis: reclassification defining categories
Spatial dataanalysis Usually involves manipulations or calculation of coordinates or attribute variables with a various operators (tools), such as: Selection Reclassification Dissolving Buffering Overlay Cartographic Modeling (a combination of the above)
Spatial data analysis :dissolve A function whose primary purpose is to combine like features within a data layer. Adjacent polygons may have identical values. Dissolve removes or “dissolves away” the common boundary. Used prior to applying area-based selection in spatial analysis
Dissolve: often used after reclassification
Boundaries are removed when they separate states with the same value. The dissolve attribute is_west. Dissolve: often used after reclassification
Spatial dataanalysis Usually involves manipulations or calculation of coordinates or attribute variables with a various operators (tools), such as: Selection Reclassification Dissolving Buffering Overlay Cartographic Modeling (a combination of the above)
Buffering and other Proximity Functions
Raster buffer is an array of distances
Mechanics of Point and Line Buffering
Buffering Variants: point buffer examples
Regions in Buffering – inside, outside, enclosed
Spatial data analysis Reclassification Dissolving Buffering Overlay Cartographic Modeling (a combination of the above)
Spatial Analysis: Overlay Combination of different data layers Both spatial and attribute data is combined Requires that data layers use a common coordinate system A new data layer is created
Overlay Raster Overlay Typically applied to nominal or ordinal data Cell by cell process which results in the combination of the two input layers Pay attention to the the number of possible combinations that may be possible and understand the effect on the output layer
Feature numbers increase in overlay
Vector Overlay Topology is likely to be different Vector overlays often identifies line intersection points automatically. Intersecting lines are split anda node placed at the intersection point Topology must be recreated for later processing Any type of vector may be overlain with any other type Output typically takes the lowest dimension of the inputs For example: Point on Polygon results in a point
Ambiguous result Un- ambiguous result
note null or flag values null or flag values
Vector Overlay (common ways applied) CLIP INTERSECTION UNION
CLIPCLIP Cookie cutter approach Bounding polygon defines the clipped second layer Neither the bounding polygon attributes nor geographic(spatial data) are included in the outputlayer
INTERSECTION Combines data from both layers but only for the bounding area (Bounding polygon also defines the output layer Data from both layers are combined Data outside the bounding layer (1 st layer) is discarded) Order of intersection is important (A toBorBtoA)
UNION Includes all data from both the bounding and data layers New polygons are formed by the combinations of the coordinate data from each layer
Why do buffering and vector overlay often take so long? Because a time consuming line intersection test must be performed for all lines in the data layers Then, inside vs. outside regions must be identified for all new polygons
BABA Does polygon A intersect/overlap/overlay polygon B?
We must check each line in one data layer against every other line in the second data layer to see if they intersect (x2,y2) Remember each line is composed of a linked set of straight line segments defined by a vertex or a node at each end (x1,y1) We can use the equation for a line, plus the coordinates at the endpoints to define the line, and use algebra and logic to see if the lines intersect Equation of a line: y = m * X + b
10, 12 7,4 2,1 9,2 Line Equation y = m 1 x + b 1 Line Equation y = m 2 x + b 2 Line Intersection Calculations m 1 = slope = (12-1)/(10-2) = b 1 = y - m 1 x = * = y = * x m 2 = slope = (4-2)/(7-9) = -1 b 2 = y - m 2 x = 4 - (-1) * 7 = 11 y = -1 * x ) Calculate Equation Parameters
2) Find Intersection Point Y =1.375 * x -1.75y = -1 * x +11 Set y values equal y =1.375 * x = -1 * x +11 ( ) * x = x = 12.75/2.375 = 5.37 y = * 5.37 –1.75 = 5.63 Potential Intersection Point atx = 5.37, y = 5.63
3) Verify Intersection: Is it Within the Boxes 10,12 2, 12, 19,2 7,4 Test X: is 5.37 > 2 and < 10 is 5.37 > 7 and < 9 Test Y: is 5.63 > 7 and < 9 is 5.63 > 2 and < 4 Answer:No the lines do not intersect Yes No No
Finding the Interior: Is a point inside a polygon? Potential pointPotential point Algorithm : count line crossings to outside of convex hull, if they is an odd number the point is inside, if even num ber, point outside n= 2, out Potential point n= 4, out n= 1, in n= 3, in Algorithm: Pick a direction (East (right) in the example) Count line crossings to the outside of convex hull (shaded polygon) If odd number then the point is inside If even, the point is outside Finding the interior: Is a point inside a polygon (shaded) ?
Vector Overlay Common features in Vector overlays create “Slivers” or “Sliver polygons” A common feature in both layers. The problem is that each definition is very subtly different (different time, source, materials) so the polygons don’t line up. They can only be seen a very large display scale but can represent over half the output polygons. They take very little space but affect analytical results.
Methodsto reduce/remove slivers: Redefine the common boundaries with highest coordinate accuracy and replace them in all layers before overlay Manually identify and remove Use snap distance during overlay
6565
6666
blobs - overlap
blobs - before a union
blobs - after a union
7070 Flowcharts - workflow diagram
7171 Problem - Identify major watersheds that include counties withhigh corn production ( > 10,000,000 bushels/year) What doweneed tosolve this problem?
7272
7373
7474
7575 NASS Tables: Corn Production Data by County (note FIPS!)
7 6 County Boundary Files from National Map
7777 Condition Tables, Join
7878 Reclass
7979 Web Search for “Watersheds Download Data Shapefile Geodatabase,” then some sifting led to:
8080
8181
8282 Finest Grain HUCs, Too Detailed
8 3 Dissolve to HUC4
8484 Spatial Select with High Production Counties
8585 Results Pane - Left Click on Geoprocessing, Select Results Tip #1 - Your Processing Trail
8 6 Your happy (or sordid) past revealed
8 7 Tip #2 - Customized Toolboxes 1: R-click on ArcToolbox, L-click Add Toolbox 2: Navigate to your project directory, and L-click on the new toolbox icon 3: type in the name you’d like, with a.tbx extension
8888 4: In ArcToolbox, L-click, hold, and drag onto new toolbox
8989 Tip #3: Batch Jobs Open ArcCatalog, then Toolboxes, then System Toolboxes
9090 Navigate to the tool you wish to use, left click on it, and select Batch in the dropdown menu
Network Models A set of connected features, often termed centers. Centers are connected to at least on and possibly many network links Links form a network that may have attributes that effect the flow (transit cost) Types of problems include route selection, resource and territory allocation and traffic modeling
Network Elements Links - “Conduits” for movement Intersections - Link joins Stops - Sources/sinks where resources can enter or exit the network Centers - node locations which may receive or provide resources. Attributes for total amount of resource supplied toor taken from a center, e.g., total water capacity for a reservoir Barriers - nodes which prevent flow through links, or links with infinite impedance
Network Elements Impedance - a resistance to flow through a link. Impedance may be directionally dependent Impedance is assumed to be uniform over the link. Impedance = 5 min/mile Impedance = 10 min/mile
Network Elements Turns - Allowable redirections at intersections/nodes.Often controlled by a turning impedance, energy or time spent in performing a turn - set to infinity for “illegal” turns allowed turns in a stream network
Route selection example
Find the least cost path?
Route selection example