Top Banner
Raster Data Model
33

Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Dec 31, 2015

Download

Documents

Amos Shields
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Model

Page 2: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Spatial Data Models

• Rasteruses individual cells in a matrix, or grid, format to represent real world entities

• Vector uses coordinates to store the shape of spatial data objects

Page 3: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

A few synonyms for raster

• Surface• GRID – the ArcInfo raster type• Image (generic) – usually relates to satellite imagery• Image (.img) – Raster data structure used by Erdas

Imagine, a common image-processing software package• Array – more technical term associated with how raster

data are managed by computer programmers• Matrix – rarely used because of it’s association with

mathematics, but it does occasionally come up

Page 4: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Model

• In the raster data model, the primary data object is the cell or pixel

• You are familiar with these if you have used a digital camera or viewed a computer monitor

Page 5: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster data example

75 70 79 80 78

12 50 80 81 80

15 14 79 78 69

10 12 9 85 80

10 11 10 80 90

Page 6: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Cell (x,y)

•The raster data model represents the Earth’s surface as an array of two-dimensional grid cells, with each cell having an associated value:

1 2 3 5 8

4 6 8 3 9

3 5 3 3 1

7 5 4 3 9

2 2 4 5 2

Cell value

Cell size = resolution

columns

row

sRaster Data Model

Page 7: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Model

• Every cell has a value, even if it is a special value to indicate that there is “no data” or that data is “missing” at that location

• The values are numbers, either:

– actual values OR

– codes representing an attribute

Page 8: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Cells - Absolute Values•In this instance, the value of the cell represents the value of the phenomenon of interest, e.g. the elevation at that pixel location.

Page 9: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Cells - Coded Values•Here, the values stored in each cell are used as substitutes for categorical data, e.g. land cover classes:

Page 10: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Grids and missing data

Clarke, K.C., Figure 3.8: GIS data layer as a grid with a large section of “missing data,” in this case, the zeros in the ocean off of New York and New Jersey

Page 11: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Cell Size & Resolution• The size of the cells in the raster data model

determines the resolution at which features can be represented

• The resolution can have an effect on which features are represented in what locations:

10 m Resolution 1 m Resolution5 m Resolution

Page 12: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

The raster data model still represents spatial objects, but does so differently from the vector model:

Geographic Primitives

•Points

–0 dimensional

•Lines

–1 dimensional

•Polygons

–2 dimensional

Raster Data Model - Objects

Page 13: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

+

+

+

+

1 point = 1 cell

What problems do we have here? • 2 points in single pixel• Point on the boundary between 2 or more cells

Raster Data Model - Points

Page 14: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

A line = a series of connected cells that portray length

Problems with this representation? • Lines may be narrower than pixels show• Curved lines can loose detail (e.g., if the curves are smaller than the pixel resolution can detect)

Raster Data Model - Lines

Page 15: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Area = a group of connected cells that portray a shape

What problems could we have with this representation?• What if a lake’s edge falls in a pixel? • Area calculations loose accuracy

Raster Data Model - Areas

Page 16: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Real World Features Raster Vector

• • •

“A raster model tells what occurs everywhere, while a vector model tells where every thing occurs”

Raster and Vector Data Model Comparison

Page 17: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Rules for Assigning Cell Values•Cell values can be assigned to cells accorded to some set of rules, and selecting those rules differently can also effect the representation of features:

Page 18: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Model - Storage

• There is a trade-off between spatial resolution and data storage when we use the raster data model, e.g.– 60 km satellite image with 10m cell size

• 6000 X 6000 = 36,000,000 cells• 1 byte of attribute value (i.e. values 0-255)• ~36 MB of disk storage!

– 60 km satellite image with 100m cell size• 600 x 600 = 360,000 cells• 360 KB of data… 1% the size of the other one

Page 19: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Model – Compaction

• Because the raster data model records a value for each and every cell in a grid, it is very storage intensive, meaning that it can use a lot of memory and disk space to represent a theme

• Compaction techniques are used in conjunction with raster data to reduce the amount of required storage space to a more manageable amount

Page 20: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

10, 10, 10 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 00 0 0 0 1 1 1 1 0 00 0 0 0 1 1 1 1 0 00 0 1 1 1 1 1 1 0 00 0 1 1 1 1 1 1 0 00 0 1 1 1 1 1 1 0 00 0 1 1 1 1 1 1 0 00 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0

max. cell valuerows

columns

Problem: too much redundancy

11100

10000

10000

00000

00000

00111

00111

00111

00000

00000

00000

00000

00111

00111

00111

00000

00000

11100

11100

11100

Raster Data Storage – No Compaction

This approach represents each cell individually in the file:

103 values

Page 21: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

10,10,10, 100, 100, 4, 1, 4, 0,20, 4, 1, 4, 0,20, 2, 1, 6, 0,20, 2, 1, 6, 0,20, 2, 1, 6, 0,20, 2, 1, 6, 0,20, 100, 10

There is a tendency towards spatial autocorrelation; for nearby cells to have similar values - values often occur in runs across several cells

11100

10000

10000

00000

00000

00111

00111

00111

00000

00000

00000

00000

00111

00111

00111

00000

00000

11100

11100

11100

Raster Data Storage – Run Length Encoding

This approach takes advantage of patterns in the data, taking advantage of the repetition of values in a row:

45 values

row by

row

header

Page 22: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Compression Models:Block Encoding

From An Introduction to Geographic Information Systems, Heywood et al. (2002)

Run-length encoding in 2-D: Uses a series of square blocks to encode data

Page 23: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Compression Models:Raster Chain Codes

From An Introduction to Geographic Information Systems, Heywood et al. (2002)

Reduces data by defining the boundary of entity

Page 24: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Compression Models: Quadtrees

–Recursively divides an area into four quadrants until all the quadrants (at all levels) are homogeneous

Page 25: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Compression Models: Quadtrees Example

1

1

3

3

2

1

1

3

2

2

3

2

2

3 3

2ROOT

NW NE SE SW? ? ?

? ? ? ?

1

1

3

3

2

1

1

3

2

2

3

2

2

3 3

2ROOT

NW NE SE SW1 2 3

2 2 3 3

Page 26: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Vector to Raster Transformations

•Quite often, data in the vector and raster models need to be used together

•One dataset is generally transformed to be represented in the other model, introducing distortion.

Page 27: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Vector Data Model - Advantages

• It is a good representation of the world as we see it (our visual systems automatically segments the world we see by identifying objects)

• The topology of a layer can be fully described and explicitly stored

• It is efficient in terms of data storage– It only uses storage for objects of interest and does not

need to store values for the spaces in between• No jaggy edges (raster has these on any diagonal)• Useful for network analysis and modeling flows of linear

features

Page 28: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Vector Data Model - Disadvantages

• The data structure is more complex– especially when you have fully encoded topology

(e.g., using the arc-node model)• It is more difficult to write computer programs to

manipulate data• Spatial analysis operations can be more difficult

Page 29: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Model - Advantages

• The data structure is much simpler• It is easy to overlay and combine layers• It is easy to apply equations to the entire surface

(map algebra)– Example: New_GRID = GRID_1 + GRID_2

• Raster data is easily integrated with satellite (and other remotely-sensed) data

• Writing programs to manipulate raster is easier

• It is easy to do simulation modeling due to uniform size and shape of grids (i.e. it is easy to define uniform modeling units)

Page 30: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Raster Data Model - Disadvantages

• Because a value must be stored for each and every cell in a grid, there is a great deal of redundancy and large storage requirements

• Location can be captured only as accurately as the resolution allows, which is determined by the cell size

• Spatial analyses that are based on topological relationships are not well supported by this model

• Changing resolution (i.e., cell size) can be complicated

Page 31: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Which Data Model Should You Use?

• This can depend upon the type of data you’re using and what goals you’re trying to achieve

– Vector model: discrete features such as rivers, roads, buildings, and political boundaries

– Raster model: continuous features such as elevation

• Usually your choice is determined by data availability

Page 32: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

Common Examples of Raster Data

• Elevation (Digital Elevation Model DEM)– Derivatives: slope angle, slope aspect,

topographic moisture potential, terrain shape (e.g., convex or concave)

• Climate data (modeled or interpolated temperature and precipitation)

• Landcover (usually derived from classified remotely sensed imagery)

Page 33: Raster Data Model. Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates.

http://weather.unisys.com/surface/sst.gif

Raster Example: Sea Surface Temperature