2 Spatial Concepts and Data Models
2 Spatial Concepts and Data Models
Concepts and Data
Models
Outline
1. Introduction
2. Models of Spatial Information
3. Three‐Step Database Design
4. Extending ER with Spatial Concept
5. Summary
What is a Data Model?
• What is a model? (Dictionary meaning)
• A set of plans (blueprint drawing) for a building
• A miniature representation of a system to analyze properties
of interest
• Two common models
Pine
– Field based (0,2)
– Object based
Fir Oak
• Example: Forest stands
– Fig. 2.1 (0,0) (2,0) (4,0)
– (a) forest stand (a)
x
map
Object Viewpoint of Forest Stands Field Viewpoint of Forest Stands
– (b) Object view Dominant
"Pine," 2 x 4 ; 2 y 4
Area-ID Area/Boundary
has 3 polygons Tree Species
f(x,y) "Fir," 0 x 2; 0 y 2
FS1 Pine [(0,2),(4,2),(4,4),(0,4)]
– (c ) Field view has "Oak," 2 x 4; 0 y 2
FS2 Fir [(0,0),(2,0),(2,2),(0,2)]
a function
FS3 Oak [(2,0),(4,0),(4,2),(2,2)]
(b) (c)
2.1.1 Field based Model
• Three main concepts:
– Spatial Framework is a partitioning of space
• e.g., Grid imposed by Latitude and Longitude
– Field Functions:
f: Spatial Framework Attribute Domain
– Field Operations
• Examples, addition(+) and composition(o).
f g : x f ( x) g ( x)
f g : x f ( g ( x))
Types of Field Operations
• Local: value of the new field at a given location in the spatial frame-
work depends only on the value of the input field at that location(e.g.,
Thresholding)
Point City 0
Curve River 1
Surface Country 2
Spatial Object Types in OGIS Data
Model
Classifying Operations on spatial objects in
Object Model
• Classifying operations (Tables 2.1, 2.2, pp. 29-31)
• Set based: 2-dimensional spatial objects (e.g. polygons) are sets of points
• a set operation (e.g. intersection) of 2 polygons produce another
polygon
• Topological operations: Boundary of USA touches boundary of Canada
•Directional: New York city is to east of Chicago
•Metric: Chicago is about 700 miles from New York city.
• Q? Identify classes of spatial operations not listed in this slide.
Green is A interior ( Ao )
U
Red is boundary of A (A)
Question: Define Interior, boundary, exterior on curves and points.
Nine‐Intersection Model of Topological
Relationships
•Many toplogical Relationship between A and B can be
•specified using 9 intersection model
•Examples on next slide
•Nine intersections
•intersections between interior, boundary, exterior of A, B
•A and B are spatial objects in a two dimensional plane.
•Can be arranged as a 3 by 3 matrix
•Matrix element take a value of 0 (false) or 1 (true).
•Q? Determine the number of many distinct 3 by 3 boolean matrices .
Specifying topological operation in 9‐
Intersection Model
Fig 2.3: 9 intersection matrices for a few topological operations
0 0 1 1 1 1 1 0 0 1 0 0
0 0 1 0 0 1 1 0 0 0 1 0
1 1 1 0 0 1 1 1 1 0 0 1
disjoint contains inside equal
0 0 1 1 1 1 1 0 0 1 1 1
0 1 1 0 1 1 1 1 0 1 1 1
1 1 1 0 0 1 1 1 1 1 1 1
meet covers coveredBy overlap
M M N
supplies_water_to River Crosses Road
M
N
Name Accesses
Polygonid
Elevation N Polygonid
Within
M 1
Facility
1
belongs_to
1
Forest
1
part_of
M
Forest-Stand
Fig 2.4
1
Lineid 1
monitors manages Species
Name M
1
Stand-id
Gender
Age
Pointid Name
•Exercise:
•List the entities, attributes, relationships in this ER diagram
•Identify cardinality constraint for each relationship.
•How many roads “Accesses” a “Forest_stand”? (one or many)
2.2.2 Logical Data Model: The
Relational Model
• Relational model is based on set theory
• Main concepts
– Domain: a set of values for a simple attribute
– Relation: cross‐product of a set of domains
• Represents a table, i.e. homogeneous collection of rows (tuples)
• The set of columns (i.e. attributes) are same for each row
• Comparison to concepts in conceptual data model
– Relations are similar to but not identical to entities
– Domains are similar to attributes
Relational Schema Example
Forest-Stand Fstand-Geom
River River-Geom
Fire-Station Fstation-Geom
Supplies_Water_To Road-Access-Forest
Manager
Fig 2.5
Relational Schema for “Point”, “Line”, “Polygon” and “Elevation”
Polygon Line
Point Elevation
Derived Shape
Alternate Shape
Cardinality 0, 1
1, n
n 0, n
0, n
Pictograms Multishapes
Grammar (for Cardinality) (using cardinality)
Entity Pictograms: Derived and
Alternate Shapes
•Derived shape example is city center point from boundary polygon
•Alternate shape example: A road is represented as a polygon for construction
•or as a line for navigation