gis lecture 3. introduction to raster gis data structure

55
GIS Lecture 3. Introduction to Raster GIS Data Structure and Raster Data Processing Data Conversion/Entry (GIS, Databases) November 6 – 10, 2006 Freetown, Sierra Leone

Upload: others

Post on 16-Apr-2022

23 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: GIS Lecture 3. Introduction to Raster GIS Data Structure

GIS Lecture 3. Introduction to Raster GIS Data

Structure and Raster Data Processing

Data Conversion/Entry (GIS, Databases)November 6 – 10, 2006Freetown, Sierra Leone

Page 2: GIS Lecture 3. Introduction to Raster GIS Data Structure

• Raster Data Structure• Raster Data Storage and

Representation• Raster Operations and Functions• Comparison of Raster and Vector

Data Models• Typically Encountered Raster

Datasets

Lecture Overview

Page 3: GIS Lecture 3. Introduction to Raster GIS Data Structure

Raster Data Structure

• Raster data model represents the spatial data as a regular grid of cells (pixels).

• Each cell represents an area of the land surface.

• The location of each cell is defined by its row and column numbers.

• Each cell contains a single value.

Page 4: GIS Lecture 3. Introduction to Raster GIS Data Structure

Characteristics of Raster Data Structure

Page 5: GIS Lecture 3. Introduction to Raster GIS Data Structure

Comparing Raster and Vector Data

Page 6: GIS Lecture 3. Introduction to Raster GIS Data Structure

(Aronoff, 1991)

• In a raster image each cell (pixel) represents an area on the ground of a specific size, that depends on the resolution.

Page 7: GIS Lecture 3. Introduction to Raster GIS Data Structure

Comparing

Page 8: GIS Lecture 3. Introduction to Raster GIS Data Structure

RASTER IMAGE STRUCTURE

Sample Landsat Infrared Image 1 byte/pixel = 8 bit = 0-255 gray scale values

Page 9: GIS Lecture 3. Introduction to Raster GIS Data Structure

• Information in the computer is stored in binary code (sequences of 1 and 0 values, “on” and “off”).

• A bit (binary digit) can be either 0 or 1 and represents an exponent of the base 2:

20 21 22 23 24 25 26 27 28

1 2 4 8 16 32 64 128 256

• A byte (8 bits): standard unit of measurement of computer data and computer memory.

• A single bit map ( 21 = 2) is a very simple map where only twocategories are represented (e.g. land/water, yes/no, true/false).

• A byte map is an image file in which each cell has a value within the range 0 - 255 (28 = 256) (e.g. many satellite sensors, including Landsat and SPOT record in 8 bit data).

Computer Storage of Raster Data

Page 10: GIS Lecture 3. Introduction to Raster GIS Data Structure

8 BIT IMAGE GREY SCALE

255 (WHITE)

0 (BLACK)

28 = 256 GREY TONES

Page 11: GIS Lecture 3. Introduction to Raster GIS Data Structure

Bit Resolution in Raster

Landsat TM (Band 4) - 8 bit (byte) image

Page 12: GIS Lecture 3. Introduction to Raster GIS Data Structure

FULL 8 BIT (BYTE) RANGE - 28 TONES

Image Histogram

Page 13: GIS Lecture 3. Introduction to Raster GIS Data Structure

Raster Soils Map

• 6 Units are represented: how many bits would be sufficient to store this map? Is 8-bit required?

Page 14: GIS Lecture 3. Introduction to Raster GIS Data Structure

BIT RESOLUTION

1 BIT 21 = 2 TONES 2 BITS 22 = 4 TONES

3 BIT 23 = 8 TONES 4 BITS 24 = 16 TONES

Page 15: GIS Lecture 3. Introduction to Raster GIS Data Structure

Data Types

Depending on the phenomenon that we want to represent in our map, we will use different data types:

• Bit (0, 1)- e.g. bit-maps.

• Byte (positive integer values between 0 and 255)- e.g. byte-maps or byte-images, such as Landsat and SPOT.

• Integer (a number having non fractional part also known as whole number, such as: 1, 2, 3, ..)

- e.g. soil classes.

• Real (any number having fractional part: e.g. 2.65, 1.423)- e.g. rainfall or temperature measurements,Digital Elevation Models (DEMs).

Page 16: GIS Lecture 3. Introduction to Raster GIS Data Structure

ILWIS Coordinate System for Sierra Leone DEM

Latitude – Longitude

Datum and Ellipsoid

Ellipsoid Parameters

Page 17: GIS Lecture 3. Introduction to Raster GIS Data Structure

ILWIS Raster Properties WindowSRTM, DEM for Sierra Leone

What file size (uncompressed) is required for this Sierra Leone DEM?

4554 lines by 4501 Pixels2 bytes/pixel

Answer:No. of Pixels = 4554*4501 = 20,497,554 Pixels

Disk Storage =20,497,554 Pixels * 2 bytes/Pixel = 40,995108 bytes

Page 18: GIS Lecture 3. Introduction to Raster GIS Data Structure

ILWIS Georeference for Sierra Leone DEM

Number of Lines and Columns

Bounding Coordinates

Pixel Size

Page 19: GIS Lecture 3. Introduction to Raster GIS Data Structure

file title : Stouffville Landcoverdata type : bytefile type : binarycolumns : 512rows : 512ref. system : utmref. units : munit dist. : 1min. X : 641550max. X : 646670min. Y : 870380max. Y : 875500pos'n error : unknownresolution : unknownmin. value : 1max. value : 25value units : unspecifiedvalue error : unknownflag value : noneflag def'n : nonelegend cats : 26category 0 : No datacategory 1 : Agriculture - Bare Fieldscategory 2 : Agriculture - with Cropscategory 3 : Deciduous Forests

Raster Header from an IDRISI file

Question 1: What would you expect for a file size?

Answer:

1 (byte/pixel)*(512*512 pixels) = 262,144 bytes

Question 3: What is the dynamic range? Is 8-bit required?

Page 20: GIS Lecture 3. Introduction to Raster GIS Data Structure

file title : Stouffville DEMdata type : integerfile type : binarycolumns : 512rows : 512ref. system : utmref. units : munit dist. : 1.0000000min. X : 641550.0000000max. X : 646670.0000000min. Y : 870380.0000000max. Y : 875500.0000000pos'n error : unknownresolution : unknownmin. value : 250max. value : 350value units : unspecifiedvalue error : unknownflag value : noneflag def'n : nonelegend cats : 0

Raster Header from an IDRISI file

Question 1: What would you expect for this file size?

Note: the Idrisi integer data type = 2 bytes (16 bits = 216).

Question 2: If data type had been bit, what would you expect for file size?

Page 21: GIS Lecture 3. Introduction to Raster GIS Data Structure

Example of Raster Properties for ArcGISHow much disk storage does this file take?

How much disk storage is required for this file?

Page 22: GIS Lecture 3. Introduction to Raster GIS Data Structure

How much disk storage does this file take ?

How much disk storage is required for this file?

Page 23: GIS Lecture 3. Introduction to Raster GIS Data Structure

Example of Raster Extents from ArcGISWith a 10 metre resolution –

How many cells are there in this image?

Page 24: GIS Lecture 3. Introduction to Raster GIS Data Structure

Storage Options for Raster Data

1. Uncompressed:• Full Raster Arrays (e.g. .tiff files. e00, asc, etc.)

2. Compressed Fully Recoverable:• Run - Length Encoding (e.g. .zip files)• Standard Run-Length Encoding• Value Point Encodin• Quadtrees (e.g. .TDYAC-SPANS)

3. Image Compressed - Non Fully Recoverable. You can really get 40:1 ratios with these compressiontechniques, but at an image cost. (e.g. .jpeg, .jpg, Mr.Sid)

Page 25: GIS Lecture 3. Introduction to Raster GIS Data Structure

1. Simple data structure.2. Easy and efficient overlay

operations.3. High spatial variability is

efficiently represented.4. Compatible with Remote

Sensing imagery.5. Same grid cells for several

attributes.6. Can be used for efficient

manipulation and enhancement of digital images.

7 Good for representing transitions.

Comparison of Raster and Vector Data Model

Advantages of Raster: Advantages of Vector:

1. More compact data structure than the raster model.

2. It provides efficient encoding of topology, and, as a result, more efficient implementation of operations that require topological information, such asnetwork analysis.

3. Better suited to supporting graphics.

4. Accurate map output.

Page 26: GIS Lecture 3. Introduction to Raster GIS Data Structure

Disadvantages of Raster:

1. Requires more disk space (storage and processing).

2. Topological relationships are more difficult to represent.

3. Difficult to accurately specify locations.

4. Difficult to represent the exact area, perimeter or shape of a feature.

5. Inferior output quality

Comparison of Raster and Vector Data Model

Disadvantages of Vector:

1. More complex data structure than raster model.

2. Overlay operations are more difficult to implement.

3. High spatial variability is inefficiently represented.

4. Manipulation and enhancement of digital images cannot be effectively done in the vector space.

5. Not compatible with RS imagery.

Page 27: GIS Lecture 3. Introduction to Raster GIS Data Structure

RADAR

LandsatDEM

SlopeGeology

Landcover

Raster GIS Analysis and Modelling

Page 28: GIS Lecture 3. Introduction to Raster GIS Data Structure

A Comparison of Raster, Vector and TIN Data StructuresFor Representing Elevation

Page 29: GIS Lecture 3. Introduction to Raster GIS Data Structure

Taken from: Aronoff, 1991

Page 30: GIS Lecture 3. Introduction to Raster GIS Data Structure

Raster Analysis Functions

• Retrieval Operations

• Recoding, (Re)Classification and Rescaling

• Overlay Operations

• Neighbourhood Operations

• Connectivity Functions

Page 31: GIS Lecture 3. Introduction to Raster GIS Data Structure

• Example using a simple linear function:

Example Interpolation from Point Data

1 3 4 62

2 4 5

1 3 6

4

1 3 4 62

2 4 5

1 3 6

4

2 5111

1

222

5

555

333

3

4

44

66

6

6

Known values Known and predicted values

Interpolation

Page 32: GIS Lecture 3. Introduction to Raster GIS Data Structure

100m 120m 140m

160m

Example Interpolation from contour lines

A contour line is a sequence of points that have the sameelevation value (e.g. 100 m).

The interpolation create a gridof values and calculate the unknown value for each cell(e.g. 130 m).

130m

Creation of a raster map from anisoline map.

Page 33: GIS Lecture 3. Introduction to Raster GIS Data Structure

Assume resolution of 1m

2.8 2.4 2 2.4 2.82.4 1.4 1 1.4 2.42 1 0 1 2

2.4 1.4 1 1.4 2.4 2.8 2.4 2 2.4 2.8

Starting cell

Measuring Euclidean Distance in Raster Space

- Count the number of cells to travel- Multiply #cells x resolution - All cells adjacent and in line withtarget are assigned value 1

- Diagonal distances produce right angled triangles (Pythagorean Theorem):count each cell and multiply by (resolution x 1.414)

- In case of multiple routings:consider always the shortest distance.

Page 34: GIS Lecture 3. Introduction to Raster GIS Data Structure

Deriving A Slope Map from a Digital Elevation

Model.

DEM

Derived Slope Map

Page 35: GIS Lecture 3. Introduction to Raster GIS Data Structure

Neighbourhood OperationsTopographic Functions

• Topography refers to the distribution of elevation across a land surface.

• In a GIS the topography is represented by digital elevation data (Digital Elevation Model).

• Topographic functions are used to calculate parameters that describe the topography of a local terrain.

• The two most commonly used terrain parameters are: slope and aspect.

• These parameters are useful in analysis where topography is important: e.g. soil erosion, watershed drainage modelling, hill shading, sun exposure.

Page 36: GIS Lecture 3. Introduction to Raster GIS Data Structure

RASTER FILTERING: THE MOVING WINDOWA 3 by 3 Moving Window

(Kernel)Operating Position in

Filtered Image

Original Image Filtered Image

C1 C2 C3

C4 C5 C6

C7 C8 C9

KERNEL COEFFICIENTS

Page 37: GIS Lecture 3. Introduction to Raster GIS Data Structure

FILTERING EXAMPLE- High Pass (Sharpening)

No 3 by 3Filter

5 by 5 7 by 7

Page 38: GIS Lecture 3. Introduction to Raster GIS Data Structure

EXAMPLE OF CALCULATING RASTER FLOW DIRECTIONFOR HYDROLOGY ANALYSIS

Page 39: GIS Lecture 3. Introduction to Raster GIS Data Structure

FLOW ACCUMULATION

• Flow accumulation is the accumulated weight of all the cells that flow into each subsequent downslope cell.

• The flow direction data set is used to create the flow accumulation data set.

• The FLOW ACCUMULATION command creates a grid of accumulated flow to each cell, by accumulating the number of cells that flow into each downslope cell. The accumulated flowis based upon the number of cells flowing into each cell in the output grid.

Page 40: GIS Lecture 3. Introduction to Raster GIS Data Structure

Deriving Hydrology Networks for a Raster DEMExample Sierra Leone – SRTM -DEM

Page 41: GIS Lecture 3. Introduction to Raster GIS Data Structure

Image Pyramids• Most such technologies for displayingvery large images will include the use ofintermediate level images or pyramids toallow much faster display of images,including zooming in or out and panningthe image.

• If we compute intermediate levels ofzoom and save extra images that takes time. If we compute and store very many intermediate levels of zoom that will also increase the storage size required for images

• The need for extra storage space also is not usually a burden, since most people would happily see an image increase in storage space by, say, 50% if thereafter display was virtually instantaneous instead of taking minutes for each change in zoom

Page 42: GIS Lecture 3. Introduction to Raster GIS Data Structure

Sample Raster Data Sets

Page 43: GIS Lecture 3. Introduction to Raster GIS Data Structure

Airborne Geophysical Data Gravity/ Magnetics / Radiometrics /Electromagnetics

Page 44: GIS Lecture 3. Introduction to Raster GIS Data Structure

Lake Bathymetry Data

Page 45: GIS Lecture 3. Introduction to Raster GIS Data Structure

DEM Derived/Modeled Products

Page 46: GIS Lecture 3. Introduction to Raster GIS Data Structure

Satellite ImageryHurricane Isabel off the Bahamas

Satellite: Aqua

Resolution: 2 Km

Date: Sept. 16, 2003

Time: 17.40

Page 47: GIS Lecture 3. Introduction to Raster GIS Data Structure

Satellite Imagery from the Terra SatelliteMODIS Instrument - For Sierra Leone

Page 48: GIS Lecture 3. Introduction to Raster GIS Data Structure

Landsat Satellite Imagery for Sierra Leone

Page 49: GIS Lecture 3. Introduction to Raster GIS Data Structure

Global Land Cover Database for Sierra Leone

Page 50: GIS Lecture 3. Introduction to Raster GIS Data Structure

Modeled Population Distribution for Sierra Leone http://www.fao.org/geonetwork/srv/en/metadata.show?id=1261&currTab=simple

Page 51: GIS Lecture 3. Introduction to Raster GIS Data Structure

Global Sea Surface TemperatureFrom MODIS, Satellite Imagery

Page 52: GIS Lecture 3. Introduction to Raster GIS Data Structure

Time Series of 32 Day Cloud-Free MODIS Composite Images for Africa

Page 53: GIS Lecture 3. Introduction to Raster GIS Data Structure

Modeled Cattle Distribution for Sierra LeoneGLiPHA Data Source

http://www.fao.org/ag/aga/glipha/index.jsp

Page 54: GIS Lecture 3. Introduction to Raster GIS Data Structure

http://www.jpl.nasa.gov/radar/sircxsar/interferometry.html

The Shuttle RADAR Topographic has one Transmitter but two Receivers Enabling Height

Determination

Page 55: GIS Lecture 3. Introduction to Raster GIS Data Structure

Shuttle Radar Topographic Mission (SRTM) DEM For Sierra Leone