1 Data models Vector data model Raster data model.

17
1 Data models Vector data model Raster data model

Transcript of 1 Data models Vector data model Raster data model.

Page 1: 1 Data models Vector data model Raster data model.

1

Data models

Vector data model

Raster data model

Page 2: 1 Data models Vector data model Raster data model.

2

The Vector Model of Real world

point line polygon(area)

(x,y)

(x,y)

(x,y)

(x,y) (x,y)

(x,y)

(x,y)

(x,y)(x,y)

(x,y)

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 areasA polygon: recorded by a joining multiple points that enclose an area

Page 3: 1 Data models Vector data model Raster data model.

3

Spaghetti Vector Data Model

Points Data Storage

+1+2

+3+4

Point ID Coordinates

1 1, 12 4, 23 5, 2 4 2, 4

Each point, line, or polygon is stored as a record

in a file that consists ID and a list of coordinates.

Page 4: 1 Data models Vector data model Raster data model.

4

Spaghetti Vector Data Model

ID Coordinates

1 (0,1), (3,4), (5,6)

2 (3,1), (5,2), (4,3)

1

2

Lines:

Page 5: 1 Data models Vector data model Raster data model.

5

Spaghetti Vector Model

Uses a single line to represent the boundary of a polygon– Boundaries shared by two polygons are stored

twice– Sliver polygons

Page 6: 1 Data models Vector data model Raster data model.

6

Advantages

1. Simple

2. Relatively efficient as a method of cartographic display

Spaghetti Vector Model

Page 7: 1 Data models Vector data model Raster data model.

7

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

Page 8: 1 Data models Vector data model Raster data model.

8

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”

Page 9: 1 Data models Vector data model Raster data model.

9

1

65

2

4

3

①②③

Arc: , , ① ② ③ Nodes: 2, 5Vertices: 1, 6 for arc ① 3, 4 for arc ②

Arc # Start Node Vertices End Node

1 2 1,6 52 2 3,4 53 2 5

Polygon arc listA , ① ③B , ② ③

A B

Points1 x1,y12 x2,y23 x3,y34 x4,y45 x5,y56 x6,y6

The Arc-Node Data Structure

Page 10: 1 Data models Vector data model Raster data model.

10

Topology

Topology defines spatial relationships. The arc-node data structure supports three major topological concepts:

Connectivity: Arcs connect to each other at nodesArea definition: Arcs that connect to surround an area define a polygonContiguity: Arcs have direction and left and right sides

Page 11: 1 Data models Vector data model Raster data model.

11

Topology: Connectivity

10 11 12

13 14

15

① ②

Arc From-Node To-Node1 10 112 11 123 11 134 13 155 13 14

Arc-node list

Connected arcs are determined by searching through the list for common node numbers.

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.

Page 12: 1 Data models Vector data model Raster data model.

12

Topology: Area Definition

B

A

C

D

E

1

2

3

4

5

67

8

9

Polygon Arc List B 1,5,8,4 C 2,6,9,5 D ? E ?

Polygon-Arc Topology

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

Page 13: 1 Data models Vector data model Raster data model.

13

Topology: Contiguity

An ArcFrom-Node To-Node

Direction

left

right

BC

D

E

1

2

3

4

5

67

8

9

Arc Left Right Polygon Polygon5 C B9 E C10 ? ? 1 ? ?

Two geographic features which share a boundary are called adjacent. Contiguity is the topological concept which allows the vector data model to determine adjacency.

Page 14: 1 Data models Vector data model Raster data model.

14

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

Page 15: 1 Data models Vector data model Raster data model.

15

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

Page 16: 1 Data models Vector data model Raster data model.

16

Page 17: 1 Data models Vector data model Raster data model.

17

Key to Arc-Node table