# Intro to Spatial Analysis by jennyyingdi

VIEWS: 3 PAGES: 21

• pg 1
```									       Intro to Spatial Analysis
• Most GIS support simple spatial analysis tasks
such as selecting, counting, and generating
descriptive statistics such as mean and standard
deviation
• More sophisticated spatial analysis (e.g.
regression, analysis of spatial relationships
between objects, etc.) often necessitate linking to
other software (e.g. a statistical package) and/or
significant programming by the user
Intro to Spatial Analysis
• Finding and returning information about an object

– what objects have a certain attribute value?
– what is the attribute value of a certain object?

– What locations have a certain attribute value?
– What is the attribute value at a certain location?
Intro to Spatial Analysis
• Basic spatial properties of objects (besides location)
– Point
– Line
• length
• orientation
• sinuosity
– Polygon
•   area
•   perimeter
•   shape
•   eccentricity (elongation)
•   orientation
Measurement
• Vector Line Length
– Length of straight line calculated by pythagorean
theorem using beginning and ending point locations
– length of a curvillinear line calculated by adding lengths
of individual line segments
• Raster Line Length
– Number of grid cells x length of grid cell
– Can incorporate greater distance for diagonal orientation
Measurement
• Sinuosity of a Line
Length of line A
-------------------
Length of line B

A

B
Measurement
• Vector Polygon Area
– Break complex polygon into simpler geometric shapes
such as right triangles and rectangles whose area can be
calculated
• Raster Region Area
– Count number of grid cells with certain attribute value
– May have to define a separate raster layer to find areas of
contiguous regions of a certain attribute value
Measurement
Hole or
• Regions: Vector                      island

Contiguous         Fragmented   Perforated
region             region       region
Measurement
• Regions: Vector
Vector data layer that describes agricultural land cover

Polygons B and C           Poly ID      Crop
and not agricultural
B       land but they are          A            corn
A           polygons and still         B
C               appear in the
relational table           C

Perforated
region
Measurement
• Regions: Vector
Vector data layer that describes countries

Polygons A, B, and         Poly ID   country
A          C are islands that
A         Fragmentland
compose one
C
B      country, but in            B         Fragmentland
relational table each
C         Fragmentland
polygon is a
Fragmented       separate record
region
Measurement
• Regions: Raster

0   0   0   1   1   No way to distinguish
between contiguous,
0   0   0   1   1
fragmented, and
1   1   0   0   0   perforated regions unless
1   1   0   0   0   we explicitly attribute
1   1   1   0   0   each grid cell as part of a
contiguous region
Measurement
1 - Forest

0   0   0   1   1
0   0   0   1   1    • Raster Region Area
1 1 0 0 0
1 1 0 0 0
1 1 1 0 0

How many grid cells
where value = 1
Measurement
• Calculating Raster Region Area for each individual
contiguous region
0 - Meadow                         1 - Forest stand 1
1 - Forest                         2 - Forest stand 2

0 0   0   1   1                    0   0   0   2   2
0 0   0   1   1      reclassify    0   0   0   2   2
1 1   0   0   0                    1   1   0   0   0
1 1   0   0   0                    1   1   0   0   0
1 1 1 0 0                          1 1 1 0 0
How many grid cells                How many grid cells
where value = 1                    where value = 2
Measurement
• Calculating Vector Polygon
Perimeter
– calculate lengths of all
component lines

• Calculating Raster Region       0   0   0   0   0
Perimeter                       0   1   1   1   0
– find ‘boundary’ grid cells
1   1   1   1   1
– calculate lengths of all
1   1   1   1   0
component ‘lines’
0   1   1   0   0
Measurement
• Calculating Polygon Eccentricity

Length of A
--------------
Length of B

B       A
Measurement
• Calculating Distance
– Simple distance assumes an isotropic surface in
Euclidean space
– Functional distance incorporates ‘cost’
Measurement
• Calculating Simple Distance
– Between 2 points
• Pythagorean theorem
– Between 2 polygons
• measure distance between centroids using Pythagorean
theorem
• measure distance between polygons bounding box
Measurement
• Calculating Simple Distance in Raster
– Raster ‘spread’ operation defines a raster of
distance from a point or many points

2   2   2   2   2
2   1   1   1   2
2   1   0   1   2
2   1   1   1   2
2   2   2   2   2
Measurement
• Calculating Functional Distance in Raster
– raster ‘friction’ surface defines impedance value at
each grid cell
– relative barriers
– absolute barriers
1   2   3   3     2
Difficulty for tank travel               1   2   3   3     2
1 - open land (no impedance)               1   1   1   2     2
2 - small trees (relative barrier)         1   3   2   2     1
3 - large trees (absolute barrier)
3   3   3   3     1
Measurement
• Calculating
a Least Cost
Path in
Raster
– choose a
starting
point and
search
nearest
neighbors
for easiest
route
Measurement
• Calculating a Least Cost Path in Raster
– accumulated cost from one point to each cell in the grid to
find least cost path between two points

Cost surface       Accumulated cost         From 4,4 to 2,2
1 1 3 1              4.8 3.8 4.4 3
0.5 (1.4 x 1) = 0.7
1 3    1   1          3.8   4.2   2.4   2   0.5 (1.4 x 3) = 2.1
3 1    1   1          4.4   2.4   1.4   1   + (prev val) 1.4
1 1    1   1          3     2     1     0                  4.2
Measurement
• Least Cost Path Can be Applied to Vector Networks
– each line has a cost associated with it
– to find a least cost path between two points is exhaustive
(must try all paths before determining the shortest) and
therefore time consuming
– costs on a street network include speed limit, traffic lights,
stop signs, dead ends, cul de sacs, wait to make a left turn at
a busy intersection, etc.

```
To top