L7 - Raster Algorithms
L7 – Raster Algorithms
NGEN06(TEK230) –
Algorithms in Geographical Information Systems
L7 - Raster Algorithms
Background
Store and analyse the geographic information
Raster data or Vector data.
Raster data have been common in analysis in physical geography.
Aerial and satellite images within GIS
Continuous surface presentations
L7 - Raster Algorithms
Aim
The main objective is to familiarize the students with some raster algorithms. After this lecture the student should be able to write a
minor program that treat raster data in one of the areas cost analysis, shaded relief, viewshed and resampling.
L7 - Raster Algorithms
Content
1. Introduction
2. Local and regional operators
3. Morphological operators
4. Shaded relief
5. Resampling
6. Flow analysis in hydrology
L7 - Raster Algorithms
Example of raster data and raster analysis
1. Digital mapsCost analysis, location analysis, overlay analysis and generalisation (e.g. by morphological operators)
2. DTMs and DEMsViewshed analysis, flow analysis, and shaded relief .
3. Images (most often aerial or satellite images)
Resampling, image classification and information extraction.
L7 - Raster Algorithms
Example of raster analysis
1) Morphological operators
This is a basic method for digital maps. Several manipulations and analysis of raster maps are based on morphological operators. (shrink and expand) L9 genralization
2) Shaded relief
A shaded layer is created (based on the DEM) for a fictitious sun; this layer is then added to a map to enhance the feeling of topography.
3) Resampling of images
To use e.g. an ortophoto in a geographic analysis it must be geocoded. Geocoding - resampling of the image to the new geometry.
4) Flow analysis in hydrology
All above are regional operations
L7 - Raster Algorithms
Vector vs. Raster
Distances, area of polygon, point-in-polygon are all fairly simple to perform with raster data.
Result is often worse than in the vector case since the resolution of the raster data is not that good
Means that the path between two pixels with the lowest total cost (sum of the pixel values for the path) is found.Raster version of Dijkstra’s algorithm can be used.
Cost analysis for raster maps
Raster data is often used for locational analyses. For example, all buildings that are closed to a lake, close to a road and far from industries are sought.
L7 - Raster Algorithms
Local and regional operations
Kernel filter
L7 - Raster Algorithms
Morphological operators
L7 - Raster Algorithms
Shaded relief
Enhance the feeling of topography in a map.
L7 - Raster Algorithms
Shaded relief
L7 - Raster Algorithms
Computing the shaded relief
L7 - Raster Algorithms
Approximating the partial derivativesSteepest gradient approach
L7 - Raster Algorithms
Approximating the partial derivatives Sobel filter
L7 - Raster Algorithms
Resampling
Original gridTransformed grid
L7 - Raster Algorithms
Resampling method
It is important to state what kind of raster data that is used and the application of the resampled data.
If the raster data is a digital map (or contain any type of data in nominal or ordinal scale) it is not allowed to do calculations on the raster data values. A recommended resampling method is then nearest neighbour.
If the data is an image (which contain continuous data that is in ratio or interval scale ) it is allowed to do calculations on the raster data values
L7 - Raster Algorithms
Nearest neighbour resampling
Original gridTransformed grid
L7 - Raster Algorithms
Inverse distance resampling
L7 - Raster Algorithms
Flow analysis in hydrology
L7 - Raster Algorithms
Drainage Direction – 2 ways
• Simplified: In a matrix of 9 cells, the water from the centre cell flows to the neighboring cell with the lowest elevation
• OR, for more realistic algorithms, is distributed proportionally to a number of neighboring cells with lower elevation
7
899
8 7 8
56
L7 - Raster AlgorithmsSurface flow algorithms over digital elevation models
8
1
tan
tan
j
xj
xi
if
for all ß > 0
100 100 99.8
98.899.8100.4
99.6 100 100.7
Single flow direction algorithm SFD
Multiple flow direction algorithm MFD
L7 - Raster Algorithms
Topographic form
L7 - Raster Algorithms
A convex surface (flow is split)
Multiple flow direction algorithm
Form based flow direction algorithm
L7 - Raster Algorithms
A concave surface – one directional flow
Multiple flow direction algorithm
Form based flow direction algorithm
L7 - Raster Algorithms
Break line
Flat area
Sink
Artefacts in real world data
Stream Network
0 0 000
0
0
1
0
0
0
0
0
02 2 2
10 1
0 144 1
19 1
0 0 00 0
0
0
1
0
0
0
0
0
0
2 2 2
10 1
0
14
14
191
Flow Accumulation Grid.
Area draining in to a grid cell
0 0 00 0
0
0
1
0
0
0
0
0
0
2 2 2
10 1
0
14
14
191
Flow Accumulation > 10 Cell Threshold
0 0 000
0
0
1
0
0
0
0
0
02 2 2
1
0
4 1 1
10
14
19
Stream Network for 10 cell Threshold Drainage Area
Watershed Draining to Outlet
Estimation of flow accumulation
Why we need to create new flow distribution algorithm ?
Problems related to sinks, man made structures and flat areas.
An empirical equation is used to estimate flow distribution in most flow distribution Algorithms.
The flow is distributed to some or all down slope cells, no influence from upslope cells.
Concave verses convex form.
8
1
tan
tan
j
xj
xi
if
for all ß > 0
123
4567
8
C1 C2
M
Triangular form-based multiple flow distribution algorithm (TFM)
Area of one triangle =1/8 area of grid cell
Triangles has a constant slope
123
4567
8
C1 C2
M
Triangular form-based multiple flow distribution algorithm (TFM)
1
2
3
4
2
3
Triangular form-based multiple flow distribution algorithm (TFM)
Drainage area estimation on standard surfaces
Mathematical
estimation
TFM
D8
ConcaveConvex Plane Saddle
Triangular form-based multiple flow distribution algorithm (TFM)
TFM