02 Spatial Analysis
02 Spatial Analysis
Information System
Tong Si Son
[email protected]
1
Chapter 2: Spatial analysis
1. Spatial analysis concept
2. Topology rules
3. Buffers, Overlays, and Spatial Joins
2
1. Spatial analysis concept
(Material based on Tadele Feyssa, Wollega
University )
3
Spatial analysis concept
• Spatial analysis is the process by which we turn raw data into useful
information
• Spatial analysis is the crux of GIS including: the transformations,
manipulations, and methods that can be applied to geographic data to add
value to them, to support decisions, and to reveal patterns and anomalies
that are not immediately obvious.
• In a narrow sense, spatial analysis is a method for analyzing spatial data,
while in a broad sense it includes revealing and clarifying processes,
structures, etc., of spatial phenomena that occur on the Earth’s surface.
• Ultimately, it is designed to support spatial decision making, and to serve
as a tool for assisting with regional planning and the formulation of
government policies, among other things.
4
Spatial analysis
5
Spatial Analysis Functions
• Measurements
• Query
• Extraction
• Proximity
• Classification
• Topology
• Network analysis
6
Measurement
Measurements are simple numerical values that describe aspects of
geographic data.
7
Queries
• Queries are the most basic of analysis operations, in which
the GIS is used to answer simple questions posed by the
user.
• No changes occur in the database, and no new data are
produced with these type of selection
• It involves picking features based on query expressions,
which use
Boolean algebra (and, or, not),
set algebra (>, <, =, >=, <=),
arithmetic operators (=, -, *, /), and user-defined values.
• Examples: ‘how many houses are found within 1 km of this
point’, or ‘which is the closest city to Ha Noi going north’.
8
Extraction
• Extracting portions of data helps to isolate specific areas for
further processing or data analysis.
• Similar to queries and selection sets, extraction functions can
reduce the size of datasets and/or facilitate more complex
interpretation.
• GIS software packages provide a suite of tools to extract
data: clip, select, and split
9
Classification
• The procedure of identifying a set of features as belonging to a group and
defining patterns.
• Some form of classification function is provided in every GIS
• Classification is important because it defines patterns.
• One of the important functions of a GIS is to assist in recognizing new
patterns.
• Using single data layers, as well as with multiple data layers
• Aggregating features into classes allows to spot patterns in the data more
easily.
• By altering the class breaks (the boundary between classes), we can create
very different-looking maps.
• Classes can be created manually, or you can use a standard classification
scheme. 10
Topology
• Topology is the arrangement that defines how
point, line, and polygon features share
coincident geometry.
11
Proximity computation
12
Network Analysis
• Network is any system of interconnected linear features
• A network is a system of interconnected elements, such as
edges (lines) and connecting junctions (points), that represent
possible routes from one location to another
• Solving problems involving networks
• Its goal is efficiency – Saving time and money.
13
Network Analysis
14
Network Analysis
• Direct path analysis : finding the
shortest path between your office
and home
• Optimum routing: helping a pizza
deliveryman visit numerous houses
in the most time: efficient manner,
that include length of the lines,
their capacity, maximum travel rate
and time
15
Network Analysis
Service
Driving directions: the areas of
systems of computation Piza
also allow deriving shops
directions to keep
the Piza
hot
enough
Drive time
analysis: Helping
a store to
determine how
many customers
are within 5
driving miles
16
2. Geodatabase Topology Rules
Material of ArcGIS-ESRI
Topology allows:
-Model spatial relationships between feature
classes in a feature dataset.
-Define those relationships between features in a
single feature class or subtype or between two
feature classes or subtypes.
-Define the spatial relationships that meet the
needs of your data model.
-Topology errors are violations of the rules
17
• The topology rule
occurs within a
single feature
class or subtype.
18
Polygons: Must not overlap
19
Polygons: Must not have gap
Ex: Soil polygons
• Polygons must not have a cannot include gaps
void between them within a or form voids—
feature class or subtype. they must form a
continuous fabric
20
Polygons: Contains point
• Each polygon of the first
feature class or subtype must Parcels must
contain within its boundaries contain at
at least one point of the least one
second feature class or address point.
subtype.
23
Polygons: Must cover each other
• All polygons in the
first feature class and all
polygons in the second Vegetation and soils
feature class must must cover each other
cover each other.
- FC1 Must be covered by
feature class of FC2.
- FC2 Must be covered by
feature class of FC1.
• Points in one
feature class or
subtype must be
inside polygons of State capitals must
another feature be inside each state
class or subtype
• Points in one
feature class or
subtype must touch Utility service points might
boundaries of be required to be on the
polygons from boundary of a parcel.
another feature
class or subtype.
• Points in one
feature class or
subtype must be Street intersections must be
covered by the covered by the endpoints of
ends of lines in street centerlines
another feature
class or subtype.
27
Point: Point must be covered by line
• Points in one
feature class or Monitoring stations
subtype must be must fall along streams
covered by lines in
another feature class
or subtype
28
Line: Must not self intersect
• Lines must not cross
or overlap themselves
within a feature class Contour lines cannot
or subtype. Lines can intersect themselves
touch themselves and
touch, intersect, and
overlap other lines
30
3. Buffers, Overlays, and Spatial Joins
• Buffers
• Overlays
– Clip
– Intersection
– Union
– Dissolve
– Merge
• Spatial Joins
31
Buffers
Buffering separates a map into two areas: one area that is
within a specified distance of selected features and the other
area that is beyond. The area that is within the specified
distance is called the buffer zone.
32
Variations in Buffering 3. Boundaries of
buffer zones may
remain separate
1. The buffer distance can 2 . Features may polygons or be
vary according to the values have more than one dissolved (no
of a given field. buffer zone. overlapped areas)
•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 dumping ground must 1 km far from the village, 1.5 km far from the
school and 2 km far from water resources (How to find the location for the
dumping ground?)
34
What is an overlay?
Map overlay combines the geometries and attributes of two feature maps
to create the output. One of the two maps is called the input map and the
other the overlay map.
• Take two or more layers
– Typically with the same extent (they are one on top of another)
• Combine the layers in some way
– Specific overlay techniques
• Create an output layer
New
Layer 1
Layer 2 Layer
All layer must be the same coordinate systems to avoid crashing the program
or inaccurate results
35
Feature Type and Map Overlay
Point in Polygon
Line in Polygon
Polygon on Polygon
36
Point in polygon overlay
The input is a point map (the dashed lines are not part of the point
map). The output is also a point map, which has attribute data from
the overlay polygon map.
1B
1 + A B =
1A
The input is a line map (the dashed lines not part of the line map). The output is
also a line map. But the output differs from the: the line is broken into two
segments, and the line segments have attribute data from the overlay polygon.
37
Polygon-on-polygon overlay
1 1A 1B
+ A B =
2 2A 2B
The two maps to be overlaid have the same area extent. The
output combines the geometry and attribute data from the
two maps into a single polygon map.
38
Overlaying Vector Data
• Common vector overlay/geoprocessing operations
– Clip (cookie cutter)
– Intersect – keeps only common features between two
layers
– Union – combines all features in two layers
– Dissolve – combine (simplify) features in one layer
– Merge – combine two layers into one
• Always recalculate areas/perimeters of polygons after
one of these operations
39
Clip
• Use one layer as a boundary to clip (cut) out features from
another layer
40
More on clip
• Be sure to have correct layers as the input layer (the
one to be cut) and the clip layer (the one to use as a
cutting guide)
• Must use polygons as the clip layer
• Can use selected features or all features as a clip
layer
41
Intersect
• Combines two layers and outputs only the
features common (spatially) to both layers
42
More on Intersect
• Be sure to know which layer is the input layer
and which is the overlay layer
• The overlay layer must be polygons
• Attributes will come from both layers
• Will need to re-calculate polygon areas
43
Union
• Combines two layers and all features (whether
or not they overlap)
44
More on Union
• Be sure to know which is the input and which
is the overlay layer
• May use all or selected features as overlay
• Overlay must be polygon
• Attributes will come from both layers
45
Dissolve
46
More on Dissolve
• Have to specify common feature
• Points, lines, and polygons
• Need to specify how to deal with remaining
attributes
– First or last
– Sum, min, max, mean
47
Merge
• Combine features from two or more layers into one
layer
48
More on Merge
• Can have multiple layers
• Must specify which layer will define attribute
table fields for the output
• Need to be aware of:
– Differing attribute tables
– Presence of gaps (spatially) in merged layers
49
Summary: vector overlay
• Powerful tools for creating new information
• Consider attributes
• Recalculate area and perimeter
• Files with different coordinate systems can
cause problems – convert coordinate systems
first
50
Practice
1. Practice buffer, overlay
2. Digitalize Land cover
3. Add attribute data (area)
4. Editing a map
51
Practice buffer, overlay
1. Digitalize 4 houses
2. Define the location to build a toilet
Criteria: Distance (houses and toilet)< 130m
52
DEFINITION OF LAND COVER, LAND COVER CLASSIFICATION