Gis 05
Gis 05
Roads
Raster Data Models (2)
• Coding method affects:
– Ease of edits.
– Storage space – binary requires more numbers, but may
require less space because each number is only 1 bit –
integers require either 8 bits (if <256) or 32 bits.
– Number of files required.
• Problems:
– Data redundancy
– Storage space excessive
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.
Run Length Encoding
x1 y1 a1 b1 c1
x2 y2 a2 b2 c2
x3 y3 … … …
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.
x1 y1 a b c
… …
xn yn
-12345 -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.
Spaghetti Data Structures
• The visual appearance of a map could be captured by digitising
lines and polygons in a random sequence without any additional
information about which lines connect to which, or which
polygons share common boundaries.
• This is akin to 'tracing' the lines on the map using a digitiser
until they have all been digitised.
• This information could be used to reconstruct the map as it
might be drawn by a cartographer.
• Although adequate for CAD or CAC, it is inadequate for most
GIS purposes – e.g. polygon features not defined.
• Sometimes used for data distribution.
Arc/Node Structures(1)
• The DIME system developed in the 1960s was a step
forward. It was the first to use an arc/node structure.
• A node is where two or more lines join.
• An arc is a section of line running between nodes.
• Each arc is made up from straight line segments running
between adjoining points (or vertices).
Arc/Node Structures(2)
• Arc/node structures allow the data to be stored
hierarchically.
• Polygons can be defined as a series of arcs.
• Arcs can be defined as a series of segments.
• The different types of data can be stored in separate files,
linked together by pointers.
Arc/Node Structures(3)
• Arc/node structures provide several advantages:
• Arc between adjoining polygons only need to be digitised
once.
– Reduces data redundancy
– Eliminates sliver lines
• Editing is simplified
– To move a point we just need to adjust its coordinates
in the points file.
– To delete a point we remove the reference to it in the
arcs file
– To add a point we add its details to the end of the points
file (no resorting) and insert a pointer at the right place
in the arcs file.
Topological Data Structures(1)
• Further refinements were introduced in the 1980s with the
introduction of TIGER files by the US Census.
• These added explicit topological information (e.g. the
polygons on either side of an arc; the beginning and end
nodes of each arc).
Topological Data Structures(2)
• Only require an arcs file – one can reconstruct the
polygons from the topological information.
Arc Start End Left Right
1 n1 n2 A B
2 n2 n1 O B
3 n1 n2 O A