spatial and spatio-temporal data models for gis bart kuijpers limburgs universitair centrum...

157
Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum http://alpha.luc.ac.be/~lucp1265/ [email protected]

Post on 21-Dec-2015

216 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatial and Spatio-Temporal Data Models for GIS

Bart Kuijpers

Limburgs Universitair Centrumhttp://alpha.luc.ac.be/~lucp1265/

[email protected]

Page 2: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Overview

• Spatial data models in GIS– layers– raster model, vector model– specific models

• Spatial database systems

• Spatio-temporal data models– challenges and problems

Page 3: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

What is the S in GIS?

• 1980s: Geographic Information Systems– technology for the acquisition and management of spatial information– software for professional users, e.g. cartographers– Example: ESRI Arc/View software

• 1990s: Geographic Information Science– comprehending the underlying conceptual issues of representing data

and processes in space-time– the science (or theory and concepts) behind the technology– Example: design spatial data types and operations for querying

• 1990s: Geographic Information Studies– understanding the social, legal and ethical issues associated with the

application of GISy and GISc

• 2000s: Geographic Information Services– Web-sites and service centers for casual users, e.g. travelers– Service (e.g., GPS, mapquest) for route planning

Page 4: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

GIS -- What is it?No easy answer anymore!

• Geographic Information – information about places on the earth’s surface– knowledge about “what is where when”

(Don’t forget time!)

• Geographic Information Technologies– technologies for dealing with this information

• Global Positioning Systems (GPS)

• Remote Sensing (RM)

• Geographic Information Systems (GIS)

Page 5: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Examples of GIS data

• Urban Planning, Management– Land acquisition– Economic development– Housing renovation programs– Emergency response– Crime analysis

• Environmental Sciences– Monitoring environmental risk– Modeling stormwater runoff– Management of watersheds,

floodplains, wetlands, forests– Environmental Impact Analysis– Hazardous or toxic facility

siting• Political Science

– Analysis of election results– Predictive modeling

• Civil Engineering/Utility– Locating underground facilities– Coordination of infrastructure

maintenance• Business

– Demographic Analysis– Market Penetration/ Share

Analysis• Education Administration

– Enrollment Projections– School Bus Routing

• Real Estate– Neighborhood land prices– Traffic Impact Analysis

• Health Care– Epidemiology– Service Inventory

Page 6: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Older definitions of GISy

• The common ground between information processing and the many fields using spatial analysis techniques. (Tomlinson, 1972)

• A powerful set of tools for collecting, storing, retrieving, transforming, and displaying spatial data from the real world. (Burroughs, 1986)

• A computerised database management system for the capture, storage, retrieval, analysis and display of spatial (locationally defined) data. (NCGIA, 1987)

• A decision support system involving the integration of spatially referenced data in a problem solving environment. (Cowen, 1988)

Page 7: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Definitions of GIS

“A system of hardware, software, andprocedures designed to support the • capture,• management, • manipulation, • analysis, • modeling and • display of spatially-referenced data (located on the earth’ssurface) for solving complex planning andmanagement problems.”

Page 8: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

GIS Data Models

Intuitive: a map with a database behind it.

Purpose:

allows the geographic features in real world locations

to be digitally represented and stored in a database so

that they can be abstractly presented in map form,

and can also be worked with and manipulated to address

some problem.

Page 9: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

GIS Data Model based on data layers or themes

Page 10: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Examples of layers or themes• Data is organized by layers, coverages or themes, with each

theme representing a common feature.• Layers are integrated using explicit location on the earth’s

surface, thus geographic location is the organizing principal.

Digital ElevationModels

Watersheds Streams Waterbodies

Page 11: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

An integrated view• Layers are integrated using explicit location on the earth’s

surface, thus geographic location is the organizing principal.

Page 12: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Example of layers or themes

Here we have three layers or themes: - roads, - hydrology (water), - topography (land elevation)

They can be related because precise geographic coordinates are recorded for each theme.

roads

hydrology

topography

Page 13: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

How are layers described?

roads

hydrology

topography

•Layers are comprised of two data types:• spatial data which describeslocation (where)stored in a shape file in ArcView• attribute data specifing what, how much, when stored in a database table

GIS systems traditionally maintain spatial and attribute data separately, then “join” them for display or analysis(for example, in ArcView)

Page 14: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

How are layers described?

The spatial component of a layer may be represented in two ways:

• in raster (image) format as pixels

•in vector format as points and lines and areas (PLA-model)

Page 15: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

1. Raster Model

• area is covered by grid with (usually) equal-sized cells• cells often called pixels (picture elements); raster data often called image data • attributes are recorded by assigning each cell a single value based on the majority feature (attribute) in the cell, such as land use type

0 1 2 3 4 5 6 7 8 90123456789

1 1 1 1 1 4 4 5 5 51 1 1 1 1 4 4 5 5 51 1 1 1 1 4 4 5 5 51 1 1 1 1 4 4 5 5 51 1 1 1 1 4 4 5 5 52 2 2 2 2 2 2 3 3 32 2 2 2 2 2 2 3 3 32 2 2 2 2 2 2 3 3 32 2 4 4 2 2 2 3 3 32 2 4 4 2 2 2 3 3 3

corn

wheat

fruit

clov

er

fruitoats

Page 16: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Runlength Compression (for single layer)

Full Matrix-162 bytes Run Length (row)-44 bytes

111111122222222223111111122222222233111111122222222333111111222222223333111113333333333333111113333333333333111113333333333333111333333333333333111333333333333333

1,7,2,17,3,181,7,2,16,3,181,7,2,15,3,181,6,2,14,3,18 1,5,3,18 1,5,3,18 1,5,3,18 1,3,3,18 1,3,3,18

Page 17: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Quad-Tree Representation (for single layer)

Page 18: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Quad-Tree Representation (for single layer)

0

1

2

3

Page 19: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Quad-Tree Representation (for single layer)

Page 20: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Quad-Tree Representation (for single layer)

Page 21: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Quad-Tree Representation (for single layer)

01

2

3

0

1

23

5

64

7

9

108

11

13

1412

15

Page 22: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Quad-Tree Representation (for single layer)

Page 23: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Quad-Tree Representation (for single layer)

Page 24: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Quad-Tree Representation (for single layer)

1

20

3

5

64

7

9

108

11

13

1412

15

Page 25: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Quad-Tree Representation (for single layer)

1

20

3

5

64

7

9

108

11

13

1412

15

4 12

8 10

119

7

6

5

0

Page 26: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: data structures

Quad-Tree Representation (for single layer)

4 12

8 10

119

7

6

5

0

[0,2]white

[4,1]blue

[5,1]white

[6,1]green

[7,1]red

[8,1]red

[9,1]white

[10,1]white

[11,1]green

[12,2]blue

Page 27: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model

Raster data are good at representing continuous phenomena, e.g.,

•Wind speed•Elevation, slope, aspect•Chemical concentration•Likelihood of existence of a certain species•Electromagnetic reflectance (photographic or satellite imagery)

Page 28: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model

• much data comes in this form

•images from remote sensing (LANDSAT, SPOT)•scanned maps

• digital orthophoto

Page 29: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model

• best for continuous features:

•elevation•temperature•soil type•land use

• digital elevation model (DEM)

Page 30: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: Pros and Cons

[+] Continuous (surface) data represented easily

[+] Simple data structure, fast indexing

[–] Shape of discrete polygonal features generalized by cells

[–] Intersection of two lines

Page 31: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster Model: tesselations

•Square grid: equal length sides

–4-connected neighborhood (rook’s case)•all neighboring cells are equidistant

–8-connected neighborhood (queen’s case)•all neighboring cells not equidistant

•rectangular•triangular (3-sided) and hexagonal (6-sided)

–all adjacent cells and points are equidistant

•triangulated irregular network (TIN): –vector model used to represent continuous surfaces (elevation)–more later under vector

Page 32: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

2. Vector Model

The fundamental concept of vector GIS is that all

geographic features in the real work can be

represented either as:• points or dots (nodes): trees, poles, fire plugs,

airports, cities• lines (arcs): streams, streets, sewers,• areas (polygons): land parcels, cities, counties,

forest, rock type

Example: Because representation depends on shape,

ArcView refers to files containing vector data as shapefiles

Page 33: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model

Points: represent discrete point features

each point locationhas a record in thetable

airports are point featureseach point is stored as a

coordinate pair

Page 34: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model

Lines: represent linear features

roads are linear features

each road segmenthas a record in thetable

Page 35: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model

Lines: fundamental spatial data model

• Lines start and end at nodes• line #1 goes from node #2 to node #1

• Vertices determine shape of line• Nodes and vertices are stored as coordinate

pairs

node

node

vertex

vertex

vertex

vertex

Page 36: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model

Polygons: represent bounded areas

each bounded Polygon has a record in thetable

landforms and water are polygonal features

Page 37: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model

• Polygon #2 is bounded by lines 1 & 2• Line 2 has polygon 1 on left and polygon 2 on right

Polygons : fundamental spatial data model

Page 38: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model

• complex data model, especially for larger data sets• “arc-node topology,” only used for ArcInfo data sets

Polygons: fundamental spatial data model

Page 39: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model

• less complex data model• polygons do not share bounding lines

Shapefile polygon spatial data model

Page 40: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model

• Commonly found format (due to ArcInfo market dominance)• Coordinate data not editable in ArcView(but tabular data are editable in ArcView)• polygons share bounding lines

ArcInfo coverage spatial data model

Page 41: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: illustration of polygon

A 3 4

A 4 4

A 4 2

A 3 2

A 3 4

B 4 4

B 5 4

B 5 2

B 4 2

B 4 4

C 3 2

C 4 2

C 4 0

E A B

C D

1 2 3 4 5

0

1

2

3

4

5

C 3 0

C 3 2

D 4 2

D 5 2

D 5 0

D 4 0

D 4 2

E 1 5

E 5 5

E 5 4

E 3 4

E 3 0

E 1 0

E 1 5

Data File

Page 42: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: illustration of point & polygon

1 3 4

2 4 4

3 4 2

4 3 2

5 5 4

6 5 2

7 5 0

8 4 0

9 3 0

10 1 0

11 1 5

12 5 5

E A B

C D

1 2 3 4 5

0

1

2

3

4

5

A 1, 2, 3, 4, 1

B 2, 5, 6, 3, 2

C 4, 3, 8, 9, 4

D 3, 6, 7, 8, 3

E 11, 12, 7, 10, 11

Points File

12

34

5

6

78910

1112

Polygons File

Page 43: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Node TableNode ID Easting Northing

1 126.5 578.12 218.6 581.93 224.2 470.44 129.1 471.9

Node Feature Attribute TableNode ID Control Crosswalk ADA?

1 light yes yes2 stop no no3 yield no no4 none yes no

Arc TableArc ID From N To N L Poly R PolyI 4 1 A34II 1 2 A34III 2 3 A35 A34IV 3 4 A34 Polygon Feature AttributeTable

Polygon ID Owner AddressA34 J. Smith 500 BirchA35 R. White 200 Main

Polygon TablePolygon ID Arc ListA34 I, II, III, IVA35 III, VI, VII, XI

Arc Feature Attribute TableArc ID Length Condition Lanes NameI 106 good 4II 92 poor 4 BirchIII 111 fair 2IV 95 fair 2 Cherry

Birch

Cherry

I

II

III

IV

1

4 3

Node/Arc/ Polygon and Attribute DataRelational Representation: DBMS required!

Spatial DataAttribute Data

A35SmithEstateA34

2

Page 44: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster versus Vector Model “raster is faster but vector is corrector” (Joseph Berry)

From: Burrough, Peter A. and Rachael A. McDonnell. (1998). Principles of Geographic Information Systems. p 27.

Page 45: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Raster versus Vector Model “raster is faster but vector is corrector” (Joseph Berry)

• Raster data model– location is referenced by a grid

cell in a rectangular array (matrix)

– attribute is represented as a single value for that cell

– much data comes in this form • images from remote sensing

(LANDSAT, SPOT)• scanned maps• elevation data from USGS

– best for continuous features:• elevation• temperature• soil type• land use

• Vector data model– location referenced by x,y

coordinates, which can be linked to form lines and polygons

– attributes referenced through unique ID number to tables

– much data comes in this form• DIME and TIGER files from

US Census• DLG from USGS for

streams, roads, etc• census data (tabular)

– best for features with discrete boundaries

• property lines• political boundaries• transportation

Page 46: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Variety of Vector Models

Spaghetti model

Topological model (most common)

Triangulated irregular network (TIN)

Dime files and TIGER files

Network model

Digital Line Graph (DLG)

Shapefile (ArcView/ArcGIS; ESRI)

Others: HPGL, PostScript/ASCII, CAD/.dxf

Page 47: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Spaghetti

Source: Lakhan, V. Chris. (1996). Introductory Geographical Information Systems. p. 54.

information in n-dim. By m-dim. hyperspaces (m<n)

POINT;P_LINE; POLYGON

COMPLEX_OBJECT

Very efficient algorithms to detect properties

Recursive holes

Numerous query langauges

Page 48: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Topological

Bernhardsen, Tor. (1999). 2nd Ed. Geographic Information Systems: An Introduction. p. 62. fig. 4.12.

Page 49: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological Data Model

The topological data model is used, e.g., by the Census Bureau of the US: four relations

R1: every line has two endpoints

R2: every line has two areas

R3: every area is surrounded by lines

R4: every point is surrounded by areas and lines

Page 50: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Topological

connections & relationships between objects are independent of their coordinates overcomes major weakness of spaghetti model – allowing for GIS analysis (Overlaying, Network, Contiguity, Connectivity)

topological invariants

Page 51: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological Data Model

A database in the topological data model consists of a finite number of

labeled points

labeled lines

labeled areas in R2

FE

D

C

B

A

HI

J

p

qr

s t

v

Page 52: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological Data Model

The topological data model is used, e.g., by the Census Bureau of the US: four relations

R1: every line has two endpoints

R2: every line has two areas

R3: every area is surrounded by lines

R4: every point is surrounded by areas and lines

FE

D

C

B

A

HI

J

p

qr

s t

v

Page 53: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological Data Model

The topological data model is used, e.g., by the Census Bureau of the US: four relations

R1: every line has two endpoints

R2: every line has two areas not lossless

R3: every area is surrounded by lines

R4: every point is surrounded by areas and lines

FE

D

C

B

A

HI

J

p

qr

s t

v

Page 54: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological Data Model

Give for each labeled point the circular list of all lines and areas that appear clockwise around it:

List(p)=( H D I)

List(q)=( J F H)

… lossless

List(s)=( C B E)

= unbounded area

FE

D

C

B

A

HI

J

p

qr

s t

v

Page 55: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Dime files and TIGER files

Image Source: Demers, Michael. N. (2000). 2nd Ed. Fundamentals of Geographic Information Systems. p. 113. fig 4.16.

Page 56: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Dime files and TIGER files

Image Source: Clarke, Keith C. (2001). 3rd Ed. Getting Started with Geographic Information Systems. p 92.

Page 57: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: DLGs

Image Source: Clarke, Keith C. (2001). 3rd Ed. Getting Started with Geographic Information Systems. p. 90

Digital Line Graphs

Page 58: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Network

Source: Heywood, Ian and Sarah Cornelius and Steve Carver. An Introduction to Geographical Information Systems. p. 60. fig. 3.14.

Page 59: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Topological data

adding semantics

What kind of binary topological relations exist between spatial objects?

Page 60: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Topological

adding semantics

What kind of binary topological relations exist between spatial objects?

Based on region’s interior and boundary (and exterior)

Determines whether

interior and boundary

have (non-)empty

interesection

Ao

A

Page 61: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Topological

adding semantics

What kind of binary topological relations exist between spatial objects?

Egenhofer and Randell Cohn C…

Ao

A

Bo

B

Bo BAo A

Page 62: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Topological

disjoint contains inside equal

meet covers coveredBy overlap

Page 63: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological relationships

Disjoint

Point/Point

Line/Line

Polygon/Polygon

Page 64: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological relationships

Touches

Point/Line

Point/Polygon

Line/Line

Line/Polygon

Polygon/Polygon

Page 65: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological relationships

Crosses

Point/Line

Point/Polygon

Line/Line

Line/Polygon

Page 66: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological relationships

Overlap

Point/Point

Line/Line

Polygon/Polygon

Page 67: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological relationships

Within/contains

Point/Point

Point/Line

Point/Polygon

Line/Line

Line/Polygon

Polygon/Polygon

Page 68: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological relationships

Equals

Point/Point

Line/Line

Polygon/Polygon

Page 69: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Topological relationships

area-area relationships line-line relationships

area-line relationships

point-line relationships point-area relationships

adjacency island touch branching off cross intersect

line ends atan area

line in an arealine ends in

an arealine is border

of an arealine intersects

arealine touches area

point on line point besidea line point in area

point on borderof an area

Page 70: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

TIN: Triangulated Irregular Network Surface

A B

CD

6

12

3

45

E

F

GH

Elevation points (nodes) chosen based on relief complexity, and then their 3-D location (x,y,z) determined.

Node # X Y Z1 0 999 14562 525 1437 14373 631 886 1423

etc

PointsPolygon Node #s Topology

A 1,2,4 B,DB 2,3,4 A,E,CC 3,4,5 B,F,GD 1,4,6 A,H

etc

Elevation points connected to form a set of triangular polygons; these then represented in a vector structure.

Polygons

Polygons Var 1 Var 2A 1473 15B 1490 100C 1533 150D 1486 270

etc.

Attribute Info. Database

Attribute data associated via relational DBMS (e.g. slope, aspect, soils, etc.)

Page 71: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Shapefile (ArcGIS; ESRI)

This table represents examples of the shape types of geographic features in a data set for a shapefile

Demers, Michael. N. (2000). 2nd Ed. Fundamentals of Geographic Information Systems. p. 114. fig 4.17.

Page 72: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Vector Model: Others …HPGL, CAD/.dxf PostScript/ASCII

Source: Clarke, Keith C. (2001). 3rd Ed. Getting Started with Geographic Information Systems. p. 89. fig. 3.12.

Page 73: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Difference between GIS and Spatial Databases• GIS is a software to visualize and analyze spatial data using

spatial analysis functions such as– Search Thematic search, search by region, classification– Location analysis Buffer, corridor, overlay– Terrain analysis Slope/aspect, drainage network– Flow analysis Connectivity, shortest path– Distribution Change detection, proximity, nearest neighbor– Spatial analysis/Statistics Pattern, centrality,

autocorrelation, indices of similarity, topology: hole description– Measurements Distance, perimeter, shape, adjacency,

direction• GIS uses SDBMS

– to store, search, query, share large spatial data sets

Page 74: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Difference between GIS and Spatial Databases

• SDBMS focusses on– Efficient storage, querying, sharing of large spatial

datasets– Provides simpler set based query operations – Example operations: search by region, overlay, nearest

neighbor, distance, adjacency, perimeter etc.– Uses spatial indices and query optimization to speedup

queries over large spatial datasets.• SDBMS may be used by applications other than GIS

– Astronomy, Genomics, Multimedia information systems, ...

• Will one use a GIS or a SDBM to answer the following:– How many neighboring countries does USA have?– Which country has highest number of neighbors?

Page 75: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

What is a Spatial DBMS?

• A SDBMS is a software module that– can work with an underlying DBMS– supports spatial data models, spatial abstract data types

(ADTs) and a query language from which these ADTs are callable

– supports spatial indexing, efficient algorithms for processing spatial operations, and domain specific rules for query optimization

• Example: Oracle Spatial data cartridge– can work with Oracle 8i DBMS– Has spatial data types (e.g. polygon), operations (e.g.

overlap) callable from SQL3 query language– Has spatial indices, e.g. R-trees

Page 76: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatial database systems for GIS

Limitations of Relational Data Model• Values are atomic, complex objects need to be

unnested (first normal form)• Only atomic types, no subtyping/inheritance,

no encapsulation of operations with data, no OID • No support for unstructured/heterogeneous data• No support for infinite relations (spatial and spatio-

temporal data) SSNr Name Salary

12345 Bart 50K

12346 Sofie 35K

12347 Bill 500M

Page 77: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatial Data in the Relational Model

• Boundary representation • No notion of spatial object/type• Mismatch with query language, e.g. SQL

(no arithmetic,…)

Name x y

triangle10 1

triangle1 0 0

triangle11 0(1,0)(0,0)

(0,1)

Page 78: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Extension of the Relational Model: ADT-approach

• Relational model is augmented with ad hoc spatial data types: point, polyline, polygon

• SQL is also extended• [Güting et al., 1990s]

Page 79: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Extension of the Relational Model: ADT-approach

• Example: ADT Polygon:– Constructors– Methods: containment, overlap, …– Subtyping/Inheritance: Rectangle isa Polygon

• Query language: SQL• [Güting et al., 1990s]

Page 80: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Beyond Relational: Constraint Databases

[Kanellakis, Kuper and Revesz, PODS1990]• Constraint tuple: finite combination of atomic constraints • Constraint relation: finite set of generalized tuples• Semantics: infinite point sets

Id Color geometryT1 green 0 x 0 y 1

x+y

T2 red x 0 0 y 1 y-x

C1 yellow (x-1)2+(y -1)2 = 1/9

Page 81: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Queries in constraint databases

• In practice only linear constraints [DEDALE, DISCO, COSMOS]

• Natural query languages: FO+Poly, FO+While, FO+TC, Datalog with polynomial constraints

• Q(S) = {(x,y) R2| • S(x,y)(( >0)(x’)(y’)((x-x’) 2+(y-y’) 2< 2 S(x’,y’)))}

Q

0 x 0 y 1 x+y 0 x 1 0 y 1 (x = 0 y = 0 x+y = 1)

Page 82: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Query evaluation in constraint Databases

• Apply Q(S) = {(x,y) R2| S(x,y)(( >0)(x’)(y’)((x-x’) 2+(y-y’) 2< 2 S(x’,y’)))} on A given by 0 x 0 y 1 x+y• Plugin: 0 x 0 y 1 x+y (( >0)(x’)(y’)((x-x’) 2+(y-y’) 2< 2 0 x’ 0 y’ 1 x’+y’ ))} • Complexity is huge• Tarski (1930)• Collins’ CAD (1975): doubly exponential in #quantifiers• 1990s: single exponential in #quantifier-alternations

0 x 0 y 1 x+y 0 x 1 0 y 1 (x = 0 y = 0 x+y = 1)

Page 83: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

From Spatial Data to Spatio-Temporal Data

• Temporal databases – 1980s, one of the first special purpose database

applications• Spatial databases

– well-studied area in GIS, – in database theory during 1990s

• …• Spatio-temporal data:

– studied in databases since mid 1990s, – SSD’99 changes into SSTD’01– has its specific problems

Page 84: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal DataExamples

• Transportation: truck or ship movement,

airplane flights• Meteorological: isobaric curves, temperature• Climate: season, vegetation changes• Natural disasters: forest fires, oil spills• Ecology: species migration, vegetation changes,

habitat and land cover changes• Society and economy: urban growth, land use

changes, epidemics• Ownership or administrative changes

Page 85: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal DataWhat is changing where and how?

What?• 0D points• 1D lines• 2D regions• 3D volumes

Where?• on 1D line• in 2D plane• in 3D space

How?• continuous evolution• continuous movement• discrete evolution• birth, death, split, merge

Page 86: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal DataWhat is changing where and how?

What?• 0D points• 1D lines• 2D regions• 3D volumes

Where?• on 1D line• in 2D plane• in 3D space

How?• continuous evolution• continuous movement• discrete evolution• birth, death, split, merge

In combination with classical

alpha-numerical data.

Page 87: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Abstract Spatio-Temporal Objects

• Time is isomorphic to the reals R

• n-dimensional abstract spatio-temporal object

O Rn R

• It should satisfy– slice regularity, i.e.,

Ot0 ={(x1,…,xn) | (x1,…,xn,t0) O} should be a familiar object (point, square, triangle, polygon)

– f(t)=Ot should be piece-wise continuous

– closure properties

Page 88: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties

• A class of spatio-temporal objects C is closed under an operation op (of arity k)

if for all O1,…, Ok C, also op(O1,…, Ok ) C

• Relevant operations:– intersection, union, difference– temporal/spatial selection– temporal/spatial projection

• Closure properties are easy to obtain for spatial objects, more difficult for natural classes of spatio-temporal objects

Page 89: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

The ADT-approach [Güting et al., TODS 2000]

• Spatial objects: points, polylines, polygons

• Operations: – Set theoretic: intersection, union, difference– Aggregation: min, max, avg, center, area,

volume– Metrical: distance– Topological: containment, adjacency, …

Page 90: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

The ADT-approach: Temporal Lifting

• Temporal lifting of spatial type with domain D : () consist of partial functions R D E.g., (points), (polylines), (polygons)

• Temporal lifting of spatial operation

op: 1… k 0

op: (1) … (k) (0)

• E.g. : polygons polygons polygons

: (polygons) (polygons) (polygons)

(p1, p2) {(t, p1(t) p2(t))| tR}

Page 91: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Example of SQL3 Query

• “Find all pairs of airplanes that came closer than 500 meters during their flight”

SELECT A.id, B.id

FROM Flights A,Flights B

WHERE A.id <> B.id

AND minvalue(distance(A.route,B.route))<500

• Example of spatio-temporal join

Page 92: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Concrete Representation [Forlizzi et al., SIGMOD 2000]

• Spatial objects: region (=finite set of polygons with holes)

• Spatio-temporal (evolving) objects:– finitely many spatial slices (=time intervals)– coordinates are linear functions of time on

each slice– segments may degenerate but cannot

rotate within a slice– spatio-temporal object is a polyhedron.

Page 93: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

The ADT-approach: Conclusion

• Change: both continuous and discrete • Closure:

– for union: trivial,– for intersection, difference, selection, projection:

depends on properties of polyhedra.• Object-orientation:

– object types, operation signatures– object easy to implement in object-relational DB– no natural restriction on movement guarantees

polyhedral structure• Queries:

– good integration with SQL3, e.g., aggregation– expressiveness: difficult to establish– notoriously hard to optimize

Page 94: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal Data in the Constraint ModelOne extra time variale: t

t=0

Name Color geometry

MT1 white 0x-t 0 y-t t+1x+y 0 t

4

Page 95: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal Data in the Constraint ModelOne extra time variale: t

t=1

Name Color geometry

MT1 white 0x-t 0 y-t t+1x+y 0 t

4

Page 96: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal Data in the Constraint ModelOne extra time variale: t

t=2

Name Color geometry

MT1 white 0x-t 0 y-t t+1x+y 0 t

4

Page 97: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal Data in the Constraint ModelOne extra time variale: t

t=3

Name Color geometry

MT1 white 0x-t 0 y-t t+1x+y 0 t

4

Page 98: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal Data in the Constraint ModelOne extra time variale: t

t=4

Name Color geometry

MT1 white 0x-t 0 y-t t+1x+y 0 t

4

Page 99: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal Data in the Constraint Model

• Closure guaranteed• Natural query languages: FO+Poly, FO+While, Datalog with Constraints• Theoretically appealing and suited to study e.g., expressiveness of query languages • but few implementations (mostly with linear constraints [DEDALE, DISCO,COSMOS])• Representation problem: a plane circles at constant speed• More restricted models:

– parametric spatio-temporal objects– implementations (MLPQ, PReSTO [Revesz, SIGMOD 2000])

Page 100: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal Data : Representation problem

An airplane circles at constant speed.

z=constant

x=x0+r.cos t

y=y0+r.sin t

Page 101: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Spatio-Temporal Query Languages

•First-order logic over the reals: relational calculus extended with polynomial (in)equalities.“Do plane1 and plane2 collide at 5 o’clock above position (0,0)?“

(x)( y)( z)( t)(Plane1(x,y,z,t) Plane2(x,y,z,t) x = 0 y = 0 t = 5)

•Extension of FO with a while loop: finite sequence of statements & while loops.

• Statement: R := {(x,y,t)| (x,y,t)};

• While-loop: while do P;

Page 102: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Queries in the Constraint Model

• Closure: naturally available in the model

• problems with aggregation, distance, …

• no object-oriented features

• Query langauges:

• FO + extensions,

• simple semantics,

• expressiveness well-studied,

• implementation requires constraint engine

Page 103: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Parametric Spatio-Temporal Objects

• An atomic geometric object consists of:– spatial reference object S (in R2)– reference time I (interval in R)– transformation function parameterized by time, i.e.,

f: R2xRR2: (x,y;t) (x’,y’)=f(x,y;t)• A molecular geometric object consists of a finite number of atomic objects

Example: S=[0,1]x[0,1], I=[1,5],f(x,y;t)=(tx,ty)

t=0 t=5

Page 104: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Parametric Spatio-Temporal Objects

Example database:

from to dept arrRoute- functieID pict

1

2

A

B

D

C

2h00

1h30

2h30

2h30

f1(x,y,t)

Referentie object

“classical” time interval

f2(x,y,t)

Spatio - temporal

Page 105: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Parametric Spatio-Temporal ObjectsSemantics of an atomic geometric object (S,I,f) is {(x,y;t)| tI((x’)(y’)(x’,y’) S (x,y)=f(x’,y’;t))}, e.g.:

Semantics of an molecular geometric object is union of semantics of its atomic objects

( , I, f(x,y,t) )

x

y

t

And it is viewed as:

3D figure is always a semi-algebraic set

Page 106: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Reference Objects

Poly

Tr

Trax

Rect

arbitrary

sides parallel to coordinate axes

Page 107: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

• Affinities: (x,y;t) a(t) b(t) x e(t) c(t) d(t) y f(t)

•Scalings: (x,y;t) a(t) 0 x e(t) 0 d(t) y f(t)

•Translations:(x,y;t) 1 0 x e(t) 0 1 y f(t)

•Identity

with a(t), b(t), c(t), d(t), e(t), f(t) linear, polynomial or rational

Transformation Functions

+

+

+

Page 108: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

• Affinities: (x,y;t) a(t) b(t) x e(t) c(t) d(t) y f(t)

observe an passing object under an anglecircling airplane

•Scalings: (x,y;t) a(t) 0 x e(t) 0 d(t) y f(t)

observe an object that you are walking away from/to, oil spill, forest fire•Translations:(x,y;t) 1 0 x e(t)wind, transport 0 1 y f(t)•Identity

spatial datawith a(t), b(t), c(t), d(t), e(t), f(t) linear, polynomial or rational

Transformation Functions

+

+

+

Page 109: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Object O1: (the immediate proximity) of a shipObject O2: another ship (or a natural hazard)

Object O1 O2 : danger zone

Query: “Is there any danger of collision?”

Page 110: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Parametric Spatio-Temporal Objects

Example database:

from to dept arrRoute- functieID pict

1

2

A

B

D

C

2h00

1h30

2h30

2h30

f1(x,y,t)

Referentie object

“classical” time interval

f2(x,y,t)

Spatio - temporal

Page 111: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

C

A

B

D

Page 112: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

C

A

B

D

Closure Properties under Boolean Operations

Page 113: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

C

A

B

D

Closure Properties under Boolean Operations

Page 114: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

CC

A

B

D

Closure Properties under Boolean Operations

Page 115: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

CC

A

B

D

Closure Properties under Boolean Operations

Page 116: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

CC

A

B

D

Closure Properties under Boolean Operations

Page 117: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

CC

A

D

Closure Properties under Boolean Operations

Page 118: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

CC

A

D

Closure Properties under Boolean Operations

Page 119: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

CC

A

B

D

Closure Properties under Boolean Operations

Page 120: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Which classes are closed under , , \?

A class (S,F) is closed under iff the intersection of (the semantics) of any two molecular geometric objects from the class (S,F) can be described as a geometric object from (S,F).

Property: A class (S,F) is closed under iff it is closed under for atomic

objects.

Closure Properties under Boolean Operations

Page 121: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Which classes are closed under ?

Affinity Scaling Translation Id

Rat Pol Lin Rat Pol Lin Rat Pol Lin Poly + + + + + + + + + + Tr + + + + + + + + + +

TraX + + + + + + + + + + Rect + + + + + + + + + +

Closure Properties under Boolean Operations

Page 122: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Which classes are closed under , \?

Property: A class is closed under iff

it is closed under \.

\ Affinity Scaling Translation Id

Rat Pol Lin Rat Pol Lin Rat Pol Lin Poly + - - - - - - - - + Tr + - - - - - - - - +

TraX + - - - - - - - - - Rect + - - + + + - - - +

Closure Properties under Boolean Operations

Page 123: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 124: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

A:rectangle

A: (x,y) (x-t,y-t)

B:rectangle

Assume that both objects have the same time interval

Example:

B: (x,y) (x,y-t)

Closure Properties under Boolean Operations

Page 125: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 126: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 127: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 128: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 129: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 130: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 131: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 132: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 133: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 134: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Different shapes of A B

The intersection of two translating objects is a SCALING object that cannot be described as a union of translating objects (translation preserves length + area).

Closure Properties under Boolean Operations

Page 135: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

This result is very intuitive, see example:

Closure Properties under Boolean Operations

Page 136: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 137: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 138: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 139: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 140: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 141: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 142: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 143: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 144: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Closure Properties under Boolean Operations

Page 145: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

The movement of the intersection can be described by a scaling.

The intersection of two linear scaling rectangles is a (union of) linear scaling rectangle(s) …

Closure Properties under Boolean Operations

Page 146: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Proof sketch:

and

are the transformations of the original objects, the intersection’s transformation is described as:

It can be shown that if

⎟⎟⎠

⎞⎜⎜⎝

⎛+⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛)(

)(

)(0

0)(

1

1

1

1

tf

te

y

x

td

ta

y

xa ⎟⎟

⎞⎜⎜⎝

⎛+⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛)(

)(

)(0

0)(

2

2

2

2

tf

te

y

x

td

ta

y

xa

⎟⎟⎟⎟

⎜⎜⎜⎜

−+−−

−+−−

+

⎟⎟⎠

⎞⎜⎜⎝

⎟⎟⎟⎟

⎜⎜⎜⎜

−−+−

−−+−

⎟⎟⎠

⎞⎜⎜⎝

lrul

ullrlrul

lrul

ullrlrul

lrul

lrul

lrul

lrul

yy

ytfytfyytbtbxx

xtextexxtata

y

x

yy

tftfytbytbxx

tetextaxta

y

x

)()())()((

)()())()((

)()()()(0

0)()()()(

2112

2112

2121

2121

a

linear

Closure Properties under Boolean Operations

Page 147: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

\ Affinity Scaling Translation Id

Rat Pol Lin Rat Pol Lin Rat Pol Lin Poly + - - - - - - - - + Tr + - - - - - - - - +

TraX + - - - - - - - - - Rect + - - + + + - - - +

The only class of transformations that can be used for Boolean operations.

Closure Properties under Boolean Operations

Page 148: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

MLPQ/PReSTO System[Revesz et al., SIGMOD 2000]

\ Affinity Scaling Translation Id

Rat Pol Lin Rat Pol Lin Rat Pol Lin Poly + - - - - - - - - + Tr + - - - - - - - - +

TraX + - - - - - - - - - Rect + - - + + + - - - +

Rectangle based system

• MLPQ: linear constraints• GIS: operations special to GIS objects• PReSTO (STDB): spatio-temporal database system• RECURSIVE

Page 149: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

PReSTO Example: Cloud over US

PReSTO (STDB): spatio-temporal database system

Page 150: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

PReSTO Data definition in PReSTO:Nebraska() :- i=1, x1=550, y1=340,

x2=570,y2=355,t>=0,t<=300,p=-1, s = 0.

clouds(h) :- i=1,x1 - t = 80, y1 - 0.5t = 100, x2 - 1.1t = 220, y2 - 0.6t = 200, t >=0, t<=300, p = -1, s = 0, h = 0.

Available operations/queries in PReSTO:•Union, intersection, difference, complement;•Projection, selection

Page 151: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Parametric Spatio-Temporal Objects: Conclusion

•Closure: for union trivial; for intersection and difference in some cases•Solution: restrict to polygons or work with Boolean combination of atomic objects (AND-OR-NOT trees, see CSG)•Advantage:

- closure in definition - easier to construct more complicated objects

(polygons with holes…)

d

a

b

cb

a

ab c d a \ b

Page 152: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Representing Spatio-Temporal Phenomena using ADTs or Constraints

Problem with real spatio-temporal data:(A) data comes with discrete observations

•Within a snapshot (TINs)•In different snapshots

(B) data lacks clearly identifiable and delineated objects(C) modeled movement/evolution is often irregular(D) Data does not have regular (polyhedral) 3D structure

Solution to (A), (C) and (D):•Convert each snapshot to a set of polygons•Interpolate/approximate between the snapshots

Page 153: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Other Challenges

Data models:• type system• representing uncertainty• integrating different representations• resolving inconsistencies

Query languages and interfaces:• multi-dimensional aggregation (ST OLAP)• visualization• animation: explicit representations (ADTs) are more suitable than implicit ones (constraints)

Page 154: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Moving Objects Databases (MOD) [Wolfson et al., 1997, Su et al., 2001]

Data model:• point moving in nD plane (e.g., n=2)• finite chain of infinitely differentiable functions

p:RR2

• MOD = finite set of moving objectsOperations:• vel(p), acc(p), • moving direction =vel(p)/||vel(p)||• speed =||vel(p)||• distance = dist(p,q)= mint ||p(t)-q(t)||• same direction

Page 155: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Query languages:• SQL3 [Forlizzi et al, SIGMOD 2000]• relational calculus with built in functions [Su et al.,

SSTD 2001]• temporal logic [Wolfson et al, ICDE 1997]

Expressiveness:• vel(p), acc(p), moving direction, speed, distance are enough to express all temporal and topological queries• PTIME languages •precision/uncertainty/probability

Moving Objects Databases (MOD) [Wolfson et al., 1997, Su et al., 2001]

Page 156: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

Final Look

Bottum-up:• adding spatio-temporal constructs to existing spatial/GIS systems to cope with application demands• closure problems, interoperability

Top-down:• develop a general model (e.g., a constraint model)with clean semantics, properties and query languages• will it be used?

Page 157: Spatial and Spatio-Temporal Data Models for GIS Bart Kuijpers Limburgs Universitair Centrum lucp1265/ bart.kuijpers@luc.ac.be

More information at:

http://alpha.luc.ac.be/~lucp1265/

[email protected]