Data Models (Raster) Reading Assignment: Bolstad, Chapter 2.
Topic 5: Raster and Vector Data Models · 2017-10-02 · 10/2/2017 3 Database Models Also...
Transcript of Topic 5: Raster and Vector Data Models · 2017-10-02 · 10/2/2017 3 Database Models Also...
10/2/2017
1
Geography 38/42:286
GIS 1
Topic 5:
Raster and Vector Data Models
Chapters 3 & 4: Chang(Chapter 4: DeMers)
1
The Nature of Geographic Data
Most features or phenomena occur as either:
discrete entities (objects/PLPs)
continuously varying phenomena (fields/CS)
some could go either way
2
GIS Data Representation
How PLPs and CS are stored
Two primary GIS data models
Raster
Vector
3
10/2/2017
2
Data Structures and Data Models
“Raster” and “Vector” refer to a particular data model
A data structure refers to a particular implementation of
either the raster or vector model
4
Topology
The spatial relationships between things
An important distinction between data models and data structures
Can be stored or calculated “on the fly”
5
Raster – Vector Data Models
Numerous differences in terms of:accuracy
storage
functionality
efficiency
topology
representation of disrete vs continuously distributed phenomena
6
10/2/2017
3
Database Models
Also differences in how attribute data are stored
7
Raster Data Model
Study area divided up into a regular array of
discrete grid cells of uniform shape and size
8
Raster Representation of PLPs
73
Figure 5.2
Representation of point, line,
and area features: raster
format on the left and vector
format on the right.
9
10/2/2017
4
Sources of Raster Data
Common raster data sources include:
Imagery (satellite, aerial photography)
Classified imagery
DEMs, DSMs, DTMs, etc.
Scanned products (e.g. maps)
Interpolated or generated “surfaces"
10
Thematic vs. Discrete
Thematic rasters - discrete representations
Continuous rasters - continuous representations
11
Accuracy of Raster Data
Determined by grid cell size
Referred to as resolution
User defined
Sensor design
12
10/2/2017
5
Projecting Raster Data
Grid cells represent same location on the ground
Georeferencing aligns raster layer to real world
coordinate system
13
14
Advantages of Raster Model
Advantages:
Easy to understand
Mathematical operations
Representing continuous phenomena
15
10/2/2017
6
Disadvantages of Raster Model
Disadvantages:Representing discrete phenomena
Data redundancy
No topology (for discrete data)
Spatial accuracy
16
Raster Data Structures
Method by which raster model is implemented in a
particular GIS software application
Typically, user is unaware of how data structure works
17
79
Figure 5.8
The cell-by-cell data structure
records each cell value by row
and column.
Cell by Cell
18
10/2/2017
7
80
Figure 5.9
The run length encoding method
records the cell values in runs. Row
1, for example, has two adjacent
cells in columns 5 and 6 that are
gray or have the value of 1. Row 1
is therefore encoded with one run,
beginning in column 5 and ending in
column 6. The same method is used
to record other rows.
Run Length Encoding8,8,1
0,4,1,2,0,2
0,3,1,3,0,2
0,2,1,5,0,1
0,2,1,5,0,1
0,2,1,5,0,1
0,1,1,6,0,1
0,1,1,6,0,1
0,8
19
80
Figure 5.9
The run length encoding method
records the cell values in runs. Row
1, for example, has two adjacent
cells in columns 5 and 6 that are
gray or have the value of 1. Row 1
is therefore encoded with one run,
beginning in column 5 and ending in
column 6. The same method is used
to record other rows.
Block Codes
1,1,2,4,6,2,7,2
4,1,1,5
25,1,3,3
20
80
Figure 5.9
The run length encoding method
records the cell values in runs. Row
1, for example, has two adjacent
cells in columns 5 and 6 that are
gray or have the value of 1. Row 1
is therefore encoded with one run,
beginning in column 5 and ending in
column 6. The same method is used
to record other rows.
Chain Codes
0=N, 1=E, 2=S, 3=W
1,5,1
1,1,2,2,1,1,2,4,3,5,0,1,1,1,0,3
1,1,0,1,1,1,0,1
21
10/2/2017
8
81
Figure 5.10
The regional quad tree
method divides a raster into a
hierarchy of quadrants. The
division stops when a
quadrant is made of cells of
the same value (gray or
white). A quadrant that
cannot be subdivided is
called a leaf node. In the
diagram, the quadrants are
indexed spatially: 0 for NW, 1
for SW, 2 for SE, and 3 for
NE. Using the spatial
indexing method and the
hierarchical quad tree
structure, the gray cells can
be coded as 02, 032, and so
on. See text for more
explanation.
0
1 2
30
1 2
30
1 2
3
Quad Tree
22
82
Figure 5.11
The Haar wavelet and the wavelet transform. (a) Three Haar wavelets at
three scales (resolutions). (b) A simple example of the wavelet transform.
Mr SID
23
Vector Data Model
Study area is referenced to a coordinate system
that is used to identify the location of points,
lines, and polygons using x, y, (z) coordinates
24
10/2/2017
9
Vector Representation of PLPs
25
Vector Data Sources
Common vector data sources include:
NTDB data (National Topographic Database)
MLI data (1:20k roads, hydrology, etc.)
Tiger Data (U.S. Cesus)
GPS or Total Station survey data
Digitized data
26
Vector Data Model
Advantages:
Representation of discrete objects
No data redundancy
Spatial accuracy
Topology
27
10/2/2017
10
Vector Data Model
Disadvantages:
Mathematical analysis
Not suitable for continuously distributed data
28
Vector Data Models
Non-topological
Topological
29
Vector Data Models
Today there are two basic vector data models
Georelational Vector Data Model
– Arc/Info coverages & ArcView shapefiles
Object-based Vector Data Model
– ArcGIS geodatabases
30
10/2/2017
11
40
Figure 3.2
Based on the georelational data model, an ArcInfo coverage
has two components: graphic files for spatial data and INFO
files for attribute data. The label connects the two components.
Georelational
Data Model
31
45
Figure 3.7
The data structure of a point
coverage.
32
46
Figure 3.8
The data structure of a line coverage.
33
10/2/2017
12
47
Figure 3.9
The data structure of a polygon coverage.
34
48
Figure 3.10
A polygon coverage, shown in a, has topological errors. Each small square
symbol represents an error caused by lines that do not meet correctly. The
shapefile, shown in b, is converted from the polygon coverage.
35
Georelational Data Model
ArcView shapefiles
Non-topological vector data model
Topology on the fly
Advantages
36
10/2/2017
13
37
Object-based Model
Based on object oriented programming theory
Objects:
represent features
have defined properties and methods
can be organized into classes
38
Geodatabase Model
Geospatial features represented using objects
Features have properties and methods
Features and attributes stored in single file/database
39
10/2/2017
14
78
Figure 4.1
The object-based data model stores each land use polygon in a record.
The Shape field stores the spatial data of land use polygons. Other fields
store attribute data such as Landuse_ID and Category.
Binary field storing feature geometry
40
89
Figure 4.8
In a geodatabase, feature classes can be standalone
feature classes or members of a feature dataset.
Soil Conservation Projects
Shoal Lake Study Area
RM Boundaries
Streams
Soil Type
41
94Table 4.1 Topology rules in the geodatabase data model
must be covered by boundary of, must be properly inside
polygons, must be covered by endpoint of, and must be
covered by line
Point
must not overlap, must not intersect, must not have dangles,
must not have pseudo-nodes, must not intersect or touch
interior, must not overlap with, must be covered by feature
class of, must be covered by boundary of, endpoint must be
covered by, must not self overlap, must not self intersect, and
must be single part
Line
must not overlap, must not have gaps, must not overlap with,
must be covered by feature class of, must cover each other,
must be covered by, boundary must be covered by, area
boundary must be covered by boundary of, and contains point
Polygon
RuleFeature
Type
42
10/2/2017
15
ArcGIS Geodatabase Structure
Advantages
Validation rules
– Topology Rules
– Attribute Domains
– Relationship Rules
– Connectivity Rules
– Custom Rules
43
Midterm Exam to Here
Thursday, October 20TH
44
Raster – Vector Conversion
Rasterization
Vectorization
45
10/2/2017
16
115
Figure 5.12
On the left is an example of conversion from vector to raster data, or
rasterization. On the right is an example of conversion from raster to
vector data, or vectorization.
46
Why Convert?
Rasterize
statistical or other mathematical operations
Vectorise
extract thematic information from classified RS
imagery ( roads, rivers, land cover classes)
scanned maps (ArcScan)
47
Why Integrate?
As an image background
Image hotlinks
To subset and classify imagery
Still seldom used in analysis together
48
10/2/2017
17
Rasterization
specify output grid cell size
attribute to be used as cell value
grid cell size v. important
½ min. dimension of smallest feature
inevitable distortion
49
Examples
Straight line rasterization
Bresenham’s Line Algorithm
50
Polygon Rasterisation
How are boundary pixels handled?
Central Point
Dominant Unit
Ranked List
51
10/2/2017
18
Central Point
Dominant Unit
52
Scan Line Coherence
Common polygon rasterisation algorithm
Fill grid cells b/w boundary cells
53
Vectorisation
V. imp for feature extraction
Scanned map products
RS imagery second largest source of geospatial data
54
10/2/2017
19
136
Figure 6.11
Large format drum scanners. (Courtesy of GTCO Calcomp, Inc.)
55
Scanning Maps
Considerations:
Colour depth
Resolution
56
Vectorization
For classified RS images
Reclassification
For scanned maps
Image preprocessing
Thresholding
Bilevel images
57
10/2/2017
20
138
Figure 6.12
A binary scanned
file: the lines are
soil lines, and the
black areas are
the background.
58
Vectorization
Editing/pre-processing boolean image
Remove gaps
Noise
Line thinning
59
139
Figure 6.13
A raster line in a
scanned file has a width
of several pixels.
60
10/2/2017
21
Vectorisation
Vectorization of boolean image
Node detection
Cleaning
Build topology
61