Download Raster Data Models - GIS and Mapping - Lecture Slides and more Slides Geochemistry in PDF only on Docsity!
Raster Data Models (1)
- Raster data for several layers could be stored in various
ways:
- By location – i.e. list all the attributes for cell 1, then cell 2, etc.
- By coverage – i.e. all the cells for coverage (or layer) 1, then coverage 2, etc.
- By binary coverage – all cells having attribute 1 in coverage 1 saved as Boolean 1, then all cells having attribute 2 in coverage 1, etc., repeated then for coverage 2.
- By data value – location of all cells having attribute 1 in coverage 1 saved as x,y, then attribute 2 coverage 1, etc.
Landuse
Roads
By location : [2,1, 2,0, 2,0, 2,0, 3,0, 3,2, 3,2, 3,2, 2,0, 2,1, 2,0, 1,0, 3,2, 3,0, 3,0, 3,0, …]
By coverage : [2,2,2,2,3,3,3,3, 2,2,2,1,3,3,3,3, … 3,3,3,3,3,2,2,2] [1,0,0,0,0,2,2,2, 0,1,0,0,2,0,0,0, …]
By binary coverage: [0,0,0,0,0,0,0,0, 0,0,0,1,0,0,0,0, … ] [1,1,1,1,0,0,0,0, 1,1,1,0,0,0,0,0 … ] [0,0,0,0, 1,1,1,1, 0,0,0,0,1,1,1,1, …] [0,1,1,1,1,0,0,0, 1,0,1,1, 0,1,1,1 …] … [ … 1,0,0,0,0,0,0,0]
By data value (c,r) : [4,2, 4,3, 5,3, …] [1,1, 2,1, 3,1, …] [5,1, 6,1, 7,1, …] [2,1, 3,1, 4,1, …] [1,1, 2,2, 2,3, …] [6,1, 7,1, 8,1 …]
Data Compaction
- Various approaches have been used to reduce storage requirements: - Run Length Encoding - Block Coding - Chain Coding - Quadtrees - (^) Wavelet Compression – e.g. MrSID (Multiresolution Seamless Image Database). This can reduce the space required to about 2 per cent of the original. However, wavelet compression is lossy.
(26 numbers : 0,13,1,5,0,5,1,6,0,5,1,5,0,6,1,3,0,7,1,3,0,7,1,2,0,33)
Run Length Encoding
Chain Coding
Encoded as: 30, 312
Quadtree
Lines And Polygons
- Lines, polylines and polygons are more complex because each object requires more than one x,y coordinate pair.
- Also, the number of x,y coordinate pairs is variable.
- For polygons, one could check whether an x,y coordinate pair completes a loop. However, it is safer to use a special code to mark the end of the spatial definition.
x 1 y 1 a b c … … x (^) n y (^) n -12345 -
Attribute Data
- Attribute data is also more complex for lines and polygons.
- Could record the attributes for each coordinate pair, but
would create a lot of data redundancy.
- Would also be very difficult to edit.
- A common solution is to store the attribute data in a
separate file and link it to the locational data using a relational join.
- We will explore database structures next day. For present
we will focus issues associated with the locational data.