280 likes | 1.5k Views
Data models Vector data model Raster data model (x,y) (x,y) (x,y) (x,y) (x,y) (x,y) (x,y) (x,y) (x,y) (x,y) point line polygon(area) The Vector Model of Real world The vector data model represent geographic features similar to the way maps do
E N D
Data models • Vector data model • Raster data model
(x,y) (x,y) (x,y) (x,y) (x,y) (x,y) (x,y) (x,y) (x,y) (x,y) point line polygon(area) The Vector Model of Real world The vector data model represent geographic features similar to the way maps do A point: recorded by a pair of (x,y) coordinates, representing a feature that is too small to have length and area. A line: recorded by joining two points, representing features too narrow to have areas A polygon: recorded by a joining multiple points that enclose an area
Spaghetti Vector Data Model • Each point, line, or polygon is stored as a record • in a file that consists ID and a list of coordinates. Data Storage Points Point ID Coordinates +1 +2 1 1, 1 2 4, 2 3 5, 2 4 2, 4 +3 +4
Spaghetti Vector Data Model Lines: • ID Coordinates • (0,1), (3,4), (5,6) • (3,1), (5,2), (4,3) 1 2
Spaghetti Vector Model • Uses a single line to represent the boundary of a polygon • Boundaries shared by two polygons are stored twice • Sliver polygons
Spaghetti Vector Model Advantages 1. Simple 2. Relatively efficient as a method of cartographic display
Spaghetti Vector Model 1. Unstructured, lines often do not connect when they should 2. Spaghetti model severely limits spatial data analysis (e.g., area calculation) Disadvantages
Topological vector models • In addition to coordinate locations, Topological vector model explicitly record topological relationships (Polygon adjacency is an example) “Topology: Spatial relationships between points, lines & polygons”
Arc # Start Node Vertices End Node • 2 1,6 5 • 2 3,4 5 • 2 5 Polygon arc list A①, ③ B②, ③ The Arc-Node Data Structure 2 Arc: ①, ②, ③ Nodes: 2, 5 Vertices: 1, 6 for arc ① 3, 4 for arc ② 3 1 ③ B ② A ① 4 5 6 • Points • 1 x1,y1 • 2 x2,y2 • 3 x3,y3 • x4,y4 • 5 x5,y5 • 6 x6,y6
Topology Topology defines spatial relationships. The arc-node data structure supports three major topological concepts: Connectivity: Arcs connect to each other at nodes Area definition: Arcs that connect to surround an area define a polygon Contiguity: Arcs have direction and left and right sides
Topology: Connectivity Connected arcs are determined by searching through the list for common node numbers. Arc-node list 10 11 12 ① ② • Arc From-Node To-Node • 10 11 • 11 12 • 11 13 • 13 15 • 13 14 ③ ⑤ 13 14 ④ 15 Because of the common node 11, arcs 1, 2, and 3 all intersect. The computer can determine that it is possible to travel along arc 1 and turn onto arc 3. But it is not possible to turn directly from arc 1 to arc 5.
A 1 8 B 5 C 4 2 E 9 D 6 7 3 Topology: Area Definition Polygon-Arc Topology Polygon Arc List B 1,5,8,4 C 2,6,9,5 D ? E ? Polygons are simply the list of arcs defining its boundary, arc coordinates are stored only once, therefore, reducing the amount of data and ensuring that the boundaries of adjacent polygons don’t overlap
Topology: Contiguity An Arc left From-Node To-Node right Direction 1 8 • Arc Left Right • Polygon Polygon • C B • E C • ? ? • 1 ? ? B 5 C 4 2 E 9 D 6 7 Two geographic features which share a boundary are called adjacent. Contiguity is the topological concept which allows the vector data model to determine adjacency. 3
Advantages of topological model • Spatial relationships between features are explicitly encoded, making it very easy to determine if polygons are adjacent, if arcs connect, etc. • Highly desirable model if spatial analysis is to be done on the data
Limitations of topological model • Data must be very “clean” all lines must begin and end with a node all lines must connect correctly all polygons must be closed • Computational cost