Lecture 8 - Spatial Analysisv2
Lecture 8 - Spatial Analysisv2
*If this material was edited, revised or updated, kindly fill-up the table
with required details accordingly.
Copyright Notice
• Copyright © 2020-2021 by All Authors/Contributors and Department of Geodetic Engineering, College of
Engineering and Geosciences, Caraga State University, Butuan City.
• All rights reserved. Unless otherwise indicated, all materials on these module are copyrighted by the entities
indicated above.
• No part of this module maybe reproduced, stored in a retrieval system, or transmitted in any form or by any
means, without either the prior written permission or authorization of Authors/Contributors and the
Department of Geodetic Engineering, College of Engineering and Geo-Sciences, Caraga State University,
Butuan City.
• IMPORTANT: The PowerPoint file shall never be distributed to other parties (including students). Only a PDF of
this file shall be distributed to students of the course only. Distribution of the PDF to other parties except
students should have prior permission or authorization of Authors/Contributors and the DGE of CEGS, CSU.
Presentation Outline
• What is Spatial Analysis?
• Basic Primitives
• Basic Spatial Analysis
• Raster Data Analysis
• Surface and Field Analysis
Expected Outcomes
At the end of this lecture, the students would be able to:
• Define spatial analysis concepts, operations and its examples
• Identify the basic primitives as the building blocks of spatial analysis
• Review the ways on how to undertake in modelling spatial world
• Determine different basic spatial analysis geoprocessing operations
and its sample applications
• Identify various spatial analysis functions for raster data models
• Discuss spatial analysis techniques involving surface elevation models
Part 1
• What is Spatial Analysis?
• Basic Primitives
• Basic Spatial Analysis
• Raster Data Analysis
• Surface and Field Analysis
Spatial Operations
• Spatial data follows this sequence of operations:
Data Pre- Analysis/ Map
Acquisition processing Manipulation Generation
Decision
Applied to Real World/ Making/
Evaluation/ Validation Planning
Spatial Operations
• Spatial operations can be applied sequentially to solve problem.
• A chain of spatial operations is often applied, with the output of each
spatial operation serving as the input of the next.
A sequence of spatial operations is often applied to obtain a desired final data layer.
Spatial Operations
• There are operations that generate several output data layers from a single input.
• Operations may also take several input layers to generate a single output layer.
Much basic spatial data analysis consists largely of spatial operations. These operations are
applied to one or more input data layers to produce one or more output data layers.
What is Spatial Analysis?
• It is the manipulation of spatial
data into various forms to be
able to extract additional and
meaningful information to
understand the real-world.
• It is used to gain new
understanding and to test models
and theories.
What is Spatial Analysis?
• Spatial analysis can reveal things that might otherwise be invisible – it
can make what is implicit explicit.
• It is the crux of GIS, the means of adding value to geographic data,
and of turning data into useful information.
• Effective spatial analysis requires an intelligent user, not just a
powerful computer.
• Spatial analysis helps us in situations when our eyes might otherwise
deceive us.
• It is a set of methods whose results change when the locations of the
objects being analyzed change.
What is Spatial Analysis?
• Spatial analysis lets us ask, and find answers to, a wide range of
questions that fall into six broad categories:
➢ Understanding where things are or where events occur
➢ Measuring sizes, shapes, and distributions of things or measurements
➢ Analyzing relationships and interactions between places
➢ Optimizing locations for facilities, or routes for transportation
➢ Detecting and quantifying patterns and relationships between things or
measurements
➢ Making predictions based on existing or theoretical patterns and relationships
Part 2
• What is Spatial Analysis?
• Basic Primitives
• Basic Spatial Analysis
• Raster Data Analysis
• Surface and Field Analysis
Conceptual Frameworks
Basic Primitives
• The building blocks for any form of spatial analysis
• Refer to the place or places of interest, their attributes and their arrangement.
• These are the basic primitives of spatial analysis:
➢ Place
➢ Attributes
➢ Objects
➢ Maps
➢ Multiple properties of places
➢ Fields
➢ Networks
➢ Density
➢ Detail, resolution and scale
➢ Topology
Conceptual Frameworks: Basic Primitives
Place • The center of all spatial analysis
Attributes • Places often have names, and people use these to talk
about and distinguish between places
Objects
• People associate a vast amount of information with
Maps places
Multiple Properties of Places • Coordinate system is the basis for rigorous and precise
definition of a place
Fields
Networks
Density
Topology
Conceptual Frameworks: Basic Primitives
Place
• It refers to records in a data table associated with
Attributes individual features in a vector map or cells in grid
• Examples: name of place, address, measured values
Objects
(elevation, temperature, etc.), results of classification
Maps (land cover)
Multiple Properties of Places
Fields
Networks
Density
Topology
Conceptual Frameworks: Basic Primitives
Place
• Since places vary enormously in size and shape, they
Attributes are referred to as “objects” in spatial analysis
• Representation of objects: points, lines, and areas
Objects
Maps
Fields
Networks
Density
Topology An example map showing points, lines, and areas appropriately symbolized
Conceptual Frameworks: Basic Primitives
Place • The primary means to store and communicate spatial data
Attributes • Objects and their attributes can be readily depicted
Objects
Maps
Multiple Properties of Places
Fields
Networks
Density
Objects
Maps
Fields
Networks
Density
Topology
Conceptual Frameworks: Basic Primitives
Place • Field is a continuous function mapping every location to the
Attributes value of some property of interest.
• In continuous-field view, reality is a collection of continuous
Objects surfaces, each representing the variation of one property
(elevation) over the Earth’s surface
Maps
Fields
Networks
Density
Topology (Left) Noise level raster; (right) filled contour view of field data.
Conceptual Frameworks: Basic Primitives
Place • Networks constitute one-dimensional structures embedded
Attributes in two or three dimensions
• They include streets, roads, railroads, and highways; rivers,
Objects canals, and streams
Maps
Fields
Networks
Density
Topology
Conceptual Frameworks: Basic Primitives
Place • One of the more useful concepts in spatial analysis
Attributes • The density of some kind of object is calculated by counting
the number of such objects in an area, and dividing by the
Objects size of the area.
Maps
Fields
Networks
Density
Detail, Resolution, and Scale
Topology
Conceptual Frameworks: Basic Primitives
Place • In spatial analysis, it is clearly impossible to build a representation
that includes every detail, and in reality decisions must be made
Attributes about the amount of detail to include.
Objects • Spatial resolution is the term given to a threshold distance below
which the analyst has decided that detail is unnecessary or
Maps irrelevant.
Fields
Networks
Density
Topology
Conceptual Frameworks: Basic Primitives
Place
Attributes
Objects
Maps
Fields
Networks
Density
Topology
Conceptual Frameworks: Basic Primitives
Place
Some generalizations made on spatial data to address
Attributes issues on detail, resolution and scale:
• Preselection: deciding on which features to include and which to
Objects exclude (e.g. major roads only, ignore footpaths etc.)
Maps • Elimination: removal of features that are too small/short (below
some threshold)
Multiple Properties of Places • Simplification: simplifying (smoothing, straightening) linear or
polygon boundaries whilst retaining their basic form
Fields
• Aggregation: combining distinct features into a larger composite
Networks object (e.g. a cluster of houses into a polygonal ‘urbanized area’)
• Collapse: reduction of feature dimensionality, as for example when
Density
a town is represented by a point or a broad river by a line
Detail, Resolution, and Scale
Topology
Conceptual Frameworks: Basic Primitives
Place Some generalizations made on spatial data to address issues
Attributes on detail, resolution and scale:
• Typification: reduction of the level of detail by replacing multiple
Objects objects by a smaller number of the same objects occupying
broadly the same locations
Maps
• Exaggeration: emphasizing important features that might
Multiple Properties of Places otherwise be removed
• Classification and symbolization: grouping together similar
Fields features and using different symbology to represent the new
arrangement
Networks
• Conflict resolution (displacement): identifying and resolving feature
Density conflicts (e.g. overlaps, labeling), and
• Refinement: altering feature geometry and alignment to improve
Detail, Resolution, and Scale aesthetics
Topology
Conceptual Frameworks: Basic Primitives
Place
• In mathematics, a property is said to be topological if it
Attributes survives stretching and distorting of space.
Objects
Maps
Fields
Networks
Density
Topology
Part 4
• What is Spatial Analysis?
• Basic Primitives
• Basic Spatial Analysis
• Raster Data Analysis
• Surface and Field Analysis
Basic Spatial Analysis
• Selection and Classification • Overlay
➢ Set Algebra ➢ Raster Overlay
➢ Boolean Algebra ➢ Vector Overlay
➢ Spatial Selection Operations
➢ Classification • Network Analysis
➢ Shortest Path Analysis
• Dissolve
➢ Closest Facility
• Proximity Functions and ➢ Allocation
Buffering
➢ Location-Allocation
➢ Buffers
➢ Raster Buffers ➢ Geocoding
➢ Vector Buffers
Basic Spatial Analysis
Selection (Query)
• Selection operations identifies features
that meet one to several conditions or
criteria.
• In these operations, attributes or
geometry of features are checked against
criteria, and those that satisfy the criteria
are selected.
• These selected features may then be
written to a new output data layer, or the
geometry or attribute data may be
manipulated in some manner.
Set Algebra
• Set algebra uses the operations less than
(<), greater than (>), equal to (=), and
not equal to (< >).
• These selection conditions may be
applied either alone or in combination to
select features from a set.
• Containment identifies features that are ‘contained by’ or ‘contain’ other features
Vector buffers produced from point, line, or polygon input features. In all cases the output is
a set of polygon features.
Basic Spatial Analysis
Proximity: Thiessen Polygons
• Thiessen polygons have the unique
property that each polygon contains only
one input point, and any location within a
polygon is closer to its associated point
than to the point of any other polygon.
• Thiessen polygons can be used to
apportion a point coverage into regions
known as Thiessen or Voronoi polygons.
• Each region has the unique property that
any location within a region is closer to
the region's point than to the point of any
other region.
Basic Spatial Analysis
Overlay
• Overlay operations are powerful spatial
analysis tools, and were an important
driving force behind the development
of GIS technologies.
• Overlays involve combining spatial and
attribute data from two or more spatial
data layers, and they are among the
most common and powerful spatial This is an example of an overlay of steep slopes, soils, and
data operations. vegetation. New polygons are created by the intersection of the
input polygon boundaries. The resulting polygons have all the
attributes of the original polygons.
Basic Spatial Analysis
Vector Overlay
• Overlay when using a vector data model
involves combining the point, line, and
polygon geometry and associated attribute
data.
• Overlay involves the merger of both the
coordinate and attribute data from two
vector layers into a new data layer.
• Types: Point-in-Polygon, Line-in-Polygon,
Polygon-on-Polygon
• Vector overlay tools:
➢ Identity
➢ Intersect This is an example of line-on-polygon overlay. The line is split at
➢ Symmetrical Difference the polygon boundaries, and each of the resulting line features has
➢ Union the original line attributes plus the attributes of the polygon it fell
➢ Update within.
Basic Spatial Analysis: Types of Overlay
Point-in-Polygon Overlay
• This type of overlay is used to find the polygon in which a point falls within, or find
a point or points that fall within a certain polygon.
Basic Spatial Analysis: Types of Overlay
Line-in-Polygon Overlay
• This type of overlay is used to find the polygon in which a line or lines fall within,
or find a line or lines that fall within a certain polygon.
Basic Spatial Analysis: Types of Overlay
Polygon-on-Polygon Overlay
• This type of overlay is used to determine which polygons from two layers intersect
or are within another polygon.
Basic Spatial Analysis: Vector Overlay Tools
Identity
• This analysis computes a geometric
intersection of the input features and
identity features.
• The input features or portions thereof
that overlap identity features will get
the attributes of those identity features.
Basic Spatial Analysis: Vector Overlay Tools
Intersect
• This analysis computes a geometric
intersection of the input features.
• Features or portions of features which
overlap in all layers and/or feature
classes will be written to the output
feature class.
Basic Spatial Analysis: Vector Overlay Tools
Symmetrical Difference
• Features or portions of features in the input and update features that do not
overlap will be written to the output feature class.
Basic Spatial Analysis: Vector Overlay Tools
Union
• This analysis computes a geometric
union of the input features.
• All features and their attributes will be
written to the output feature class.
Basic Spatial Analysis: Vector Overlay Tools
Update
• This analysis computes a geometric
intersection of the Input Features and
Update Features.
• The attributes and geometry of the
input features are updated by the
update features in the output feature
class.
Basic Spatial Analysis
Raster Overlay
• Raster overlay involves the cell-by-cell
combination of two or more data layers.
• Data from one layer in one cell location
correspond to a cell in another data layer.
• The cell values are combined in some
manner and an output value assigned to a
corresponding cell in an output layer.
• Raster overlay tools:
➢ Zonal Statistics
➢ Combine Cell-by-cell combination in raster overlay. Two input layers are combined in
➢ Weighted Overlay raster overlay. Nominal variables for corresponding cells are joined, creating
➢ Weighted Sum a new output layer. In this example, a soils layer (Layer A) is combined with
a land use layer (Layer B) to create a composite Output layer.
Basic Spatial Analysis: Raster Overlay Tools
Zonal Statistics
• Compute statistics for each zone of a zone dataset based on the information in a
value raster
• Zone dataset can be feature or raster
• The value raster must be a raster
In the illustration, the two input rasters have been reclassified to a common measurement scale of 1 to 3. Each raster is assigned
a percentage influence. The cell values are multiplied by their percentage influence, and the results are added together to create
the output raster. For example, consider the upper left cell. The values for the two inputs become (2 * 0.75) = 1.5 and (3 * 0.25)
= 0.75. The sum of 1.5 and 0.75 is 2.25. Because the output raster from Weighted Overlay is integer, the final value is rounded to
2.
Basic Spatial Analysis
Network Analysis
• Network analyses, also known as
network models, are used to represent
and analyze the cost, time, delivery,
and accumulation of resources along
links and between the connected
centers.
• Involves linear features or network of
linear features that are topologically
structured
➢ e.g., roads, powerlines, telephone and
television cables, and water distribution
systems
Basic Spatial Analysis
Shortest Path Analysis
• Shortest path analysis finds the path
with the minimum cumulative
impedance between nodes on a
network.
• Because the link impedance can be
measured in distance or time, a
shortest path may represent the
shortest route or fastest route.
Link impedance values between cities on a road network.
Basic Spatial Analysis: Network Analysis
Closest Facility
• Closest facility is a network analysis
that finds the closest facility among
candidate facilities to any location on a
network.
• The analysis first computes the
shortest paths from the select location
to all candidate facilities, and then
chooses the closest facility among the
candidates.
The two solid squares represent existing fire stations, the three gray squares
candidate facilities, and the seven circles nursing homes. The map shows the
result of matching two existing fire stations with nursing homes based on the
minimum impedance model and an impedance cutoff of 4 minutes on the
road network.
Basic Spatial Analysis
Geocoding
• Geocoding is the process of transforming
a description of a location – such as a pair
of coordinates, an address, or a name of a
place – to a location on the earth's
surface.
• You can geocode by entering one location
description at a time or by providing many
of them at once in a table.
• The resulting locations are output as
geographic features with attributes, which
can be used for mapping or spatial
analysis.
Part 5
• What is Spatial Analysis?
• Basic Primitives
• Basic Spatial Analysis
• Raster Data Analysis
• Surface and Field Analysis
Raster Data Analysis
• Raster analyses range from the simple to the complex, largely due to
the early invention, simplicity, and flexibility of the raster data model.
• Raster data analysis can be performed at the level of individual cells, or
groups of cells, or cells within an entire raster.
• An important consideration in raster data analysis is the type of cell
value.
➢ Statistics such as mean and standard deviation are designed for numeric
values, whereas others such as majority (the most frequent cell value) are
designed for both numeric and categorical values.
Raster Data Analysis
Map Algebra
• Map algebra is the cell-by-cell
combination of raster data layers.
• A vocabulary and conceptual
framework for classifying ways to
combine map data to produce new
maps.
• Can be simple operations such as
multiplication, subtraction, and addition
• Developed in the 1970’s by Dana
Tomlin
Raster Data Analysis
Zonal Operations
• Compute a new value for each cell as a function of the cell values within a zone
containing the cell
• Zone layer – defines zones or regions with same values
• Value layer – contains input cell values
Raster Data Analysis
Zonal Operations
1 1 4 3 3 1 2 3 4 5
1 1 4 3 3 6 7 8 9 1
2 2 2 3 4 2 3 4 5 6
2 1 2 3 4 7 8 9 1 2
1 1 4 4 4 3 4 5 6 7
Zone Layer Value Layer
Zonal Max
8 8 8 9 9
8 8 8 9 9
9 9 9 9 8
9 8 9 9 8
8 8 8 8 8
Output Layer
Raster Data Analysis
Zonal Operations (Outputs)
• Raster layer
➢ All the cells within a zone have the same
value on the output raster layer
• Table
➢ Each row in the table contains the
statistics for a zone.
➢ The first column is the value (or ID) of
each zone.
➢ The table can be joined back to the zone
layer.
Raster Data Analysis
Reclassification
• May be referred to as recoding or renumbering
• Reassign thematic classes/values to new values for:
• generalizing complex dataset (e.g., map of all land ownership reclassified to public and private;
5000+ classes to 2 classes)
• reclassifying data based on attributes (e.g., soils types recoded to soil suitability for septic
systems)
• assigning map classes ordinal values (e.g., best, worst)
• producing a mask (e.g., map of Caraga Region recoded to binary map showing only Butuan
City (1) and everything else (0))
• Two (2) types:
• Boolean Reclassification
• Weighted Reclassification
Raster Data Analysis
Reclassification
Raster Data Analysis
Boolean Reclassification
• Produces a two-coded image from a complex image
• Original image is reclassified to an image with only 0 or 1 as cell values
• Example, if the forest areas are of interest, all cells representing forestry can be
assigned a value of 1, and all other cells a value of 0.
Raster Data Analysis
Weighted Reclassification
• A different weight is assigned to different feature types or classes, based on the
purpose of the reclassification
• Higher weights can be assigned to priority classes while lower weights to those of
lower priority
• Example, if the purpose is for forest conservation, a weight of 4 can be assigned to
forestry and lower weights to other features
Raster Data Analysis
Reclassification Example
Land Use Original Value New Value: Boolean New Value: Weighted
Forestry 10 1 4
Water 11 0 2
Settlement 12 0 1
Agricultural Land 13 0 3
Raster Data Analysis
Density Analysis
• Mapping data density allows the user to
see where there is a larger number of
observations or higher values
• Shows the spatial relationship amongst
the different locations of data
• Can create predictions from the data as to
where other locations or values will be
• Three (3) Types:
➢ Point Density
➢ Line Density
➢ Kernel Density
Raster Data Analysis
Point Density
• Calculates the density of point features across a specific area
• Does this by adding the points in the specified study area and dividing the total by
the area of the study area
Raster Data Analysis
Line Density
• Similar to point density, calculates the denser vs. less dense areas containing line
features
• Calculates the areas that pertain more line features than those that don’t
Raster Data Analysis
Kernel Density
• Can calculate density of either line or point features using a kernel function
• Allows some features to hold more weight than others based on specific values
➢ Ex. When searching for the density of fire hydrants in an area, some hydrants allow for more
water pressure, covering a wider area than others, these will hold more weight than those that
have a lower water pressure
Raster Data Analysis
Kernel Density
• Differences
• Smoother density formations
• Omits the no data values
• The highest values are at the center of the point/line and taper out to 0 at the edge of the
search radius
Part 6
• What is Spatial Analysis?
• Basic Primitives
• Modeling Spatial World
• Basic Spatial Analysis
• Raster Data Analysis
• Surface and Field Analysis
Surface and Field Analysis
• Elevation and related terrain variables
are important at some point in almost
everyone’s life.
• Both data and methods exist to extract
important terrain variables via GIS.
• Most terrain analyses are performed
using a raster data model.
• Common surface and field mapping
techniques include: slope, aspect, and
hillshade, hydrologic functions,
profile plots and contour lines, and
viewsheds.
Surface and Field Analysis
Slope
• Slope represents the rate of change of elevation for each digital elevation model
(DEM) cell.
• It is the first derivative of a DEM.
• The lower the slope value, the flatter the terrain; the higher the slope value, the
steeper the terrain.
Surface and Field Analysis
Slope
• Slope represents the rate of change of elevation for each digital elevation model
(DEM) cell.
• The Slope command takes an input surface raster and calculates an output raster
containing the slope at each cell.
Surface and Field Analysis
Use of Slope Surfaces
• Slope is important in:
➢ Suitability analysis
➢ Predictive modeling
➢ Predicting potential hazards
• Analyzing the terrain slope of a given location plays an important part
in fields such as:
➢ Hydrology
➢ Site planning
➢ Conservation
➢ Infrastructure development
Surface and Field Analysis
Aspect
• Aspect identifies the downslope
direction of the maximum rate of
change in value from each cell to its
neighbors.
• It can be thought of as the slope
direction.
• The values of each cell in the output Aspect directions
raster indicate the compass direction
that the surface faces at that location.
Surface and Field Analysis
Aspect
• It is measured clockwise in degrees from 0 (due north) to 360 (again due north),
coming full circle.
• Flat areas having no downslope direction are given a value of -1.
• The value of each cell in an aspect dataset indicates the direction the cell's slope
faces.
Surface and Field Analysis
Use of Aspect Surfaces
• Calculate the solar illumination for each location in a region as part of a
study to determine the diversity of life at each site.
• Identify areas of flat land to find an area for a plane to land in an
emergency.
• Subdivision planning (e.g., finding the best orientation of subdivision
blocks such that all houses will receive equal amount of sunlight)
• Aspect as well as slope are required in fields such as hydrology,
conservation, site planning, and infrastructure development.
Surface and Field Analysis
Hillshade (Shaded Relief)
• The Hillshade obtains the hypothetical illumination of a surface by determining
illumination values for each cell in a raster.
• It does this by setting a position for a hypothetical light source and calculating the
illumination values of each cell in relation to neighboring cells.
• It can play an important role when planning new buildings or roads especially in
urban settings where obstructed views may raise safety concerns.
Surface and Field Analysis
Watershed
• A watershed is the area of land where
all of the water that falls in it and
drains off of it goes into the same
place or common outlet.
• A watershed is also defined by
topographic divides between two or
more adjacent catchment basins, such
as a ridge or a crest.
• Also called a drainage basin
Source: http://www.gisresources.com/giswatershedwatershed-analysis/
Surface and Field Analysis
Watershed
• A watershed is the upslope area that
contributes flow—generally water—to a
common outlet as concentrated drainage.
• It can be part of a larger watershed and can
also contain smaller watersheds, called
subbasins.
• The boundaries between watersheds are
termed drainage divides.
• The outlet, or pour point, is the point on the Watershed components
surface at which water flows out of an area; it
is the lowest point along the boundary of a
watershed.
References
• Chang, K. 2019. Introduction to Geographic Information Systems. McGraw-Hill Education.
• Longley, P. A., Goodchild, M. F., Maguire, D. J., Rhind, D. W., 2005. Geographic Information System
and Science, 2nd Edition, John Wiley and Sons, Ltd., England.
• Bolstad, P. 2016. GIS Fundamentals: A First Text on Geographic Information Systems, 5th Edition,
XanEdu.
• Aronoff S., 1989. Geographic Information Systems: A Management Perspective. WDL Publ., Ottawa,
Canada
• de By, R. 2001. Principles of Geographic Information Systems: An Introductory Textbook. ITC,
Enschede, The Netherlands.
• de Smith, M.J., Goodchild, M.F., Longley, P., 2015. Geospatial Analysis – A Comprehensive Guide to
Principles, Techniques and Software Tools, 5th Edition, The Winchelsea Press. Available online at:
http://www.spatialanalysisonline.com/index.html
• Fazal, S. 2008. GIS Basics. New Age International (P) Ltd.
• http://www.gisresources.com
• http://desktop.arcgis.com/en/arcmap/10.3
Questions?