gis lecture 3. introduction to raster gis data structure
TRANSCRIPT
GIS Lecture 3. Introduction to Raster GIS Data
Structure and Raster Data Processing
Data Conversion/Entry (GIS, Databases)November 6 – 10, 2006Freetown, Sierra Leone
• 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
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.
Characteristics of Raster Data Structure
Comparing Raster and Vector Data
(Aronoff, 1991)
• In a raster image each cell (pixel) represents an area on the ground of a specific size, that depends on the resolution.
Comparing
RASTER IMAGE STRUCTURE
Sample Landsat Infrared Image 1 byte/pixel = 8 bit = 0-255 gray scale values
• 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
8 BIT IMAGE GREY SCALE
255 (WHITE)
0 (BLACK)
28 = 256 GREY TONES
Bit Resolution in Raster
Landsat TM (Band 4) - 8 bit (byte) image
FULL 8 BIT (BYTE) RANGE - 28 TONES
Image Histogram
Raster Soils Map
• 6 Units are represented: how many bits would be sufficient to store this map? Is 8-bit required?
BIT RESOLUTION
1 BIT 21 = 2 TONES 2 BITS 22 = 4 TONES
3 BIT 23 = 8 TONES 4 BITS 24 = 16 TONES
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).
ILWIS Coordinate System for Sierra Leone DEM
Latitude – Longitude
Datum and Ellipsoid
Ellipsoid Parameters
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
ILWIS Georeference for Sierra Leone DEM
Number of Lines and Columns
Bounding Coordinates
Pixel Size
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?
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?
Example of Raster Properties for ArcGISHow much disk storage does this file take?
How much disk storage is required for this file?
How much disk storage does this file take ?
How much disk storage is required for this file?
Example of Raster Extents from ArcGISWith a 10 metre resolution –
How many cells are there in this image?
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)
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.
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.
RADAR
LandsatDEM
SlopeGeology
Landcover
Raster GIS Analysis and Modelling
A Comparison of Raster, Vector and TIN Data StructuresFor Representing Elevation
Taken from: Aronoff, 1991
Raster Analysis Functions
• Retrieval Operations
• Recoding, (Re)Classification and Rescaling
• Overlay Operations
• Neighbourhood Operations
• Connectivity Functions
• 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
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.
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.
Deriving A Slope Map from a Digital Elevation
Model.
DEM
Derived Slope Map
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.
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
FILTERING EXAMPLE- High Pass (Sharpening)
No 3 by 3Filter
5 by 5 7 by 7
EXAMPLE OF CALCULATING RASTER FLOW DIRECTIONFOR HYDROLOGY ANALYSIS
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.
Deriving Hydrology Networks for a Raster DEMExample Sierra Leone – SRTM -DEM
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
Sample Raster Data Sets
Airborne Geophysical Data Gravity/ Magnetics / Radiometrics /Electromagnetics
Lake Bathymetry Data
DEM Derived/Modeled Products
Satellite ImageryHurricane Isabel off the Bahamas
Satellite: Aqua
Resolution: 2 Km
Date: Sept. 16, 2003
Time: 17.40
Satellite Imagery from the Terra SatelliteMODIS Instrument - For Sierra Leone
Landsat Satellite Imagery for Sierra Leone
Global Land Cover Database for Sierra Leone
Modeled Population Distribution for Sierra Leone http://www.fao.org/geonetwork/srv/en/metadata.show?id=1261&currTab=simple
Global Sea Surface TemperatureFrom MODIS, Satellite Imagery
Time Series of 32 Day Cloud-Free MODIS Composite Images for Africa
Modeled Cattle Distribution for Sierra LeoneGLiPHA Data Source
http://www.fao.org/ag/aga/glipha/index.jsp
http://www.jpl.nasa.gov/radar/sircxsar/interferometry.html
The Shuttle RADAR Topographic has one Transmitter but two Receivers Enabling Height
Determination
Shuttle Radar Topographic Mission (SRTM) DEM For Sierra Leone