0% found this document useful (0 votes)
11 views51 pages

Spatial Analysis

This document discusses spatial analysis techniques that can be applied to GIS data. It covers topics like measurement, classification, buffering and overlay. Measurement includes calculating lengths, areas and distances. Classification includes techniques like dissolve and clip. Buffering creates zones around spatial features. Overlay combines spatial data to reveal relationships.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views51 pages

Spatial Analysis

This document discusses spatial analysis techniques that can be applied to GIS data. It covers topics like measurement, classification, buffering and overlay. Measurement includes calculating lengths, areas and distances. Classification includes techniques like dissolve and clip. Buffering creates zones around spatial features. Overlay combines spatial data to reveal relationships.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

SPATIAL

ANALYSIS

Pemrograman Data Spasial Hepi Hapsari Handayani, Ph.D


Spatial Analysis
• Turns raw data into useful information
– by adding greater informative content and value
• Reveals patterns, trends, and anomalies that might otherwise be missed
• Provides a check on human intuition
– by helping in situations where the eye might deceive
• Thousands of techniques exist…

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 2


Spatial Analysis
Spatial analysis is a set of analytical procedures applied to GIS data to
• describe
• predict, or
• assess environmental or social issues.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 3


Spatial Analysis
Vector Operations
• Measurement
• Classification
• Buffer
• Overlay

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 4


Measurement
Spatial Analysis
Length (Lines)

Area (Polygons)
by dividing the polygon into
triangles whose areas can easily
be calculated

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 5


Measurement
Spatial Analysis

Distance measurement refers to measuring straight-


line (Euclidean) distances between points, or between
points and their corresponding nearest points or lines.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 6


Measurement
Spatial Analysis
1 1 1

4 4
3
2 2

Dissolve removes boundaries of 1 1


polygons that have the same attribute
value and create a simplified map (b).
a b

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 7


Measurement
Spatial Analysis

Input Map Clip Map Output

Clip creates an output that contains only those features of the input map that fall within the
area extent of the clip map.
The dashed lines are for illustration only; they are not part of the clip map.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 8


Measurement
Spatial Analysis

Merge =

Merge pieces together two adjacent maps into a single map.


Merge does not remove the shared boundary between the maps.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 9


Measurement
Spatial Analysis

3
2 2 2 2

Select creates a new map with selected map features from


the input map.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 10


Measurement
Spatial Analysis

Eliminate can remove polygons that are smaller than a specified size.
Slivers along the top boundary (A) are therefore eliminated.
This illustration uses an option to preserve the edge at (B) even though
polygons making up the edge are smaller than the specified size.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 11


Measurement
Spatial Analysis

Input Map Update Map Output

Update replaces the input map with the update map and its map features.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 12


Measurement
Spatial Analysis

Input Map Erase Map Output

Erase removes features from the input map that fall within the area extent of the erase map.
The dashed lines are for illustration only; they are not part of the erase map.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 13


Measurement
Spatial Analysis

Input Map Split Map Output

Split uses the geometry of the split map to divide the input map into
four separate maps.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 14


Classification
Spatial Analysis

Line Dissolve (Map Dissolve)

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 15


Buffer
Spatial Analysis
Definition of what is within/without a given proximity
• Point
– Circle
– Square

• Line
– Line Buffer

• Polygon
– Interior
– Exterior

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 16


Doughnut Buffer
Spatial Analysis

e.g. within 10 meters but not within 5 meters

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 17


Variable Buffer
Spatial Analysis
• Buffer distance varies by some feature attribute or friction surface

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 18


Applications of Buffering
Spatial Analysis
A buffer zone is often treated as a protection zone for planning or regulatory purposes.
• A city ordinance may stipulate that no liquor stores or pornographic shops shall be within 1000 feet of a school
or a church.
• Government regulations may stipulate that logging operations must be at least 2 miles away from any stream
to minimize the sedimentation problem and set the 2-mile buffer zones of streams as the exclusion zones.
• A national forest may restrict oil and gas well drilling within 500 feet of roads or highways; within 200 feet of
trails; within 500 feet of streams, lakes, ponds, or reservoirs; or within 400 feet of springs.
• A urban planning agency may set aside land along the edges of streams to reduce the effects of nutrient,
sediment, and pesticide runoff; to maintain shade to prevent the rise of stream temperature; and to provide
shelter for wildlife and aquatic life.
• A resource agency may establish stream buffers or vegetated filter strips to protect aquatic resources from
adjacent agricultural land use practices.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 19


Applications of Buffering
Spatial Analysis

A buffer zone may be treated as a neutral zone and as a tool for conflict resolution.

 In controlling the protesting mass, police may require protesters to be at least 300 feet from a
building.
Perhaps the best-known neutral zone is the demilitarized zone separating North Korea from
South Korea along the 38°N parallel.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 20


Applications of Buffering
Spatial Analysis

Buffer zones may represent the inclusion zones in GIS applications.

 For example, the siting criteria for an industrial park may stipulate that a potential site must be
within 1 mile of a heavy-duty road. In this case, the 1-mile buffer zones of all heavy-duty
roads become the inclusion zones.

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 21


Overlay
Spatial Analysis

• An overlay operation takes two or more data layers as input and results in an
output data layer
• Three types of overlay:
 Point in polygon
 Line in polygon
 Polygon (polygon on polygon)

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 22


Point in Polygon Overlay
Spatial Analysis
Trees Land Cover NewTrees

1 2
A A
C + = C
B B

Point Table Poly Table Point Table


ID Tree ID Cover ID Tree Cover
A Elm Rural
A. Elm 1 Rural
B Maple Rural
B. Maple 2 Urban
C Elm Urban
C. Elm

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 23


Line in Polygon Overlay
Spatial Analysis
Streets Land Cover NewStreets

C A C
A
+ = D
B B
1 2

Line Table Poly Table Line Table


ID Street ID Cover ID Street Cover
A Race 1 Rural A Race Rural
B Race 2 Urban B Race Urban
C Arch C Arch Urban
D Race Urban

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 24


Polygon Overlay
Spatial Analysis

Intersection (and) Union (or) Identity

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 25


Intersection
Polygon Overlay
Agriculture Land Cover <Intermediate>

A
A

B B

ID Owner ID Cover Area of


A Brown
A commercial intersection
B Smith
B industrial New node

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 26


Intersection
Polygon Overlay
<Intermediate> Output

ID Owner Cover
Area of
intersection A Brown commercial
New node B Smith industrial
Pemrograman Data Spasial Hepi H. Handayani, Ph.D 27
Union
Polygon Overlay
Agriculture Land Cover <Intermediate>

A
A

B B

ID Owner ID Cover Area of


A Brown A commercial union
B Smith B industrial New node

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 28


Union
Polygon Overlay
<Intermediate>
B C

A
D E
ID Owner Cover
A commercial
Area of B. Brown commercial
union C. Brown
D. Smith
New node industrial
E. Smith

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 29


Identity
Polygon Overlay
Agriculture Land Cover
(input layer) (identity layer) <Intermediate>

A
A

B B

ID Owner ID Cover Area of


A Brown A commercial identity
B Smith B industrial New node
Pemrograman Data Spasial Hepi H. Handayani, Ph.D 30
Identity
Polygon Overlay
Output
<Intermediate>

A B

C D
ID Owner Cover
Area of A. Brown commercial
identity B. Brown
New node C. Smith
D. Smith industrial

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 31


Applications of Map Overlay

A map overlay operation computes the geometric intersections of two feature maps and creates
an output with combined features and attributes from the two input maps.
This output map can then be used for query and modeling purposes.

A more specific application of map overlay is to help solve the areal interpolation problem, which
involves transferring known data from one set of polygons (source polygons) to another (target
polygons).

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 32


Applications of Map Overlay

Site Analysis

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 33


Applications of Map Overlay
A

1
B

 In this illustration, census tracts are shown in thick lines and school districts in thin lines.
 Census tract A has a known population of 4000 and B, 2000.
 Queried from the result of map overlay, the areal proportion of census tract A in school
district 1 is found to be 1/8 and the areal proportion of census tract B, 1/2.
 Therefore, the population in school district 1 can be estimated to be 1500 (4000 x 1/8 + 2000
x 1/2).

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 34


Raster Overlay
• Raster GIS will allow a user to perform basic manipulations on a raster data
set.
• Very fast and easy compare to vector overlay
• Cell-by-cell basic
• Less flexibility with attributes

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 35


Map Algebra
Map algebra is a cell by cell
combination of raster layers using
mathematical operations

Basic Mathematical Operations:


Addition,
subtraction,
division,
max,
min

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 36


Map Algebra
Grid1 * Grid2 = Grid3
 Map algebra can be extended to performing a
number of mathematical operations Grid2
 The computer will allow you to perform virtually Grid1
any mathematical calculation
– beware: some will make sense, others won’t. 1 0 =
*
• For example, you can create a grid where water
features are 0 and land values are 1. Then, you can
multiply this grid with an elevation map. The
output will include 0’s where water existed
(x * 0 = 0), and the original elevation value where Grid3 0
land existed (x * 1 = x)
• Or, you can add the elevations and the grid with 0’s
and 1’s together (but, it would be meaningless!) Can’t build in the 0 area since there is water

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 37


Map Algebra Operators
• Arithmetic operators: +, -, *, /, ^
grid2 = grid0 + grid1
• Logical operators, =, >, <, >=, <=, <>, etc.
grid2 = grid0 > grid1 (grid2 becomes 1 where this is true, 0 where false)
• Boolean operators
AND, OR, XOR, NOT
• Bitwise operators
Bitwise complement, left/right shift, bitwise (and, or, xor)
• Mathematical functions (trigonometric functions, logorithms, etc.)
grid2 = sin(grid1)
• Best raster systems allow multiple input grids
grid5 = grid1 * ( grid2 + grid3 - grid4 )
Saves calculating and storing intermediate grids

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 38


Boolean Operators
Map Algebra

Two
possible
values:
A AND B A NOT B
0 or 1
false/true
A OR B A XOR B

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 39


Boolean Operators
Map Algebra

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 40


Raster Functions
• Local:
only use data in a single cell to
calculate an output value (what we
typically thing of as map algebra)
• Neighborhood (Focal):
use data from a set of cells, most often
a “kernel”
• Global:
use all data from a raster layer

41
Raster Function
Mathematical combinations of raster layers several types of functions:
• Local functions
• Focal functions
• Zonal functions
• Global functions

Functions can be applied to one or multiple layers

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 42


Local Function
• Sometimes called layer functions -
• Work on every single cell in a raster layer
• Cells are processed without reference to surrounding cells
• Operations can be arithmetic, trigonometric, exponential, logical or
logarithmic functions

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 43


Local Function
•Multiply by constant value
2 0 1 1 6 0 3 3
2 3 0 4 6 9 0 12
X3 =
1 1 2 3 3 6
3 2 9 6

•Multiply by a grid

2 0 1 1 2 0 2 2 4 0 2 2
2 3 0 4 3 3 3 3 6 9 0 12
X
2 2 2
= 2 2 4
1 1 2
3 2 1 1 3 2

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 44


Focal Function
• Focal functions process cell data depending on the values of neighboring cells
• We define a ‘kernel’ to use as the neighborhood
for example, 2x2, 3x3, 4x4 cells
• Types of focal functions might be:
• focal sum,
• focal mean,
• focal max,
• focal min,
• focal range

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 45


Focal Function
•Focal Sum (sum all values in a neighborhood)

2 0 1 1 (3x3)
2 3 0 4 12 13
=
2 1 1 2 17 19
2 3 3 2

•Focal Mean (moving average all values in a neighborhood)

2 0 1 1 (3x3) 1.8 1.3 1.5 1.5


2 3 0 4 2.2 2.0 1.8 1.8
=
4 2 2 3 2.2 2.0 2.2 2.3
1 1 3 2 2.0 2.2 2.3 2.5

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 46


Zonal Function
• Process and analyze cells on the basis of ‘zones’
• Zones define cells that share a common characteristic
Cells in the same zone don’t have to be contiguous
• A typical zonal function requires two grids
a zone grid which defines the size, shape and location of each zone
a value grid which is processed
• Typical zonal functions
zonal mean,
zonal max,
zonal sum,
zonal variety

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 47


Zonal Function
Zonal maximum – Identify the maximum in each zone

2 2 1 1 1 2 3 4 5 5 8 8
2 3 3 1 5 6 7 8 5 7 7 8
=
3 2 1 2 3 4 7 5
1 1 2 2 5 6 2 5 8 8 5 5

Useful when we have different regions “classified” and wish to treat all grid
cells of each type as a single “zone” (ie. Forests, urban, water, etc.)

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 48


Global Function
• In global functions -
• The output value of each cell is a function of the entire grid
• Typical global functions are distance measures, flow directions, or
weighting measures.
• Useful when we want to work out how cells ‘relate’ to each other

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 49


Global Function
Distance Measures – Euclidean distance based upon cell size

1 1 2 1 0 0
1 1.4 1 1 0
=
2 1 0 1 1
1.4 1 1.4 2

Or – some function which must consider all cells before determining the value
of any cell –
(“cost” associated with a path across the surface)

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 50


Types of analysis for the application functions
 Majority = value that occurs most often on a cell by cell between inputs
 Maximum = maximum value on a cell by cell between inputs
 Mean = mean of values on a cell by cell between inputs
 Median = median of values on a cell by cell between inputs
 Minimum = minimum of values on a cell by cell between inputs
 Minority = value that occurs least on a cell by cell between inputs
 Range = range of values on a cell by cell between inputs
 Standard Deviation = standard deviation on a cell by cell between inputs
 Sum = sum of values on a cell by cell between inputs
 Variety = number of unique values on a cell by cell between inputs

Pemrograman Data Spasial Hepi H. Handayani, Ph.D 51

You might also like