Title: Chapter 7: Raster Data
1Chapter 7Raster Data
What is this?
- Paul Sutton
- psutton_at_du.edu
- Department of Geography
- University of Denver
2The Raster Data Model
- The raster data model is more like a photograph
- than a map. If you look at a photograph through
- a strong magnifying glass, youll see that it is
- made up of a series of dots of different colors
or - shades of gray. The raster data model works in a
- similar way it is a regular grid of dots
(called - cells, or pixels) filled with values. In fact,
when - a picture is stored in a computer, the raster
data - model is used.
- In the photo above, you can see roads, cars,
boats, and a river. Notice that there are - no boundaries drawn on the photograph to
distinguish features it is a continuous - surface. Using the raster data model, the earth
is treated as one continuous surface.
3Raster or Grid Structure
- In the raster data model, each location is
represented as a cell. The matrix of cells,
organized into rows and columns, is called a
grid. Each row contains a group of cells with
values representing a geographic phenomenon. Cell
values are numbers, which represent nominal data
such as land use classes, measures of light
intensity or relative measures.
4Interpreting a Raster
- There are three ways to interpret each dot in a
photograph. The first is to classify each dot as
belonging to something - a group of similarly
classified pixels becomes an object, Like
Forest. The second way of interpreting is
simply to measure the value of its color or shade
of gray some pixels would be black, some pixels
would be medium gray, etc. The third way is to
define the pixel relative to a known reference
point, such as mean sea level (for elevation) or
distance from Graceland. - The same three interpretations can be used for
the raster data model in GIS. The cell value can
represent a classification, such as vegetation
type. It can be a measurement, such as a
satellite measuring the amount of light reflected
by the earth. Finally, it can be an
interpretation of elevation.
5How do these Images of Lincoln Differ?
6Points, Lines, Polygons as Grids
7How the Raster Stores Spatial Relationships
- Because the raster data model is a regular
- grid, spatial relationships are implicit.
- Therefore, explicitly storing spatial
- relationships is not required as it is for the
- vector data model.
- Notice that in a grid, cells have eight (8
neighbors (except those on the - outside edges) four off the corners and four off
the sides. Cells are - identified by their position in the grid. In the
example above, with an origin - in the upper-left, the cell (3,2) would be 3 over
along the x-axis and 2 down - on the y-axis. Finding any one of eight neighbors
simply requires adding or - subtracting one (1) from the x or y values. For
example, the value to the left - of (3,2) is (3-1,2) or (2,2).
8Geo-Referencing in Raster
- Raster data is geo-referenced by
- specifying the coordinate system to
- which a grid is registered, the real-
- world location of the reference
- point and the cell size in real-world
- distances. Typically, the upper-left
- or the lower-left corner of the grid
- is used as the reference point. This
- reference point location, along with
- the cell size, can be used to
- determine the geographic location
- of any cell within the raster data
- set. Using the same coordinate
- system, raster data sets can be
- logically organized into subjects for
- geographic analysis.
9How the Raster Data Model Represents Surfaces
- In representing surfaces, the surface
- value (e.g., elevation) is recorded
- for each cell. Rather than having
- the value represent the entire cell,
- it represents only the center point
- of the cell. This set of center points
- for cells in a grid is called a lattice.
- The lattice supports accurate surface
- calculations. The types of surface
- calculations used for analysis include
- slope (the rate of change in the value
- over distance), aspect (direction the
- slope faces), and contour interpolations.
- The United States Geological Survey
- (USGS) uses this model to create their
- Digital Elevation Model (DEM) product.
Measures are taken at lattice point (each
cross). Isolines (in this case, contours) can
be interpolated from the lattice.
10Types of Raster Data
- Remotely Sensed Imagery
- Landsat, MSS
- POES AVHRR DMSP
- SPOT
- Digital Elevation Models (DEMs)
- Digital Orthophotos (DOQs)
- Binary Scanned Files
- Digital Raster Graphics (DRGs) (Scanned topo
maps) - Formats TIFF, GeoTIFF, BIL, BSQ, GIF, JPEG, etc
11Landsat Thematic Mapper
- This is a Landsat TM image of the Grand Canyon.
Landsat has seven bands, 30 meter resolution and
global coverage. It is a major instrument used in
global change studies including studies of fires
and deforestation.
12SeaWIFs Dust Storm over Koreas and Northeast US
- This pair of true-color images
- was collected by the Sea-viewing Wide
Field-of-view - Sensor (SeaWiFS). The top image, acquired
April 22, 2001, - shows haze over the mid-Atlantic United
States extending - well out over the Gulf Stream. The bottom
image, acquired - April 24, reveals that a significant
amount of dust is still - blowing out of Asia.
133-D Visualizations Using DEMs
14AVHRR Image of Los Alamos Fire
- AVHRR (Advanced very High Resolution Radiometer
is a weather satellite run by NOAA with 1 km
spatial resolution
15DMSP image of the Earth at Night
16Digital OrthoPhotoQuad (DOQ) of Washington DC area
17IKONOS 1 meter resolution Image of the U.S.
Mexico border in Nogales AZ/Sonora
18Cool 3-D Applications for DEMs
19Types of overlay operations that can be performed
on Raster Data
- And
- Or
- Max
- Min
- Exhaustive set
20Overlay Can you imagine overlay logic for the
operation below? (e.g. A combined with B to
produce C)
A B C
21Buffer
1
22Complex Retrieval Map Algebra
- Combinations of spatial and attribute queries can
build some complex and powerful GIS operations,
such as weighting.
23Recode
OR
24Describing a classed raster grid
20
P (blue) 19/48
15
10
5
25The mixed pixel problem
26Rasters and vectors can be flat files if they
are simple
Flat File
Vector-based line
4753456 623412
4753436 623424
4753462 623478
4753432 623482
4753405 623429
4753401 623508
4753462 623555
4753398 623634
Raster-based line
Flat File
0000000000000000
0001100000100000
1010100001010000
1100100001010000
0000100010001000
0000100010000100
0001000100000010
0010000100000001
0111001000000001
0000111000000000
0000000000000000
27Data Compression Tricks
- Run Length Encoding
- Quad-Tree Structure
28Run Length Encoding
- The run-length encoding (RLE) scheme can be
used on any kind of data, but works best when the
data contains repeating strings, or runs, such as
the same character or consecutive pixels of the
same color. In its simplest form, RLE involves
scanning a line of text and converting strings of
consecutive like characters into two-byte
packets, the first bite containing the integer
number of repetitions, or run count and the
second bite containing the character, or run
value. For example, the 31-byte string - RRRRRSSSSSSSSSSTTTTTTUUVVVWXXXX
- would be represented as the 14-bite string
- 5R10S6T2U3V1W4X ,
- a compression ratio of 21. Each time the
character changes, a new packet is generated.
Although this method implements easily and
executes rapidly, it is not always efficient.
29The quad-tree structureA spatial index which
recursively decomposes a dataset (grid) into
square cells of different sizes until each cell
has a homogenous value
0
1
2
3
210
1
0
quadrant
3
2
number
Figure 3.9
The quad-tree structure. Reference to code 210.
30Vector to raster exchange errors
31Projection Geometric Transformation of Raster
Data
- Ground Control Points
- Warping or Rubber-Sheeting
- Resampling
- Nearest Neighbor
- Bilinear Interpolation
- Cubic Convolution
32Resampling
33Nearest Neighbor Resampling
- The nearest neighbor approach uses the value of
the closest input pixel for the ouput pixel
value. To determine the nearest neighbor, the
algorithm uses the inverse of the transformation
matrix to calculate the image file coordinates of
the desired geographic coordinate. The pixel
value occupying the closest image file coordinate
to the estimated coordinate will be used for the
output pixel value in the georeferenced image. - ADVANTAGES
- Output values are the original input
values. Other methods of resampling tend to
average surrounding values. This may be an
important consideration when discriminating
between vegetation types or locating boundaries.
Since original data are retained, this method is
recommended before classification. - Easy to compute and therefore fastest to
use. - DISADVANTAGES
- Produces a choppy, "stair-stepped" effect.
The image has a rough appearance relative to the
original unrectified data. Data values may be
lost, while other values may be duplicated.
Figure 1 shows an input file (orange) with a
yellow output file superimposed. Input values
closest to the center of each output cell are
sent to the output file to the right. Notice that
values 13 and 22 are lost while values 14 and 24
are duplicated.
34Graphic Explanation of Nearest Neighbor
Resampling
35Bilinear Interpolation
- The bilinear interpolation approach uses the
weighted average of the nearest four pixels to
the output pixel. - ADVANTAGES
- Stair-step effect caused by the nearest
neighbor approach is reduced. Image looks smooth. - DISADVANTAGES
- Alters original data and reduces contrast
by averaging neighboring values together. - Is computationally more expensive than
nearest neighbor.
36Cubic Convolution
- The cubic convolution approach uses the weighted
average of the nearest sixteen pixels to the
output pixel. The output is similar to bilinear
interpolation, but the smoothing effect caused by
the averaging of surrounding input pixel values
is more dramatic. - ADVANTAGES
- Stair-step effect caused by the nearest
neighbor approach is reduced. Image looks smooth. - DISADVANTAGES
- Alters original data and reduces contrast
by averaging neighboring values together. - Is computationally more expensive than
nearest neighbor or bilinear interpolation.