36
L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

Embed Size (px)

Citation preview

Page 1: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

L7 – Raster Algorithms

NGEN06(TEK230) –

Algorithms in Geographical Information Systems

Page 2: 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

Page 3: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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.

Page 4: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Content

1. Introduction

2. Local and regional operators

3. Morphological operators

4. Shaded relief

5. Resampling

6. Flow analysis in hydrology

Page 5: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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.

Page 6: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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

Page 7: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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.

Page 8: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Local and regional operations

Kernel filter

Page 9: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Morphological operators

Page 10: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Shaded relief

Enhance the feeling of topography in a map.

Page 11: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Shaded relief

Page 12: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Computing the shaded relief

Page 13: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Approximating the partial derivativesSteepest gradient approach

Page 14: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Approximating the partial derivatives Sobel filter

Page 15: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Resampling

Original gridTransformed grid

Page 16: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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

Page 17: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Nearest neighbour resampling

Original gridTransformed grid

Page 18: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Inverse distance resampling

Page 19: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Flow analysis in hydrology

Page 20: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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

Page 21: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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

Page 22: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Topographic form

Page 23: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

A convex surface (flow is split)

Multiple flow direction algorithm

Form based flow direction algorithm

Page 24: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

A concave surface – one directional flow

Multiple flow direction algorithm

Form based flow direction algorithm

Page 25: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

L7 - Raster Algorithms

Break line

Flat area

Sink

Artefacts in real world data

Page 26: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

Stream Network

Page 27: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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

Page 28: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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

Page 29: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

Watershed Draining to Outlet

Page 30: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

Estimation of flow accumulation

Page 31: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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

Page 32: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

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

Page 33: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

123

4567

8

C1 C2

M

Triangular form-based multiple flow distribution algorithm (TFM)

Page 34: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

1

2

3

4

2

3

Triangular form-based multiple flow distribution algorithm (TFM)

Page 35: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

Drainage area estimation on standard surfaces

Mathematical

estimation

TFM

D8

ConcaveConvex Plane Saddle

Triangular form-based multiple flow distribution algorithm (TFM)

Page 36: L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems

TFM