SpatialAnalysis&Modeling 2
SpatialAnalysis&Modeling 2
Reading material
Compiled by
Serawit Mengistu
2023
3/16/2023 1
Contents to be covered
3. Spatial Analysis
o Military organizations
imagery)
o Utility companies
undetermined.
losses.
results.
surfaces).
– representation,
– description,
– measurement,
– comparison and
subsetting.
• Spatial operations on raster objects include subsetting and
of our planet.
• In scale :
their locations.
– understand,
– navigate, and
spatial analysis.
Functions of Spatial Analysis
different techniques.
• So, spatial analysis allows you to solve complex
between them.
• In general: Spatial analysis allows you to:
– Determine relationships
– Make predictions
• What to analyze
• Where to analyze
• Who analyze
Decision making or
modeling.
How Does Spatial Analysis Work?
data gathering from various sources such as LiDAR and airborne systems.
as one needs to highlight crucial elements that reveal the findings. Such tasks
are made easier with data visualization tools that use tables, charts, and
stakeholders.
1. Queries
3. Topological Analysis
4. Network Analysis
5. Reclassification
6. Neighbourhood Analysis
1. Queries
produced.
Attribute Query (Boolean Selection)
table. So you look for records in attribute table and make queries.
Boolean algebra (and, or, nor),set algebra (>, <, =, >=, <=),
GIS compares the values in an attribute field with a query expression that you
define.
• Eg. ‘Select’ areaha greater than 1. ‘select’ areaha less than or equal 5.
file/table, spatial selection chooses features from the map interface. In most
cases, it selects features from one layer that fall within or touch an edge of
relationships (intersect, contain, touch etc.) with features from another layer. In
QGIS, this functionality is available via the Select by Location and Extract
•
•
Select points which overlay with polygon
ArcGIS
2. Measuring distance and connectivity
network distance.
land,
inside GIS.
Measuring Distance
Most GIS programs have a ruler button that allows you to measure
After clicking the button, you point on the map where you want to
begin your distance measurement and then click at the ending point
(or intervening points that define the path you want to measure).
Measurement
5 KM
X Y
Distance
B
A D
C
Perimeter
Area/size 10 km2
It is determined by resolution.
photo/satellite image?
3. Topological Analysis
ask about how geometric features, i.e. points, lines and polygons are spatially
related.
unclosed polygons,
of interconnected outlets.
linear features.
• A network structure consists of nodes and edges that represent routes upon
• Nodes represent objects we are going to analyze while edges represent the
circuits.
• The most common network analysis is finding the shortest path between
two points.
• EXAMPLE:
– links,
– turns,
– stops,
– barriers and
– centers.
5. Reclassification Analysis
class.
geometry.
URBAN URBAN
RESIDENTIAL URBAN
INDUSTRIAL
RURAL
AGRICULTURE
RURAL
RURAL
FOREST
• Requires 4 parameters
neighbourhood.
ii. Has the entity's location, extent, or attributes changed over time?
iv. Questions concerning multiple geographic entities
– Do they overlap?
another?
design of a city.
phenomenon.
• Pattern is the geometric or regular arrangement of
something in an area.
street.
certain place.
– answer questions,
– support decisions,
spatial context.
Query or selection.
• A query chooses a subset of records from the database.
features.
– Spatial and
– Non-spatial query
Spatial Query
map features.
• Spatial queries, or questions, come in several
forms.
dataset.
• There are three broad categories of spatial questions:
map.
relations.
earthquake?
• Topology questions ask about how the geometric features, i.e.
– Do they cross?
– Do they overlap?
among features.
attribute records.
• Attribute queries ask for information from the tables associated
– Numeric values
– Text strings
– Dates
– Select by attribute
• Select by attribute
layer.
Methods of selection in QGIS
• Beyond selecting features with the mouse, you can perform
• Select By Expression…
Select By Expression…
Spatial Joining
• Spatial data joining applies the same concept, but instead relies on spatial
relations. As with attribute data, joining adds new columns to the target object
• The process is illustrated by the following example: imagine you have ten points
randomly distributed across the Earth’s surface and you ask, for the points that
are on land, which countries are they in? Implementing this idea in a reproducible
example will build your geographic data handling skills and show how spatial
joins work. The starting point is to create points that are randomly scattered over
ArcGIS?
• When you have matching unique IDs in two tables, you can
• A table join appends all the columns from one table into the
select “Joins and Relates” > Join. From here, you have
identifier.
• Relate Example with 1: M Relationship
Spatial Analysis
GIS Analysis Functions
reasoning.
against the question that which analysis function you want to use and
1. Overlay,
2. Extract and
3. Proximity operations.
1. Overlay analysis
with another.
This operation combines the geometries and attributes of two feature layers
to create output.
Overlay Analysis
Point-in-polygon overlay
Line-in-polygon overlay
Polygon-on-polygon overlay
10
3
Point-in-polygon overlay
Line-in-polygon overlay
4
10
Polygon-on-polygon overlay
Examples of overlay analysis functions
• Intersect
• Union
• Identity
• Erase
• Symmetrical Difference
• Update
• Spatial Join
1. Intersection tool
• This tool builds new feature from the intersecting features common
• The features that are common to all inputs will be written to the
polygon).
• The output geometry can only be of the same geometry as the
• It preserves only those features that fall within the area extent
• The output features will have the attributes of all the input
polygon.
• All polygons from both coverages will be split at
coverage.
• This tool combines the portions of features that overlap the identity
• Input Features that overlap Identity Features get the attribute information
• This tool updates the attributes and geometry of an input feature class or
• Replaces the input with the update coverage polygons using a cut and
paste operation.
• The new data is added to older one and the output include both of them.
or
Dissolve Function
Reading assignment
processing or analysis.
Used to create a new subset from the input features based on spatial or
attribute query.
Similar to queries and selection sets, extraction functions can reduce the
– Clip
– Select
– Split
– Table Select
i. Clip
• Extract features from input feature class that overlap with a clip
feature class.
• The Clip tool is similar to the Intersect tool, however, Clip tool
does not transfer any attributes from the clip feature class to the
output.
• Clip is useful for developing a subset of features from a series of existing data
feature class.
Select
Select
Extracts features from an input feature class or input feature layer, typically using a
output
Extracts features from input feature class and stores in new output feature class.
• Eg. Urban planner might wish to look at only double-line streets in the particular
municipality of interest. In this case, he or she would execute a selection query to extract
only those desired features to a new layer
iii. Split
• This tool split portion of the input feature class into multiple feature
classes.
layer
Input output
• The split feature dataset must be polygons
iv. Table Select
table.
topographic functions.
• Proximity operation identify features that are closest to one
2. Theissen polygon
4. Near
5. Point Distance
1. Buffer
specified distance.
• eg. Buffer point, Road and lake with 30 meters. Question that can be answered
• What exist 30m away from road to the left and right side?
Area/Polygon
2. Thiessen Polygons Analysis
It Creates Thiessen polygons from point input features.
Each Thiessen polygon contains only a single point input feature. Any location
within a Thiessen polygon is closer to its associated point than to any other
• This tool is used to divide the area covered by the point input features into Thiessen
or proximal zones. These zones represent full areas where any location within the
zone is closer to its associated input point than to any other input point.
3. Multiple Ring Buffer
• Creates a new feature class of buffer features using a set of buffer
values.
Eg. To know the effect of factory waste discharge on community living around.
1. 50m buffer from the factory… more severely affected
2. 100m buffer from the factory… affected
3. 150m buffer from the factory ….less affected
4. 200m buffer from the factory …not affected
You can try another examples that can be analyzed by using multiple ring buffer
4. Near
• Computes the distance from each point in a feature
class.
5. Point Distance
• Computes the distances between point features in one
• Network analysis
• 3D analysis
Advanced Vector-based Analyses
and polygon.
• Location
• Shape
• Topology
Network Analysis
location to another.
points.
o connectivity,
analysis.
• Nodes represent objects we are going to analyze while edges represent the
of events or objects.
• The hot spot analysis tool assesses whether high or low values of
events like:
• number of crimes,
• accident severity,
• intensifying,
• diminishing, and
• It will also check the Analysis Field to confirm that the values have
• Outliers are features that are much far away from neighboring
– Map grids
– Ellipses
ArcGIS.
third dimension.
making it digital.
3.3. Raster-based Analyses
Raster-based Analyses
• Raster data analysis is based on cells and can be
patterns in data.
• It is known as cell by cell combination or operation.
vector overlay
evaluation.
• Such features include slope, aspect, viewshed, elevation, contour lines, flow,
• basic visualization,
• modeling, or
maps.
math.
• Map algebra operations tend to be fast, because raster datasets only
be calculated by using its matrix position and the resolution and origin
cell is barely relevant as long as we make sure that the cell position is
still the same after the processing. Additionally, if two or more raster
datasets share the same extent, projection and resolution, one could treat
– First, the headers of the raster datasets are queried and (in cases
• Here are the types of map algebra operations that you can use:
– Local
– Focal
– Zonal
– Global
1. Local Operations
• The simplest approach is map algebra on a cell-by-cell basis.
raster. Raster algebra also allows logical operations such as finding all
specific overlay.
local function
2. Focal Operations
• Focal operations are spatial functions that compute an output value
operations.
• While local functions operate on one cell, though possibly from
typically of size 3-by-3 cells (that is the central cell and its
shifts in position.
• The value of the output cell may be the average of all the cells of
with categorical values, defines the zonal filters (or ‘zones’) in the
characteristics. It calculate a statistic within the zones for each cell in a raster.
which is why this operation is also known as zonal statistics in the GIS
operations are descriptive statistics for the entire raster dataset such as the
minimum or maximum .
• The output value of each location is a function of all the cells in input
grid.
• globally in a raster.
• Aside from that, global operations are also useful for the computation
of distance and weight raster. In the first case, one can calculate the
distance from each cell to a specific target cell. For example, one
interested in the pure distance but would like also to avoid the
• Here are examples of operations that you can use for map algebra:
ArcGIS
Viewshed Analysis
• Viewshed analysis is a computational algorithm that delineates the
• The analysis uses the elevation value of each cell to determine the
includes all surrounding points that are in line-of-sight with that location and
excludes points that are beyond the horizon or obstructed by terrain and other
• Each cell in the output raster receives a value that indicates how many observer
highway?
o Urban Planning
o Conservation projects
o Military purpose
Density And Distance Analysis
• Distance Measurement
• Euclidean distance gives the distance from each cell in the raster output
• Calculates the shortest straight distance from each cell to its nearest
source cell.
• Assigns each cell the value of its nearest source cell (Euc-Allocation)
• Calculates the direction from each cell to its nearest source cell (Euc-
Direction)
• For example,
– you might have a point value for each town representing the total
number of people in the town, but you want to learn more about
– Since all the people in each town do not live at the population
point layer.
3.4 Site Selection Analysis
• Site selection or suitability analysis is a type of analysis
something.
completed.
• Site selection analysis is used in GIS to select the best
various criteria from which the GIS software can rate the
work.
• Potential sites used in suitability analysis can include the
location of a:
• new hospital,
• store or school
• Stadium
• Market site
• Hotels
decision.
– Site location
– Land use
– weighting them
• Exisitng school data, Elevation data, Land use data, Population data
• In case of Teff
• After defining data to be used, you going to assign weight based on criteria set. Eg.
Incase of teff, the rainfall below expect, as expected and above expected should get
different weight.
4. Advanced Spatial
Analyses
• 4.1. Spatial Interpolation
points
• It can be used to predict unknown values for any geographic point data's: like
• elevation,
• rainfall, temperature
• chemical concentrations,
• noise levels,
• Instead, dispersed sample point locations can be predicted and value can be
Time, Money
Missing data.
Types of interpolation Models
1. Deterministic models:
• These are models that predict and produce surface only considering
distance.
– Natural-neighbours and
– Spline.
2. Statistical Methods
• Statistical methods are based on statistical models that include autocorrelation (statistical relationships
among the measured points). Not only produce a prediction surface, but can also provide some measure
– Simple Kriging: defined as a variety of Kriging that assumes that local means are relatively
constant and equal to the population mean, which is well known. The population mean is used
as a factor in each local estimate along with the samples in the local neighborhood.
– splits the random function into a linear combination of deterministic functions, known at any point
of the region, and a random component, the residual random function. For example, you may
know that there is a prevailing wind or a gently sloping hillside across your study area.
Deterministic models:
– In this method, sample point influence declines with distance from unknown
point.
– IDW assumes that each input point has influence that diminishes with
distance.
– It weights the points closer to the processing cell greater than those further
away.
averaging process.
• The term "inverse distance“ is about, the weight is inversely proportional to the
distance.
IDW
• Data points that lie progressively farther from the node influence the computed
• Advantages
• Can estimate extreme changes in terrain such as: Cliffs, Fault Lines.
• Dense evenly space points are well interpolated (flat areas with cliffs).
• Disadvantages
• It is most appropriate where sample data points are distributed with uneven
density.
• The method thereby allows the creation of accurate surface models from data
sets that are very sparsely distributed or very linear in spatial distribution.
• Natural Neighbour makes use of area-weighting technique to determine new value
• The new grid value is calculated as the average of the surrounding point values
• Advantages
surface curvature, resulting in a smooth surface that passes exactly through the
input points.
smooth surface.
• elevation,
• pollution concentrations.
• There are two spline interpolation methods
i. Regularized Method
• This method creates a smooth, gradually changing surface with values that may
• In regularized spline interpolation, the higher the weights, the smoother the
surface.
• The more input points you specify, the more each cell influenced by distant
• Disadvantages
• Cliffs and fault lines are not well presented because of the smoothing
effect.
• When the sample points are close together and have extreme differences in
•The weights are based on the over all spatial arrangement among the
measured points.
•
Weights are based on:
distance.
• The speed of execution is dependent on the number of points in the input dataset
• Low values within the optional output variance of prediction raster indicate a
high degree of confidence in the predicted value. High values may indicate a
• It minimize the error and set the mean prediction errors to zero.
• There are no over-or under-estimates during kriging.
-Ordinary Kriging:
-Universal Kriging
• Three step procedure is recommended during interpolation:
2. Apply interpolation method which is most suitable to both sample data and study objectives
3. Compare the results and find the best result and the most suitable method.
This may look like a time consuming process at the beginning. However, as
time required for generating the most suitable surface will be greatly reduced.
4.2. Cost-distance Analysis
Cost Distance Analysis
• This analysis used to determine the least costly path to reach a source for each
• The cost distance tools calculates the actual distance from one location to
another.
• The cost distance tools determine the shortest weighted distance (travel cost)
• So, weighted distance analysis includes the shortest distance and cost.
• The shortest path is the process of finding a path between two vertices.
– Find the shortest path through a street network between two places
– Connect the best habitat areas for wildlife species to move between the patches.
Eg. If you asked to design new road from Wondo Genet to Hawassa?, cost-distance analysis
looks for: (where the new road passes? Through mountain, watershed, farmland, settlement or
openland? According payment for compensation, which one is least cost? Is that better through
mountain/ farmland, etc incase of both cost and distance? This is how cost distance is done.
The cost distance tools are the following:
• Cost Distance: gives the distance to the nearest source for each cell based on the
least-accumulative cost.
• Cost Back Link: identifies accumulative cost for each cell to return to closest
source location,
• Cost Allocation: gives the nearest source for each cell, based on least-
• Cost Path: gives the path with the least cost from a source to a destination.
regions.
4.3. Different spatial Operations
– Local
– Neighborhood:
– Zonal
– Regional
1. Local Operations Overview
analysis.
• In the raster based analysis either the logical or arithmetic operators are
used. Logical overlay use operators AND, OR, and XOR (exclusive OR).
• Convolution
• It is used to filter images for specific reasons like; to remove noise, to remove
focal cell.
Common Applications
– Data simplification
– Terrain analysis
– Image processing
– Site selection
3. Zonal Operations
(zones)
value)
Applications
than zone.
characteristics.
• Terrain Analysis;
• Slope gradient,
• DEM,
• TIN,
terrain evaluation.
• basic visualization,
• modeling, or
geography affects.
• Terrain analysis is a system for the in-/output, modeling, management,
• slope,
• aspect,
• view-shed,
• contour-lines,
• slope is defined as the rise and fall of the terrain surface, also
horizontal plane.
incline.
•Topography: Measuring the slope’s height differences at all points in the terrain
•Material Strength: Determine which building methods will be appropriate for proposed slope
•Soil Water Content: Planning for proper irrigation & storm-water mitigation around the slope
•Vegetation: How the area’s trees, shrubs, and grass contribute to overall stability
sliding.
• Eg. To construct new building, you have to analyze slope, soil water content, vegetation
• Landslide potential
• Storms
• Erosion
• suitability analysis
• hydrology,
• site planning,
• conservation, and
• infrastructure development.
• The values of the output raster will be the compass direction of the
Biodiversity studies.
Direction a
slope faces
Viewshed Analysis
location.
Digital Elevation Model (DEM)
a topographic surface.
topography.
• DEM is a representation of the bare ground (bare earth) topographic
• trees,
• buildings, and
• DEMs are files that contain either points (vector) or pixels (raster),
• free of vegetation,
• buildings and
features;
environment;
•The highest resolution DEM data set for the entire world has ground resolution of
~1 km.
•For much of US, National Elevation Dataset contains of ~30 m and 10 m, resolution
data.
•SRTM1 with 2km DEM data are also available for the United States.
3. Regional Digital Elevation Models
or as percent slope.
• terrain roughness;
• Interpolation algorithm;
Watershed delineation
Rendering of 3D visualizations
Line-of-sight analysis
Base mapping
Archaeology
Commonly Used Terrain Variables
Variable Description Importance
Slope Rise relative to a horizontal Water flow, flooding, erosion, travel time, construction
Aspect Downhill direction of steepest Insolation, temperature, vegetation, soil characteristics and
Upslope area Watershed area above a point Soil moisture, water runoff volume and timing, pollution or
erosion hazards
Flow length Longest upstream flow path to Sediment and erosion rates
a point
viewpoints
Contour Lines
elevation .
elevation.
elevation.
as contour interval.
The contour interval may be large when the ground is of steep slope.
characteristics of Contour
method.
The direct method,
an engineering study
Indirect method,
locations.
by judgment.
How contour is made practically on the ground?
m³)
• watershed is defined as any surface area from which runoff
– land use,
– land change,
– soil types,
– geology and
and drains off into a common outlet, such as into a river, bay, or
given cell.
• The flow accumulation value for each pixel is the sum of all flows
– perhaps identify areas with a high risk of flooding so that we can formulate
– In using GIS to help make these decisions, we need to represent some part of
the real world as it is, as it was, or perhaps as we think it will be. We need to
restrict ourselves to ‘some part’ of the real world simply because it cannot be
represented completely.
• The fact that we can only represent parts of the real world teaches
system: all the data it can possibly generate for us in the future will
structure data from the real world plays a key part in this process.
Spatial analysis and Modeling
Cartographic modelling
– Set of interacting, ordered map operations that act on raw data as well as
derived and
analysis
data for most of human history has been the map—whether paper,
• Also, the map has been the primary way of both storing
• ‘Modelling’ is a term used in many different ways and which has many different
• Specifically, those which we have identified in our model design. This then
allows us to study and operate on the model itself instead of the real world in
order to test what happens under various conditions, and help us answer ‘what if’
questions.
• We can change the data or alter the parameters of the model,
steps
these processes.
• Spatial Modeling refers to the process of using spatial
different meanings.
• Spatial modeling is an analysis methodology; it produces information
criteria/relationships.
map.
• ModelBuilder is an application you use to create, edit, and manage
model?
• There are 2 types of Data Modeling.
• Representation modeling
• Process modeling
1. Representation Modeling
• Represent the objects of real world through a set of layers (Data Models).
a workspace.
diagram.
• Throughout your GIS education, you've performed several
geoprocessing tasks
data
document models.
building workflows.
Example: ModelBuilder
Framework of Model builder
• ModelBuilder is an application you use to create, edit,
executed as needed.
• While ModelBuilder is useful for constructing and
• This feature class is fed into an iterator that loops over each individual point and feeds the point
into the Select Layer By Location tool, where all addresses (parcels) within 1 mile of the point are
selected. These addresses are then passed to a custom script tool, Generate Mailing List in HTML
format. Finally, the mailing list is fed to another custom script tool, Send Email Notifications,
which runs a custom executable that sends email notifications and produces a success code.
The benefits of Model Builder are:
workflow.
• Models can be reused and shared, and are easy to modify if necessary.
• Models are much more convenient than running many tools individually
• Re-run the analysis to experiment with different parameters to see how results
are affected
• Provide other users (e.g. operations staff) with an exact workflow that they
can replicate
The Elements of ModelBuilder
• Model diagram window
– Input variable
– Tool
– Derived data variable
• Toolbar
– Add Data or Tools
– Layout
– Zoom and Pan
– Add connection
– Run
6.3. New Integrated Model Window
It contains:
1. ModelBuilder
1.1. Graphic interface
1.2. Elements
– Coverages
– Shapefiles
– Grids
• Run model
• Ready to run
Toolbar.
• This checks that all of your model parameters are correct and that
320
ModelBuilder Design Principles
• Classification
• Attribution
• Association
• Navigation
•Validate a model to ensure that all of its tools will run properly.
•Set model parameters to allow the model to run with different data or
criteria.
– Suitability analysis
– Watershed delineation