Spatial Analysis [1]
Spatial Analysis [1]
Dr. Ragab Khalil
Department of Landscape Architecture Faculty of Environmental Design King AbdulAziz University Room 103
LA561 Computer Applications in LA LA561 Computer Applications in LA (GIS) (GIS)
Dr. Ragab Khalil KAAU - FED – LA561: GIS 2/34
Where have we come so far?
Where have we come so far?
• By now, you should be familiar with:
What GIS is
How GIS works
Some of what GIS can do
GIS data formats Spatial data Tabular data
Modifying views of data
Basic operations on data entry and editing
What comes next?
What comes next?
Dr. Ragab Khalil KAAU - FED – LA561: GIS 4/34
Basic vector analysis Basic vector analysis
• One of the most basic analytical tasks in a GIS is locating features in one layer based on the location of other features in the same layer or in another layer.
• Examples :
Which city lie within 10 km of a river?
Which sampling plots have been covered by a recent slope failure?
Does any road pass through the oldest stands in a forested area?
…
Dr. Ragab Khalil KAAU - FED – LA561: GIS 5/34
Basic vector analysis Basic vector analysis
• Examples:
What is the age of buildings adjacent to buildings younger than 10 years?
What is the mean slope of the group of stands within 50 m of a stream?
Dr. Ragab Khalil KAAU - FED – LA561: GIS 6/34
Basic vector analysis Basic vector analysis Overview
Overview
• Analyzing spatial relationships
Select by location (Layer-on-Layer selection)
Spatial join
Other spatial relationships will be
investigated in next lesson
Dr. Ragab Khalil KAAU - FED – LA561: GIS 7/34
Analyzing spatial relationships Analyzing spatial relationships
• Relationships between features
Proximity
Containment
Overlap
• All based on feature geometry
Dr. Ragab Khalil KAAU - FED – LA561: GIS 8/34
Select by location Select by location
• Layer-on-layer selection
Selecting points near a line (proximity)
Selecting adjacent features (proximity)
Line-on-polygon selection (containment)
Polygon-on-line selection (overlap)
Point-in-polygon selection (containment)
Polygon-on-point selection (overlap)
Polygon-on-polygon selection (overlap)
Layer
Layer- -on on- -layer selection layer selection
• Selecting points near a line (proximity)
Dr. Ragab Khalil KAAU - FED – LA561: GIS 10/34
Layer
Layer- -on on- -layer selection layer selection
• Selecting adjacent features (proximity)
Dr. Ragab Khalil KAAU - FED – LA561: GIS 11/34
Layer
Layer- -on on- -layer selection layer selection
• Selecting adjacent features (proximity)
Dr. Ragab Khalil KAAU - FED – LA561: GIS 12/34
Layer
Layer- -on on- -layer selection layer selection
• Line-on-polygon selection (containment)
Dr. Ragab Khalil KAAU - FED – LA561: GIS 13/34
Layer
Layer- -on on- -layer selection layer selection
• Polygon-on-line selection (overlap)
Dr. Ragab Khalil KAAU - FED – LA561: GIS 14/34
Layer
Layer- -on on- -layer selection layer selection
• Point-in-polygon selection (containment)
Layer
Layer- -on on- -layer selection layer selection
• Polygon-on-point selection (overlap)
Dr. Ragab Khalil KAAU - FED – LA561: GIS 16/34
Layer
Layer- -on on- -layer selection layer selection
• Polygon-on-polygon selection (overlap)
Dr. Ragab Khalil KAAU - FED – LA561: GIS 17/34
Layer
Layer- -on on- -layer selection layer selection
• Definitions
Target layer(s):
the layer(s) we want to know something about
Selector layer:
the layer we are spatially referencing to
• For a series of streams, find the distance to the nearest forest stand target layer
selector layer
Dr. Ragab Khalil KAAU - FED – LA561: GIS 18/34
Layer
Layer- -on on- -layer selection : feature type layer selection : feature type relationships
relationships
• Spatial relationships follow geometric rules
point line polygon point
line polygon selects target layer features
that are within a given distance of selector layer features are within distance of
line polygon point
line polygon selects target layer features
that intersect selector layer features intersect
point line polygon polygon
selects target layer features which contain the centers of selector layer features contain the center of
polygon point
line polygon selects target layer features
whose centers fall inside selector layer features have their center in
point line polygon polygon
selects target layer features that completely contain selector layer features completely contain
polygon point
line polygon selects target layer features
that are completely within selector layer features are completely within
selector layer feature types target layer
feature types purpose
spatial relationship
Dr. Ragab Khalil KAAU - FED – LA561: GIS 19/34
Selecting points near a line (proximity) Selecting points near a line (proximity)
• Find inventory plots near streams
selector layer
target layer
Dr. Ragab Khalil KAAU - FED – LA561: GIS 20/34
Selecting adjacent features
Selecting adjacent features (proximity of 0) (proximity of 0)
• Find stands adjacent to other stands
Line- Line -on on- -polygon selection polygon selection
(intersection, proximity of 0, overlap) (intersection, proximity of 0, overlap)
• Streams within stands
Dr. Ragab Khalil KAAU - FED – LA561: GIS 22/34
• Stands traversed by roads Polygon
Polygon- -on on- -line selection line selection
(intersection, proximity of 0, overlap) (intersection, proximity of 0, overlap)
Dr. Ragab Khalil KAAU - FED – LA561: GIS 23/34
Point
Point- -in in- -polygon selection (containment) polygon selection (containment)
• CFI plots within moderate to high windthrow potential soils
Dr. Ragab Khalil KAAU - FED – LA561: GIS 24/34
Point
Point- -in in- -polygon selection (containment) polygon selection (containment)
• CFI plots within moderate to high windthrow
potential soils
Dr. Ragab Khalil KAAU - FED – LA561: GIS 25/34
Spatial join Spatial join
• Spatial join
Spatial join: containment
Spatial join: proximity
Dr. Ragab Khalil KAAU - FED – LA561: GIS 26/34
Spatial join Spatial join
• Layers are joined based on geometry
Features are related and compared for distance and containment
Based on feature geometry
Spatial join Spatial join
Not applicable Not applicable
A join point is matched to a target point at the same location.
Point Point
IS_WITHIN CONTAINS
INTERSECTS Join features
Target feature
Dr. Ragab Khalil KAAU - FED – LA561: GIS 28/34
Spatial join Spatial join
A join polygon is matched to a target line that is inside the boundary of the join polygon Not applicable
A join polygon is matched to a target line that it intersects.
Polygon Line
A join line is matched to a target line that falls completely within the join line. Here the target line is coincident with the join line.
A join line is matched to a target line that completely contains it. Here the join line is coincident with the target line.
A join line is matched to a target line that it intersects. This includes lines that cross or are coincident.
Line Line
Not applicable A join point is
matched to a target line that contains it.
A join point is matched to a target line that it intersects.
Point Line
IS_WITHIN CONTAINS
INTERSECTS Join
Target
Dr. Ragab Khalil KAAU - FED – LA561: GIS 29/34
Spatial join Spatial join
IS_WITHIN CONTAINS
INTERSECTS Join
Target
A join polygon is matched to a target polygon that is inside the boundary of the join polygon.
A join polygon is matched to a target polygon that contains it.
A join polygon is matched to a target polygon that it intersects or is inside of.
Polygon Polygon
Not applicable A join line is
matched to a target polygon that contains it.
A join line is matched to a target polygon that it intersects or is inside of.
Line Polygon
Not applicable A join point is
matched to a target polygon that contains it.
A join point is matched to a target polygon that it intersects or in inside of.
Point Polygon
Dr. Ragab Khalil KAAU - FED – LA561: GIS 30/34
Spatial join Spatial join
• Layers are joined based on geometry
Dr. Ragab Khalil KAAU - FED – LA561: GIS 31/34
Spatial join Spatial join
• Layers are joined based on geometry
Dr. Ragab Khalil KAAU - FED – LA561: GIS 32/34
Spatial join: containment Spatial join: containment
• Records are joined for features within other features
• polygon attributes are
attached to points
• related fields can be used for display
Spatial join: proximity Spatial join: proximity
• Appends tables and automatically adds
distance field distance from each plot center point
to the closest road line
Dr. Ragab Khalil KAAU - FED – LA561: GIS 34/34
Summary Summary
• Select by location
• Spatial join