Upload
chrystal-willis
View
265
Download
13
Embed Size (px)
Citation preview
Lecture 3 spatial data modeling and management
2023年4月21日 星期五 2
Spatial data structureComparison of vector and rasterIntroduction to spatial databaseData models in traditional databaseData base for GIS
spatia
l data
mod
elin
g a
nd
m
an
ag
em
en
t
2023年4月21日 星期五 3
What is a data model ?
The heart of any GIS is data model A data model is a set of constructions for
describing and representing selected aspects of the real world in a computer
There is no single type of GIS data model that is best for all circumstances
2023年4月21日 星期五 4
The role of a data model in GIS
2023年4月21日 星期五 5
GIS data models
CAD 、 geographical and image GIS data model
Raster Data Model Vector Data Model Object Data Model
2023年4月21日 星期五 6
2023年4月21日 星期五 7
The CAD data model
A CAD model focuses on feature drawing only ,so that it does not represent any kind of relationships between objects
2023年4月21日 星期五 8
Image data model
2023年4月21日 星期五 9
Difference between image data model and raster data model
Image data do not have attribute table attached,so that they have only one attribute field.
Raster data have attribute table that can be joint to other tables ,so that they can have multiple attribute field.
application : image data---image processing
raster data---spatial analysis and modeling
2023年4月21日 星期五 10
Vector data model Vector data model uses a set of
coordinate and relationship to represent real world objects 。
Geometry objects:Point:single pointLine : stringArea : closed loop
other vector model:Triangulated Irregular Network:surfaceRegionDynamic segmentation:network
2023年4月21日 星期五 11
Vector data model :acquisitionSurveying instruments(total
station 、 GPS 、 level,etc.)Digitize mapIndirect methods:
Rater to vectorData from spatial analysis
2023年4月21日 星期五 12
Vector data model : how to describe
Storage and management of vector dataAssociate geometry data and attribute dataRelationship of spatial objects
2023年4月21日 星期五 13
Vector data model—the spaghetti structure
Only to record position and attribute information of the spatial object,but not topological relationship
Storage : Independence : spatial objects with its geometry
information Point dictionary : coordinate storage is separated from its
spatial objects Characters:
no topological relationship ,so that only can be used to presentation and simple query of spatial object
Exists data redundancy Can not keep consistency of the data,for the common part repeats
storage Spatial analysis is more complicated Can not deal with the operation of polygon
Appropriate applications : For the disadvantages that stated above,this data structure can be
used to map and general query,but not for spatial analysis
Vecto
r data
m
od
el(
con
t.
)
2023年4月21日 星期五 14
ID Attribute
Encoding of spatial objects Sole Associate the attribute and position
database Encodingpoint: ( x ,y )line: ( x1 , y1 ) , (x2 , y2 ) , … , ( xn , yn )area: ( x1 , y1 ) , (x2 , y2 ) , … , ( x1 , y1 )
Point dictionary
point
line
area
No X Y
1 11 22
2 33 44
… … …
n 55 66
Geometry
Vecto
r data
mod
el(
con
t.
)
2023年4月21日 星期五 15
Vector data model:example of spaghetti structure
1
23
45
6
7A
B
polygon code coordinate
A t123 1 , 2
3 , 4
…
B t124 5 , 6
No. of point
coordinate
1
2
3
4
5
1 , 2
3 , 4
5 , 6
7 , 8
…
polygon code No. of point
A
B
T123
t124
1,2,3,4,7,6,1
1,6,7,4,5,1
2023年4月21日 星期五 16
Vector data model:the topological structure
Not only expressed the position and attribute of objects,but also relationship between objects
Generally the topological relationship is conjunction
The conjunction can be expressed in full expression and part expression
Storage Directly storageSerial pointer
Topological relationship and data share Conditions of using topological relationship
Vecto
r data
m
od
el(
con
t.
)
2023年4月21日 星期五 17
Vector data model : full expression
N1
B2
N2
N4
N3B3 B4
B1
A1 A2
A6
A5
A4
A3
A7 A8
N5
A8
B1 B2 B3 B4
A1 A2 A3 A4 A5 A6 A7
N1 N2 N3 N4 N5
M
Area
Arc
Node
Polygon-arc Polygon Arc
Arc-node Arc from
Arc-polygon Arc Left
Node-arc Nod e Arc
to
Right
Vecto
r data
m
od
el(
con
t.
)
2023年4月21日 星期五 18
Vector data model:part expression
Using part table to describe topological relation
System9 : polygon-arc 、 arc-node
DIME : arc-node 、 arc-polygon
The topological relationship is all in the above
states in current GIS
Vecto
r data
m
od
el(
con
t.
)
2023年4月21日 星期五 19
Topological structure : how to describe in computer
pointerpolygon-arc 、 node-arc : it is not convenient
directly storage for unequal length of record
Example:POLYVRT
TIGER
Directly storageArc/Info 、 GeoStar
Vecto
r data
m
od
el(
con
t.
)
2023年4月21日 星期五 20
Topological structure:topological relationship and data share
To keep data consistent
Move node with topological relation
Move node with no topological relation
Vecto
r data
m
od
el£
¨con
t.£
©
2023年4月21日 星期五 21
Topological relations : when to use topological structure
Application Map and general query can not use topological
structure Topological relation can be used to spatial analysis
Objects can be described with topological relation Polygon object : polygon-arc 、 arc-polygon Network object : node-arc 、 arc-node
Vecto
r data
m
od
el(
con
t.
)
2023年4月21日 星期五 22
Vector data model : attribute
Type
type : what is the object?
explanation information : different attribute with the same object
description
Encode
Attribute table
The item of attribute table depends on users
2023年4月21日 星期五 23
pointID
ID
Encoding Coordinate related line
Precision Control-point
gradeGeodesic
organizationGeodesic
years
lineID
ID
Encoding Coordinate from 、 to 、 left 、 right
Material Grade Build time
Breadth Managementorganization
……
……
areaID
ID
Encoding No. of
boundaryBuild time
ownerBuilding
areaBuild
organizationstructure ……
Spatial objects
Encoding Name of
objectMap color
Type of geometry
Map sign encoding
Attribute
Type of object and attribute
Map graphic data to attribute data linkage
2023年4月21日 星期五 24
Triangulated irregular network
X-Y Coordinates
node# coordinates
1
2
3
11
. . .
x1, y1
x2, y2
x3, y3
. . .
x11, y11
Z Coordinates
node# z_value
1
2
3
11
. . .
z1
. . .
z2
z3
z11
1
2
3
6
5
87
9
11
10
4
A
B
C
D
E
F
G
H
I
JK
LM
NEDGES
adjacent
A
B
C
D
E
F
G
H
I
J
K
L
M
N
B, K
A, C, L
B, D
C, E, L
D, F
E, G
F, H, M
G, I
H, J, N
I, K
A, J, N
B, D, M
G, L, N
I, K, M
NODES
node#
A
B
C
D
E
F
G
H
I
J
K
L
M
N
1, 6, 7
1, 7, 8
1, 2, 8
2, 8, 9
2, 3, 9
3, 4, 9
4, 9, 10
4, 5, 10
5, 10, 11
5, 6, 11
6, 7, 11
7, 8, 9
7, 9, 10
7, 10, 11
2023年4月21日 星期五 25
Triangulated irregular network (cont.)
2023年4月21日 星期五 26
Dynamic segmentation
Dynamic segmentation associates multiple sets of attributes to any portion of a linear feature
Elements of dynamic segmentation : Route--- A route is a linear feature on which attributes are defined Measure---Each route is associated with a measurement system
Events---Attributes associated with a route Advantage of dynamic segmentation
• Define linear feature within a line coverage• Work with data in route-measure format• Apply attributes in route-measure to any part of a route without
modifying underlying coordinate data Used to network analysis
2023年4月21日 星期五 27
Vector data structure : advantages and disadvantages
Distinct location and implicit attributeRepresent spatial relation with topological
relationshipsObject-based operation with high accuracy and less
data redundancyDifficult to combine with RS dataHigh quality graphics
2023年4月21日 星期五 28
Definition Divides the entire study area into a regular grid of cells,each cell contains a single value
In rater data structurePoint : pixel or cellLine : represented in cluster of adjacent pixel 。Area : pixel with same attribute that are congregated
Data sources :Remote sense imageScanner Vector to raster Manual
Raster coordinates Compress raster data Raster layers Rater data file structures Advantage and disadvantage of raster data structure
Raster data structure:contents
2023年4月21日 星期五 29
Point
Line Area
2023年4月21日 星期五 30
Raster data structure : coordinate system and parameters
Y : Col
X : Row
North-west coordinate
( XWS , YWS )
Resolution
Grid direction
2023年4月21日 星期五 31
Raster data structure : assign value to cell
C
A
B
Percentage
Area
importance
Midpoint
A C A AB
2023年4月21日 星期五 32
Raster data structure:compression
A AAAA RAAA RAAA RAA
R AAAA AAAA AGGA AGGG GGGG AGGG AGGA AAA
A ARAA AARA AARR AAA
1 432 5 87612345678
0
12
3
4
56
7Number of start row and column,unit vectorR: (1,5),3,2,2,3,3,2,3
Chain codes
Run-length codes Recording on row or columnNo. of row ,attribute, number of repeats1, A, 4, R, 1, A, 4
Block codes Rectangle Initial position, radius, value(1,1,3,A),(1,5,1,R),(1,6,2,A),¡
NE SWNW
SE
G
GGGAGGAAGAAA
Quarter-treecodes
2023年4月21日 星期五 33
Hierarchy of the raster data structure
Soil
relief
Forest
Building Z
Y
X
2023年4月21日 星期五 34
File structure of the raster data structure
Each cell is referenced directly , Map file
Point X coordinate
Y coordinate
Next overlayvalues
Overlay values
…
…
Next point
Each overlay is referenced directly, Map file
Overly Point
Next overlay
…
(X,Y) coordinate
Z value
Next point …
… …
…
Each mapping unit is referenced directly
Overlay tile
Next overlay
X,Y Coordinates pairs
Lable
Display symbol
Mapping unit 1
Attribute
Scale
Next mappingunit
2023年4月21日 星期五 35
Raster data structure:advantages and disadvantages
Spatial object represented in discrete cell value
Location is implicit and attribute is distinctSimple data structure and easy to combine
with RS dataExisting errors in geometry and attributeDifficult to build the relationship between
spatial objects
2023年4月21日 星期五 36
a b
c
3
4
5
a b
c
Ac distance: 7/4 (5)area: 7 (6)
Geometry bias
Attribute bias
2023年4月21日 星期五 37
Com
paris
on
of v
ecto
r an
d ra
ste
r data
m
od
el
Vector model
advantages :•It provides a more compact data structure than the raster model
•It provides efficient encoding of topology ,and as a result ,more efficient;implementation of operations that require topological information ,such as network analysis
•The vector model is better studies to supporting graphics that closely approximate hand-drawn maps
disadvantages :•It is a more complex data structure than a simple raster
•Overlay operations are more difficult to implement
•The representation of high spatial variability is inefficient
•Manipulation and enhancement of digital images can not be efficiently done in the vector domain
Raster model
advantages :• It is a simple data structure
• Overlay operation are easily and efficiently implemented
• High spatial variability is efficiently represented in a rater format
• The raster format is more or less required for efficient manipulation and enhancement of digital images
disadvantages :• The raster data structure is less compact
• Topological relationships are more difficult to represent
• The output of graphic is less aesthetically pleasing because boundaries tend to have a blocky appearance rather than the smooth lines of hard-drawn maps.this can be overcome by using a very large numbers of cells ,but may result in unacceptable large files
2023年4月21日 星期五 38
Object or fieldsAcceptable data Necessary accuracy of spatial objects location Topological relationshipsType of spatial analysisType of map
Principles of selecting data models
2023年4月21日 星期五 39
Spatial data management : spatial database data base
A data base is defined as structured collection of information on a defined subject
characters:Data is independent on application programsRelationship of data represent the connection of
information in the real worldConventional data base management structures
Hierarchy database structureNetwork database structureRelational database structure
2023年4月21日 星期五 40
Spatial data management : spatial database ( cont.)
Spatial database A spatial data base is a collection of geographical
data and information on a defined areacharacters:
Huge data quantity Location and attribute data combinedBroad application areas
Features of spatial data basespatialityNon-structuredSpatial relationshipsClassification encoding Huge data quantity
2023年4月21日 星期五 41
Comparison of conventional database and spatial database
Conventional database
Spatial database
continuous/correlationDiscontinuous
Non-correlation
Continuous
Spatial correlation
Type of entity/spatial relationship
Few
Steady
Many
Unsteady
Record length Structured
Equal
Non-structured
Unequal
Query and manipulation
words 、 numbersSpatial operations besides words and numbers
2023年4月21日 星期五 42
Spatial database management Hybrid model based on data file and
relational database Extended model based on relational
database Integrated model based on object-
relation database
2023年4月21日 星期五 43
location
attributeID
data file
database
early
Graphic interface
Graphic process DBMS
Attribute interface
Graphic filedatabase
Attributedatabase
GIS interface
Graphic process DBMS
Graphic filedatabase
Attributedatabase
Developmentlanguage ODBC agreement
GIS interface
Graphic process DBMS
Graphic filedatabase
Attributedatabase
Developmentlanguage
Database developmentlanguage
Database
development
Database development
Spatial data management based on file-relational database
2023年4月21日 星期五 44
GIS interfaceGIS interfaceAttribute data( equal records )
Attribute data( equal records ) Spatial data
( unequal records )Spatial data
( unequal records )
DBMSDBMS
Spatial database
Spatial database
Relationaltables
Relationaltables
Binary blocks
Binary blocks
Spatial data management based on relational database
2023年4月21日 星期五 45
GIS interface
Spatial data process
DBMS
Spatial database
Extend entities type
Spatial data management based on object-relation database
2023年4月21日 星期五 46
GIS spatial data organization
Study domain GIS project
Concomitantcontrol
Spatial index Workspace 1
Workspace2
Workspace n
Work layer
objects
Logic layer
Arc/Info
MGEGeoStar
Attribute Arc/Info
MGEGeoStar
2023年4月21日 星期五 47
Spatial data index
What is spatial data indexWhy is spatial data index needed in
GISHow to build spatial data index
2023年4月21日 星期五 48
Spatial data index:object range index
ID Xmax Xmin Ymax Ymin
1 … … … …
2 … … … …
3 … … … …
… … … … …
4 YmaxYmin
Xmin
Xmax
Collection of spatial objects
1
23
45
6
Retrieved windows
XN
YW YE
XS
Xmax>=XN OR Xmin<=XS OR
Ymax>=YE OR Ymin<=YW
No
XE<=Xmax,Xmin<=XN ANDYW<=Ymax,Ymin<=YEYES
XN
YW YE
XS
23
6
2023年4月21日 星期五 49
Spatial data index :index based on grid
P(3,3)=6P(3,1)=4 P(3,2)=10
3 41 2
P(2,3)=1P(2,1)=7 P(2,2)=8
3
1
4
2
Header pointer
ID P
1 0
2 0
3 0
4 0
5 2
6 0
7 3
3 41 2
3
1
4
23
75
2
104
8
9
1
6
8 5
9 0
10 9
Link pointer
2023年4月21日 星期五 50
作业: 简述常用空间数据结构的特点; 简述空间数据库的特征,目前空间数据是如
何进行管理组织的? 简述栅格数据的压缩编码方案 试给出格网索引实现的原理(建立和检索)