0% found this document useful (0 votes)
78 views30 pages

2 Spatial Concepts and Data Models

This document discusses spatial data models. It defines what a data model is and why they are important. There are two main types of spatial data models: field-based models and object-based models. A field-based model represents spatial information as fields defined over a spatial framework, while an object-based model represents the world as discrete objects with spatial attributes. Common operations on each model are described such as local, focal, and zonal operations for field models and set-based, topological, directional, and metric operations for object models. Topological relationships between objects can be specified using a 9-intersection model.

Uploaded by

temesgen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views30 pages

2 Spatial Concepts and Data Models

This document discusses spatial data models. It defines what a data model is and why they are important. There are two main types of spatial data models: field-based models and object-based models. A field-based model represents spatial information as fields defined over a spatial framework, while an object-based model represents the world as discrete objects with spatial attributes. Common operations on each model are described such as local, focal, and zonal operations for field models and set-based, topological, directional, and metric operations for object models. Topological relationships between objects can be specified using a 9-intersection model.

Uploaded by

temesgen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Spatial 

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

• What is Data Model?


• Specify structure or schema of a data set
• Document description of data
• Facilitates early analysis of some properties, e.g. querying
ability, redundancy, consistency, storage space requirements,
etc.
• Examples:
•GIS organize spatial set as a set of layers
•Databases organize dataset as a collection of tables
Why Data Models?
• Data models facilitate
•Early analysis of properties, e.g. storage cost, querying
ability, ...
• Reuse of shared data among multiple applications
• Exchange of data across organization
• Conversion of data to new software / environment
• Proper use of data model may have significantly
reduced the costs.
• If time and date were modeled as abstract data types
in a software, only a small portion of the software
implementing the date
Types of Data Models
•Two Types of data models
•Generic data models
•Developed for business data processing
•Support simple abstract data types (ADTs), e.g. numbers, strings, date
•Not convenient for spatial ADTs, e.g. polygons
•Recall a polygon becomes dozens of rows in 3 tables (Fig. 1.4, pp. 8)
•Need to extend with spatial concepts, e.g. ADTs
•Application Domain specific, e.g. spatial models
•Set of concepts developed in Geographic Info. Science
•Common spatial ADTs across different GIS applications
•Plan of Study
•First study concepts in spatial models
•Then study generic model
•Finally put the two together
2.1 Models of Spatial Information
y (0,4)

• 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)

• Focal: value of the resulting field at a given location depends on the


values that the input field assumes in a small neighborhood of the
location (e.g., Gradient)

• Zonal: Zonal operations are naturally associated with aggregate


operators or the integration function. An operation that calculates the
average height of the trees for each species is a zonal operation.

• Exercise: Classify following operations on elevation field


– (I) Identify peaks (points higher than its neighbors)
– (II) Identify mountain ranges (elevation over 2000 feet)
– (III) Determine average elevation of a set of river basins
2.1.2 Object Model
• Object model concepts
– Objects: distinct identifiable things relevant to an application
– Objects have attributes and operations
– Attribute: a simple (e.g. numeric, string) property of an object 
– Operations: function maps object attributes to other objects
• Example from a roadmap
– Objects: roads, landmarks, ...
– Attributes of road objects: 
• spatial: location, e.g. polygon boundary of land‐parcel
• non‐spatial: name (e.g. Route 66), type (e.g. interstate, residential 
street), number of lanes, speed limit,  …
– Operations on road objects: determine center line, determine 
length, determine intersection with other roads, ...
Classifying Spatial objects
• Spatial objets are spatial attributes of general objects
• Spatial objects are of many types
•Simple
•0- dimensional (points), 1 dimensional (curves), 2 dimensional (surfaces)
•Example given at the bottom of this slide
•Collections
•Polygon collection (e.g. boundary of Japan or Hawaii), …
•See more complete list in Figure 2.2

Spatial Object Types Example Object Dimension

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.

Set theory based Union, Intersection, Containment,

Toplogical Touches, Disjoint, Overlap, etc.


Directional East,North-West, etc.
Metric Distance
Topological Relationships
• Topological Relationships 
– invariant under elastic deformation (without tear, 
merge).
– Two countries which touch each other in a planar 
paper map will continue to do so in spherical globe 
maps.
• Topology is the study of topological relationships
• Example queries with topological operations
– What is the topological relationship between two 
objects A and B ?
– Find all objects which have a given topological 
relationship to object A ?
Topological Concepts
• Interior, boundary, exterior
– Let A be an object in a “Universe” U.

Green is A interior ( Ao )
U
Red is boundary of A (A)

Blue –(Green + Red) is


A exterior ( 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

Question: Can this model specify topological operation between a polygon


and a curve?
Using Object Model of Spatial Data
• Object model of spatial data
– OGIS standard set of spatial data types and 
operations
– Similar to the object model in computer software
– Easily used with many computer software systems
– Programming languages like Java, C++, Visual basic
• Example use in a Java program is in section 2.1.6
– Post‐relational databases, e.g. OODBMS, ORDBMS
Example Application Domain
• Database design is for a specific application domain
– Often a requirements document is available 
– Designers discuss requirements with end‐users as needed
– We will use a simple spatial application domain
• to illustrate concepts in conceptual and logical data models
• to illustrate translation of conceptual DM to logical DM
• Spatial application domain
– A state‐park consists of forests.
– A forest is a collection of forest‐stands of different species
– State‐Park is accessed by roads and has a manager
– State‐Park has faciltities
– River runs through state‐park and supplies water to the 
facilities
ER Diagram for “State‐Park”
Length

Volume Name NumofLanes


Name Lineid Lineid

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

Name Fire-Station Manager

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

Stand-id Species Forest-name Stand-id Polygonid

(Integer) (varchar) (varchar) (Integer) (Integer)

River River-Geom

•Exercise: Name Length Name Lineid


(varchar) (Real) (Integer) (Integer)

•Identify relations with Road Road-Geom

Name NumofLanes Rname Lineid


•primary keys (varchar) (Integer) (varchar) (Integer)

•foreign keys Facility Facility-Geom

•other attributes Name Forest-name Forest-name-2 Name Pointid


(varchar) (varchar) (varchar) (varchar) (Integer)

•Compare with ER diagram Forest Forest-Geom

•Figure 2.4, pp. 37 Name


(varchar)
Name
(varchar)
Polygonid
(Integer)

Fire-Station Fstation-Geom

Name ForName Name Pointid


(varchar) (varchar) (varchar) (Integer)

Supplies_Water_To Road-Access-Forest

FacName RivName Volume RoadName ForName

(varchar) (varchar) (Real) (varchar) (varchar)

Manager

Name Age Gender ForName

(varchar) (Integer) (varchar) (varchar)

Fig 2.5
Relational Schema for “Point”, “Line”, “Polygon” and “Elevation”

•Relational model restricts attribute domains


•simple atomic values, e.g. a number
•Disallows complex values (e.g. polygons) for columns
•Complex values need to be decomposed into simpler domains
•A polygon may be decomposed into edges and vertices (Fig. 2.5)

Polygon Line

Polygonid Seq-no Pointid Lineid Seq-no Pointid

(Integer) (Integer) (Integer) (Integer) (Integer) (Integer)

Point Elevation

Pointid Latitude Longitude Forest-name Pointid (F.K.) Elevation

(Integer) (Real) (Real) (varchar) (Integer) (Real)


Fig 2.5
2.3 Extending ER with Spatial Concepts
•Motivation
•ER Model is based on discrete sets with no implicit relationships
•Spatial data comes from a continuous set with implicit relationships
•Any pair of spatial entities has relationships like distance, direction, …
•Explicitly drawing all spatial relationship
•clutters ER diagram
•generates additional tables in relational schema
•Misses implicit constraints in spatial relationships (e.g. partition)
•Pictograms
•Label spatial entities along with their spatial data types
•Allows inference of spatial relationships and constraints
•Reduces clutter in ER diagram and relational schema
•Example: Fig. 2.7 (next slide) is simpler than Fig. 2.4
ER Diagram with Pictograms: An 
Example
Fig 2.7
Specifying Pictograms
• Grammar based approach  Pictogram   Shape 
• Rewrite rule
• like English syntax diagrams ⴱ
• Classes of pictograms
!
• Entity pictograms
• basic: point, line, polygon
• collection of basic Grammar (for Pictogram)
•...
• Relationship pictograms  Shape   Basic Shape 
• partition, network  Multi-Shape 

 Derived Shape 

 Alternate Shape 

Part_of(Network) Part_of(Partition) Grammar (for Shape)


Pictograms for Relationships
Entity Pictograms: Basic shapes, 
Collections
 Basic Shape 

Point Line Polygon

Grammar (for Basic Shape) Pictograms for Basic Shapes

 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

 Derived Shape   Basic Shape 

Grammar (for Derived Shape) Pictograms for Derived Shapes

 Alternate Shape   Basic Shape   Derived Shape 


 Basic Shape   Basic Shape 

Grammar (for Alternate Shape)

Pictograms for Alternate Shapes


2.5 Summary
• Spatial Information modeling can be classed 
into Field based and Object based
• Field based for modeling smoothly varying 
entities, like rainfall
• Object based for modeling discrete entities, 
like country
Summary
• A data model is a high level description of the 
data
– it can help in early analysis of storage cost, data 
quality
• There are two popular models of spatial 
information
– Field based and Object based
• Database are designed in 3‐steps
– Conceptual, Logical and Physical
• Pictograms can simplify Conceptual data models

You might also like