cs 599 – spatial and temporal databases

36
CS 599 – Spatial and Temporal Databases Realm based Spatial data types: The Rose Algebra Ralf Hartmut Guting Markus Schneider

Upload: denna

Post on 08-Feb-2016

61 views

Category:

Documents


5 download

DESCRIPTION

CS 599 – Spatial and Temporal Databases. Realm based Spatial data types: The Rose Algebra Ralf Hartmut Guting Markus Schneider. Spatial data types or algebras for database systems should satisfy the following criteria:. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CS 599 – Spatial and Temporal Databases

CS 599 – Spatial and Temporal Databases

Realm based Spatial data types:The Rose Algebra

Ralf Hartmut GutingMarkus Schneider

Page 2: CS 599 – Spatial and Temporal Databases

Spatial data types or algebras for database systems should satisfy the following criteria: •Generality: Geometric objects used as SDT values should be as general as possible. The domains of data types points, lines and region should be closed under union, intersection and difference.•Rigorous definition: The semantics of SDT ’s, the possible values for the types and the functions associated with the operations, must be defined formally to avoid ambiguities.•Finite resolution : The formal definitions must take into account the finite representations available inside computers•Treatment of geometric consistency: The definition of SDT ’s must enforce geometric consistency •General object model interface: SDT definition should be based on abstract interface to the DBMS data model

Page 3: CS 599 – Spatial and Temporal Databases

Realm concepts:•A realm is a set of points and non intersecting lines segments over a discrete domain that is a grid.•Values of spatial data types can be composed from the objects present in a realm.

Page 4: CS 599 – Spatial and Temporal Databases

Realm for points, lines and regions

Regions : A, BLines : CPoints : D

Page 5: CS 599 – Spatial and Temporal Databases

Why use a realm as a basis for spatial data types

•It enforces geometric consistency of related spatial objects, For example, the common part of the borders of countries A and B is exactly the same for both objects.

•It guarantees nice closure properties for computation with spatial databases

•Shields geometric consistency in query processing from numeric correctness and robustness problems

Page 6: CS 599 – Spatial and Temporal Databases

Transforming to a realm

Move the intersection point to the nearest point on the grid.

Application data at the lowest level of abstraction can be viewed as a set of points and intersecting line segments.

Page 7: CS 599 – Spatial and Temporal Databases

A problem and a solutionError in resolving the point of intersection

Page 8: CS 599 – Spatial and Temporal Databases

A solutionDefine an envelope as a collection of grid points that are immediately above, below or on the line

Page 9: CS 599 – Spatial and Temporal Databases

A formal definition of realm based SDT’ s

It is organized as a series of layers•Layer 1: Robust geometric primitives•Layer 2: Realms and realm based primitives•Layer 3: Spatial algebra primitives•Layer 4: Rose operations

Page 10: CS 599 – Spatial and Temporal Databases

Layer 1: Robust geometric primitives

•Consists of a finite discrete space N X N •Points and line segments over this space•Simple predicates and operations over them•Defines an N point and an N segment• Primitives such as ‘meet’, ’overlap’, ’intersect’, ’disjoint’, ’on’, ‘in’ and ‘intersection’ are defined.

Page 11: CS 599 – Spatial and Temporal Databases

Layer 1 Continued:

We define a Realm over N•It represent a finite, user-defined set of points and non-intersecting line segments over a discrete domain.•We define R points and R segments for the realm•We have an added restriction over N•R segments don’t intersect and they don’t overlap

Page 12: CS 599 – Spatial and Temporal Databases

Realm based structures•An R cycle is a cycle in the graph interpretation of a realm•It is a set of R segments

Relations between a N point p and R cycle c• p on c, p in c, p out c• c partitions the set of all N points into Pin(c ) Pon(c ) Pout(c )

Page 13: CS 599 – Spatial and Temporal Databases

Realm based structuresRelations between two cycles c1 and c2Possible relationships between two R cycles

Page 14: CS 599 – Spatial and Temporal Databases

Realm based structuresC1 and C2 adjacent

C1 and c2 meetc1 c2

Page 15: CS 599 – Spatial and Temporal Databases

Realm based structuresWays an R segment s can lie within an R cycle c

Ways an R point p can lie within an R cycle c

Page 16: CS 599 – Spatial and Temporal Databases

Realm based structuresAn R face f, consists of a cycle c and a possibly empty set of R cycles h such that•All cycles in h are edge-inside c•All cycles in h are edge-disjoint with respect to each other•Segments in f can either form a cycle c or one of the cycles in h and no other cycle •This is necessary in order to achieve closure under operations

Page 17: CS 599 – Spatial and Temporal Databases

Realm based structures

Page 18: CS 599 – Spatial and Temporal Databases

Realm based structures

Page 19: CS 599 – Spatial and Temporal Databases

Realm based structures

Page 20: CS 599 – Spatial and Temporal Databases

Realm based structuresAn R-block b connected sub graph in the graph interpretation of a realm

Page 21: CS 599 – Spatial and Temporal Databases

Realm based Spatial data types

A flat view:

A structured view:

Page 22: CS 599 – Spatial and Temporal Databases

Examples of Spatial values

Page 23: CS 599 – Spatial and Temporal Databases

Second order signatureROSE algebra is a system of spatial data types together with operations between these types. Many of the operations are applicable to several types. Hence we need a framework and notations to describe polymorphic operations. A system of several sets and functions between these sets is called a many sorted algebraA many sorted signature describes the syntactic aspect of a many sorted algebraIt consists of two sets of symbols called sorts and operatorsSecond order signature is a system of two coupled many sorted signatures where the top level offers kinds as sorts and type constructors as operators.

Page 24: CS 599 – Spatial and Temporal Databases

Second order signature

A second, bottom level signature uses the types defined by the top level signature as sorts.

Page 25: CS 599 – Spatial and Temporal Databases

The type of a partitionThe partition is a disjoint subdivision of the plane into regions with associated attributes.•We would like to test conditions such as adjacency or overlayThe kind regions area-disjoint contains all types whose carriers are sets of regions values such that any two distinct values of the type are area-disjoint.

Page 26: CS 599 – Spatial and Temporal Databases

The object model interface•The SDT definition should be based on an abstract interface to the DBMS data model. •There are basic concepts and operations in the object model that are needed to define the ROSE algebra•There are constructs and notations needed to embed the ROSE algebra into the query language that is to use the ROSE algebra

Page 27: CS 599 – Spatial and Temporal Databases

Object model interface concepts

•Object types/ classes•Collection of objects•Functions for accessing values from objects•Data types int, real, bool•A pool of names•Object aggregation function•Object extension function

Page 28: CS 599 – Spatial and Temporal Databases

Concept for embedding ROSE algebra into DBMS query lang

•Denote a spatial data type value•Denote a collection of objects together with an attribute•Extend objects by derived values•Allow naming of an SDT value or a new attribute•Offer a grouping operation

Page 29: CS 599 – Spatial and Temporal Databases

The Rose algebra: Robust spatial extension

Page 30: CS 599 – Spatial and Temporal Databases

Spatial predicatesThese operations compare to spatial values with respect to their topological relationships and return a Boolean value

Page 31: CS 599 – Spatial and Temporal Databases

Operators returning Spatial data type values

Page 32: CS 599 – Spatial and Temporal Databases

Spatial operators returning numbers

Page 33: CS 599 – Spatial and Temporal Databases

Spatial operators on Sets of objects

Page 34: CS 599 – Spatial and Temporal Databases

Integrating with a DBMS query language

Page 35: CS 599 – Spatial and Temporal Databases

Example queryList the names and the land use of districts which are neighbors with the same land use.

Which states are enclosed by which other states?

Page 36: CS 599 – Spatial and Temporal Databases

Conclusion•Implementation of the ROSE algebra.•Invariance under redrawing.•Objects and operations violating realm closure.