gis-e1060 - spatial analytics: map algebra and raster analysis
TRANSCRIPT
![Page 1: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/1.jpg)
GIS-E1060 - Spatial Analytics: Map algebra and raster analysisJaakko Madetoja12.11.2020Slides partly adopted from Kirsi Virrantaus & Paula Ahonen-Rainio
![Page 2: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/2.jpg)
Learning goals
In this session you will learn
• To explain what different types of Map algebra operations are
• To list examples where Map algebra can be used
• To explain what watershed, viewshed and cost surface
analysis are
11.11.2020
2
![Page 3: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/3.jpg)
Grid representation
• Geometry
• Shape of a pixel: usually a square (can be a triangle, a hexagon)
• Square pixel: • 4 neighbors (joint edge)
• 8 neighbors (joint edge or corner)
• Implicit topology
• Joint edge – adjacency (viereisyys)
• Joint edge or corner – connectivity (yhdistävyys)
• Orientation, origin, resolution (size of a pixel/grid cell)
11.11.2020
3
X
X
![Page 4: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/4.jpg)
Applications with raster data
• Environmental applications with source data from satellite images
• E.g., detecting changes in land use, vegetation
• Elevation model based analyses
• Visibility: e.g. locating telecommunication towers, view from a road in landscape planning, military applications
• Slope (kaltevuus) and aspect (suunta): e.g. watershed (vedenjakaja), catchment areas, risk of avalanche
• Analyses on statistical (grid) data (Statistics Finland)
• Terrain and mobility analyses
• For crisis management and military applications, prediction of animal movement, forestry
11.11.2020
4
![Page 5: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/5.jpg)
Raster vs. vector
• Environmental applications: Remote sensing produces raster images
• Elevation and visibility: elevation is continuous; difficult to model with vector
• Statistical grids: Sometimes it might be a better idea to use grid as vector type
• Terrain and mobility analyses: For example shortest route analysis with raster allows mobility everywhere; with vector only on roads
11.11.2020
5
![Page 6: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/6.jpg)
Map algebra (kartta-algebra)
• Developed by Dana Tomlin: “GIS and Cartographic modeling” (ebook)
• Map algebra is a formal language for raster analysis
• Forms the basis of raster operations
• Key concepts:
• Layers: Input1, Input2, …, InputN, Output• Definition of neighborhood, zones• Functions: Min, Max, Boolean, arithmetic,…
11.11.2020
6
![Page 7: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/7.jpg)
Map algebra
• A set of primitive operations, which allows two or more raster layers to produce a new raster layer using operations
• Operations on one pixel, neighborhood, zone or entire layer
• By combining these, one can define a procedure to perform complex tasks
• A formal language, an open standard
• Forms the basis of raster tools in many GISs
• Spatial analyst –toolbox in ArcGIS
11.11.2020
7
![Page 8: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/8.jpg)
Map algebra
• Operations on a raster are of four types
• Local operations are determined by the attributes of one cell, usually for many layers
• Focal operations are determined by a cell and its neighbors
• Zonal operations apply to cells within the same zone
• Global operations compute properties of the entire raster layer
11.11.2020
8
![Page 9: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/9.jpg)
Examples
11.11.2020
9
Bolstad: GIS Fundamentals
plus 4
neighbourhood
maximum
global
maximum
![Page 10: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/10.jpg)
Local functions
• Input1, Input2, … => Output
• Operations on one pixel at a time, e.g.
• Local Difference
• Local Maximum
• Local Ratio
• Local Sum
• Raster version of map overlay
11.11.2020
10
Figure by ESRI
![Page 11: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/11.jpg)
Map overlay
• Example of map
overlay analysis made
by using raster data
on the right. In each
pixel the layer value is
considered and the
chosen operation is
then performed.
11.11.2020
11
![Page 12: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/12.jpg)
Examples
• Operations can also be Boolean:
• On each layer, possible values for each cell are 1 or 0
• E.g., suitability of a region to a certain purpose by logical reasoning: different layers have binary values for each location, the result based on the logics on these values
• Local map algebra example: visualizing contours using DEM:
• Divide all values of pixels by 10, multiply the integer result by 10, subtract this value from the original; color each value according to the following: values 4 and 6, 3 and 7, 2 ja 8 and 1 ja 9 get the same color, 0 is white, 5 is black; one meter contours
11.11.2020
12
![Page 13: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/13.jpg)
11.11.2020
13
Tomlin: GIS and Cartographic Modeling
![Page 14: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/14.jpg)
Example: Reclassification
11.11.2020
14
Bolstad: GIS Fundamentals
![Page 15: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/15.jpg)
Example: enjoyable (landscape) areas in Espoo
for locals for tourists for landscape experts
11.11.2020
15
Reclassify land cover based on preferences:
![Page 16: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/16.jpg)
Example: enjoyable (landscape) areas in EspooFinal preference map as a weighted sum: Locals 40%, tourists
30%, experts 30%
See exercise 4.
11.11.2020
16
![Page 17: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/17.jpg)
Focal functions
• Input1, neighborhood => Output
• Operations on a pixel and its 4 (or 8, or 32, or…) neighboring pixels, e.g.• FocalMaximum• FocalMean• FocalStandardDeviation
• For example,• Smoothing the map layer by FocalAverage; high and low values are smoothed
away (continuous values)• Generalization by filtering out individual pixels that differ from their
surrounding (categorical values)• Mobility simulation by producing a cost surface of mobility
11.11.2020
17
![Page 18: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/18.jpg)
Examples
• Focal Sum
• Edge detection
• This is actually calculated using a custom mask called high-pass filter:
11.11.2020
18
![Page 19: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/19.jpg)
Example: Filtering
11.11.2020
19
Bolstad: GIS Fundamentals
![Page 20: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/20.jpg)
Example: Edge detection
11.11.2020
20
Tomlin: GIS and Cartographic Modeling
![Page 21: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/21.jpg)
Zonal functions
• Input1, zones => Output
• Data is related to some zoning
• For example,
• ZonalSum• ZonalMaximum• ZonalAverage
• Example:
• Calculate the amount of apartments in a block: ZonalSum• Calculate the most common soil type for each land cover area: ZonalMode (or
ZonalMajority in ArcGIS)
11.11.2020
21
![Page 22: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/22.jpg)
Example: Zonal average
11.11.2020
22
Bolstad: GIS Fundamentals
![Page 23: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/23.jpg)
Example
• Energy self-sufficiency in Otaniemi: how big portion of energy consumption can be gathered using solar panels on top of roofs
• Data: Solar energy data, buildings, energy consumption
• Analysis: ZonalSum to get total energy per building
11.11.2020
23
![Page 24: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/24.jpg)
Example
11.11.2020
24
![Page 25: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/25.jpg)
Further raster analysis
• Digital elevation model and its derivates
• Watershed
• Viewshed
• Cost surface analysis
11.11.2020
25
![Page 26: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/26.jpg)
DEM (digital elevation model) and its derivates• Key characteristics: slope, aspect (kaltevuus ja viettosuunta)
• Slope is usually expressed as angle (0-90) or percentage
• Aspect is the direction
of downslope (0-360)
11.11.2020
26
![Page 27: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/27.jpg)
Example: Analysing the watershed
11.11.2020
27
Bolstad: GIS Fundamentals
![Page 28: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/28.jpg)
Example: Viewshed
11.11.2020
28
Bolstad: GIS Fundamentals
![Page 29: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/29.jpg)
Example: landscape planning
11.11.2020
29
(Juanjo Galan, MAR-E1046 GIS in Landscape Planning)
![Page 30: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/30.jpg)
Cost surface
Route on cost surface
• Each cell has determined cost, for example:
- the density of the vegetation
- environmental impacts
- depth of snow
• How to travel from starting point to end point with minimum cost
• Cost distance tools in ArcGIS
11.11.2020
30
![Page 31: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/31.jpg)
Cost surface
11.11.2020
31
http://wiki.gis.com
• Cost surface raster in the
background: red is high cost and
green is low cost
• Black line shows the least
expensive route from origin to
destination
![Page 32: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/32.jpg)
An example: Forest fire risk analysis
11.11.2020
32
(Amakihe, Bloch, Gyinaye, Toivanen;
course project work, 2014)
![Page 33: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/33.jpg)
An example: Forest fire risk analysis
11.11.2020
33
![Page 34: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/34.jpg)
An example: Forest fire risk analysis
Final risk map
11.11.2020
34
![Page 35: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/35.jpg)
An example: Picking mushrooms
11.11.2020
35(course project work, 2012)
![Page 36: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/36.jpg)
An example: Picking mushrooms
Final map for finding mushrooms and hot spot analysis after
generalization
11.11.2020
36
![Page 37: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/37.jpg)
An example: Picking mushrooms
11.11.2020
37
![Page 38: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/38.jpg)
A complex example: Flood in a mine
A flood in a mine:
• Modelling the flood
• Water will fill the lower areasfirst
• Water will reach close by areasearlier than far away areas
• How to escape
• Create a cost surface: the easierfor the water to reach, the higher the cost
• Cheapest route to escape
11.11.2020
38
(Gupta, Lu, Pajukoski;
course project work, 2013)
![Page 39: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/39.jpg)
A complex example: Flood in a mine
How fast the water will reach a given area:
11.11.2020
39
![Page 40: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/40.jpg)
A complex example: Flood in a mine
Escape route using
previous raster as a cost
surface
11.11.2020
40
![Page 41: GIS-E1060 - Spatial Analytics: Map algebra and raster analysis](https://reader034.vdocuments.net/reader034/viewer/2022051306/6279a3a415084e525f7c83a9/html5/thumbnails/41.jpg)
Further reading
GIS and Cartographic Modeling by C. Dana Tomlin
• Part II Cartographic modeling capabilities
• E-book available
• Lots of calculation examples
11.11.2020
41