07/07/14 Ron Briggs, UTDallas GISC 6381 GIS Fundamentals Spatial operations: Spatial Measurement SHAPE AREA PERIMETER CNTY_ CNTY_ID NAME FIPS Shape Index The shape index can be calculate
Trang 107/07/14 Ron Briggs, UTDallas GISC 6381 GIS Fundamentals
Analysis and Modeling in GIS
Trang 2GIS and the Levels of Science
Description:
Using GIS to create descriptive models of the world
representations of reality as it exists.
Analysis:
Using GIS to answer a question or test an hypothesis.
Often involves creating a new conceptual output layer, (or table or chart), the values of which are some transformation of the values in the
descriptive input layer.
e.g buffer or slope or aspect layers
Prediction:
Using GIS capabilities to create a predictive model of a real world
process, that is, a model capable of reproducing processes and/or making predictions or projections as to how the world might appear.
e.g flood models, fire spread models, urban growth models
Trang 307/07/14 Ron Briggs, UTDallas GISC 6381 GIS Fundamentals
The Analysis Challenge
• Recognizing which generic GIS analytic capability (or
combination) can be used to solve your problem:
– meet an operational need
– answer a question posed by your boss or your board
– address a scientific issue and/or test a hypothesis
Send mailings to property owners potentially affected by a proposed change
in zoning Determine if a crime occurred within a school’s “drug free zone”
Determine the acreage of agricultural, residential, commercial and
industrial land which will be lost by construction of new highway corridor Determine the proportion of a region covered by igneous extrusions
Do Magnitude 4 or greater sub-oceanic earthquakes occur closer to the
Pacific coast of South America than of North America?
Are gas stations or fast food joints closer to freeways?
Trang 4Availability of Capabilities in GIS Software
• Descriptive Focus: Basic Desktop GIS packages
– Data editing, description and basic analysis
– ArcView
– Mapinfo
– Geomedia
• Analytic Focus: Advanced Professional GIS systems
– More sophisticated data editing plus more advanced analysis
– ARC/INFO, MapInfo Pro, etc.
Provided through extra cost Extensions
or professional versions of desktop packages
• Prediction: Specialized modeling and simulation
– via scripting/programming within GIS
» VB and ArcObjects in ArcGIS
» Avenue scripts in ArcView 3.2
» AMLs in Workstation ARC/INFO (v 7)
Write your own or download from ESRI Web site
– via specialized packages and/or GISs
» 3-D Scientific Visualization packages
» transportation planning packages e.g TransCAD
» ERDAS, ER Mapper or similar package for raster
Capabilities move
‘down the chain’ over time.
In earlier generation GIS systems, use of advanced applications often required learning another package with
a different user interface and operating system (usually UNIX)
Trang 507/07/14 Ron Briggs, UTDallas GISC 6381 GIS Fundamentals
Description and Basic Analysis
– variable recoding – record aggregation – general statistical analysis
– table relates and joins
Trang 6Spatial measurements:
• distance measures
– between points
– from point or raster
to polygon or zone boundary
– between polygon centroids
– e.g for smoke plumes
Spatial operations: Spatial Measurement
Comments:
• Cartesian distance via Pythagorus
Used for projected data by ArcMap measure tools
• Spherical distance via spherical coordinates
Cos d = (sin a sin b) + (cos a cos b cos P)
a = Latitude of A
b = Latitude of B
P = degrees of long A to B
Used for unprojected data by ArcMap measure tools
• possible distance metrics:
– straight line/airline– city block/manhattan metric
– distance thru network
– time/friction thru network
• shape often measured by:
• Projection affects values!!!
perimeterarea x 3.54
= 1.0 for circle
= 1.13 for squareLarge for complex shape
ArcGIS geodatabases contain automatic
variables:
shape.length: line length or
polygon perimeter
shape.area: polygon area
Automatically updated after editing.
For shapefiles, these must be calculated
e.g by opening attribute table and applying
Calculate Geometry to a column (AV 9.2)
Distances depend on projection
Perimeter to area ratio differs
2
2 ( ) )
d = − + −
Trang 707/07/14 Ron Briggs, UTDallas GISC 6381 GIS Fundamentals
Spatial operations: Spatial Measurement
SHAPE AREA PERIMETER CNTY_ CNTY_ID NAME FIPS Shape Index
The shape index can be calculated from the area and perimeter
measurements (Note: shapefile and shape index are unrelated)
Trang 8Spatial Measurement: Calculating the Area of a Polygon
)/2 Y Y
( ) X -
1 i
The area of the above
polygon is 18.5, based on
dividing it into rectangles
and triangles However,
this is not practical for a
complex polygon.
Area of triangle =
(base x height)/2
Trang 907/07/14 Ron Briggs, UTDallas GISC 6381 GIS Fundamentals
Spatial Operations:
Centrographic Statistics
• Basic descriptors for spatial point distributions
• Two dimensional (spatial) equivalents of standard descriptive statistics
(mean, standard deviation) for a single-variable distribution
Measures of Centrality (equivalent to mean)
– Mean Center and Centroid
Measures of Dispersion (equivalent to standard deviation or variance)
– Standard Distance
– Standard Deviational Ellipse
• Can be applied to polygons by first obtaining the centroid of each polygon
• Best used in a comparative context to compare one distribution (say in
1990, or for males) with another (say in 2000, or for females)
Trang 10Centroid and Mean Center
• balancing point for a spatial distribution
– analogous to the mean
– single point representation for a polygon (centroid)
– single point summary for a point distribution (mean center)
– can be weighted by ‘magnitude’ at each point (analogous to weighted mean)
– minimizes squared distances to other points, thus ‘distant’ points have bigger influence
than close points ( Oregon births more impact than Kansas births!)
– is not the point of “minimum aggregate travel” this would minimize distances (not their
square) and can only be identified by approximation.
• useful for
– summarizing change over time in a distribution (e.g US pop centroid every 10 years) – placing labels for polygons
• for weird-shaped polygons,
centroid may not lie within polygon
centroid outside polygon
n
Y Y
n
X X
n
i i n
Note: many ArcView applications calculate
only a “psuedo” centroid: the coordinates of the
bounding box (the extent) of the polygon
Can be implemented via:
ArcToolbox>Spatial Statistics Tools>Measuring Geographic Distributions>Mean Center
Trang 1107/07/14 Ron Briggs, UTDallas GISC 6381 GIS Fundamentals
n
Y Y
n
X X
n
i i n
i
n
i i i
w
Y w Y
w
X w
4,7
Trang 12Median Center:
Intersection of a north/south and an east/west line drawn so half of population lives above and half below the e/w line, and half lives to the left and half to the right of the n/s line.
Same as “point of minimum aggregate
travel” the location that would minimize
travel distance if we brought all US residents straight to one location
Mean Center:
Balancing point of a weightless map, if equal weights placed on it at the residence of every person on census day.
Note: minimizes squared distances The point
is considerable west of the median center because of the impact of “squared distance” to
“distant” populations on west coast
Source: US Statistical Abstract 2003
For a fascinating discussion of the effect of
population projection see: E Aboufadel & D Austin, A new method for calculating the
mean center of population center of the US
Professional Geographer, February 2006, pp
Trang 1307/07/14 Ron Briggs, UTDallas GISC 6381 GIS Fundamentals
Standard Distance Deviation
single unit measure of the spread or dispersion of a distribution.
• Is the spatial equivalent of standard deviation for a single variable
• Equivalent to the standard deviation of the distance of each point from the mean center
• Given by:
which by Pythagoras
reduces to:
-the square root of the average squared distance
-essentially the average distance of points from the center
We can also weight each point and calculate weighted standard distance
(analogous to weighted mean center.)
N
Y Y X
X
n i
n
c i
Trang 14Standard Distance Deviation Example
N
Y Y X
X sdd
n i
n
i i c c
4,7
Circle with radii=SDD=2.9
Trang 15Standard Deviational Ellipse: concept
• Standard distance deviation is a good single measure of the dispersion of the
incidents around the mean center, but it does not capture any directional bias
– doesn’t capture the shape of the distribution.
• The standard deviation ellipse gives dispersion in two dimensions
• Defined by 3 parameters
– Angle of rotation
– Dispersion along major axis
– Dispersion along minor axis
The major axis defines the
direction of maximum spread
of the distribution
The minor axis is perpendicular to it
and defines the minimum spread
Trang 16Standard Deviational Ellipse: example
For formulae for its calculation, see
Lee and Wong Statistical Analysis with ArcView GIS pp 48-49 (1st ed.), pp 203-205 (2nd ed.)
There appears to be
no major difference between the location
of the software and telecommunications industry in North Texas
Trang 17Spatial Operations: buffer zones
• region within ‘x’ distance units
• buffer any object: point, line or
polygon
• use multiple buffers at progressively
greater distances to show gradation
• may define a ‘friction’ or ‘cost’ layer
so that spread is not linear with
distance
• Implement in Arcview 3.2 with
Theme/Create buffers
in ArcGIS 8 with ArcToolbox>Analysis Tools>Buffer
• use to define (or exclude) areas
as options (e.g for retail site)
or for further analysis
• in conjunction with ‘friction layer’, simulate spread of fire
polygon buffer
line buffer
point
buffers
Note: only one layer is involved, but the buffer can be output as a new layer
Trang 18Criteria may be:
– formal (based on in situ characteristics) e.g city neighborhoods
– functional (based on flows or links):
e.g commuting zones
Groupings may be:
Implement in ArcView 9 thru
– original polygons preserved
• Regionalization (or dissolving)
– grouping polygons into
Trang 1907/07/14 Ron Briggs, UTDallas GISC 6381 GIS Fundamentals
Districting: elementary school attendance zones grouped to form
junior high zones.
Regionalization: census tracts grouped into neighborhoods
Classification: cities categorized as central city or suburbs
soils classified as igneous, sedimentary, metamorphic
Trang 20Spatial Operations:
Spatial Matching: Spatial Joins and Overlays
• combine two (or more) layers to:
– select features in one layer, &/or
– create a new layer
• used to integrate data having different
spatial properties (point v polygon), or
different boundaries (e.g zip codes and
census tracts)
• can overlay polygons on:
– points (point in polygon)
– lines (line on polygon)
– other polygons (polygon on polygon)
– many different Boolean logic combinations
possible
» Union (A or B)
» Intersection (A and B)
» A and not B ; not (A and B)
• can overlay points on:
– Points, which finds & calculates distance to
nearest point in other theme – Lines, which calculates distance to nearest
line
Examples
• assign environmental samples (points) to census tracts to estimate exposure per capita (point in
polygon)
• identify tracts traversed by freeway for study of neighborhood blight (polygon on lines)
• integrate census data by block with sales data by zip code (polygon on polygon)
• Clip US roads coverage to just cover Texas (polygon on line)
• Join capital city layer to all city layer to calculate distance to nearest state capital
(point on point)
Trang 2107/07/14 Ron Briggs, UTDallas GISC 6381 GIS Fundamentals
•ERASE - erases the input
coverage features that overlap with the erase coverage
polygons.
•CLIP - extracts those features from an input
coverage that overlap with a clip coverage
This is the most frequently used polygon
overlay command to extract a portion of a
coverage to create a new coverage.
Example: Spatial Matching:
Clipping and Erasing (sometimes referred to as spatial extraction)
Trang 22Note: the definition of Union in GIS is a little different from that in mathematical set
theory In set theory, the union contains everything that belongs to any input set, but
original set membership is lost In a GIS union, all original set memberships are
explicitly retained
In set theory terms, the outcome
of the above would simply be:
Example: Spatial Matching via
Polygon-on-Polygon Overlay: Union
Drainage
Basins
The two layers (land use
& drainage basins) do not have common boundaries GIS creates combined layer with all possible combinations, permitting calculation of land use by drainage basin
Combined layer
Another example
Trang 23Available in three places
• via Selection/Select by Location
– this selects features of one layer(s) which relate in some specified spatial manner to the features in another
layer
– if desired, selected features may be saved later to a new theme via Data/Export Data
– Individual features are not themselves modified
• via Spatial Join (right click layer in T of C, select Join/Joins and Relates, then click down arrow in first line of Join Data window -see Joining Data in Help for details)
– Use for: points in polygon
lines in polygon points on lines (to calculate distance to nearest line) points on points (to calculate distance to “nearest neighbor” point)
– operate on tables and normally creates a new table with additional variables, but again does not modify
spatial features themselves
• via ArcToolbox
– Generally these tools modify geographic feature, thus they create a new layer (e.g shape file)
– Tools are organized into multiple categories
ArcToolbox Examples
• Dissolve features based on an attribute
– Combine contiguous polygons and remove common border
– ArcToolbox>Generalization>Dissolve
• Clip one layer based on another
– ArcToolbox>Analysis Tools>Extract>Clip
– Use one theme to limit features in another theme
(e.g limit a Texas road theme to Dallas county only)
• Intersect two layers (extent limited to common area)
– ArcToolbox>Analysis Tools>Overlay>Intersect
– Use for polygon on polygon overlay
• Union two layers (covers full extent of both layers)
– ArcToolbox>Analysis Tools>Overlay>Intersect
– Use for polygon on polygon overlay
Implementing Spatial Matching in ArcGIS 9
Trang 24Spatial Operations:
neighborhood analysis/spatial filtering
• spatial convolution or filter
– applied to one raster layer
– value of each cell replaced by some
function of the values of itself and the cells (or polygons) surrounding it
– can use ‘neighborhood’ or ‘window’
of any size
» 3x3 cells (8-connected)
» 5x5, 7x7, etc.
– differentially weight the cells to
produce different effects
– kernel for 3x3 mean filter:
1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9
• low frequency ( low pass) filter:
– smooths the data – use larger window for greater smoothing
Trang 25negative weight filter
– exagerates rather than smooths
local detail
– used for edge detection
standard deviation filter (texture transform)
– calculate standard deviation of
neighborhood raster values
– high SD=high texture/variability – low SD=low texture/variability
– again used for edge detection – neighorhoods spanning border
have large SD ‘cos of variability
1(5)(9)+5(5)(-1)+3(2)(-1) = 14 1(2)(9)+5(2)(-1)+3(5)(-1) = -7
1(5)(9)+8(5)(-1) = 5 1(2)(9)+8(2)(-1) = 2
cell values (vi ) on
each side of edge
–kernel for example ( wi)
-1 -1 -1 -1 9 -1 -1 -1 -1
filtered values forhighlighted pixel
fi. v
i. w
i