360 likes | 639 Views
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:.
E N D
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: • 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
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.
Realm for points, lines and regions Regions : A, B Lines : C Points : D
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
Transforming to a realm Application data at the lowest level of abstraction can be viewed as a set of points and intersectingline segments. Move the intersection point to the nearest point on the grid.
A problem and a solution Error in resolving the point of intersection
A solution Define an envelope as a collection of grid points that are immediately above, below or on the line
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
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.
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
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 )
Realm based structures Possible relationships between two R cycles Relations between two cycles c1 and c2
Realm based structures C1 and C2 adjacent c2 c1 C1 and c2 meet
Realm based structures Ways an R segment s can lie within an R cycle c Ways an R point p can lie within an R cycle c
Realm based structures • An 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
Realm based structures An R-block b connected sub graph in the graph interpretation of a realm
Realm based Spatial data types A flat view: A structured view:
Second order signature ROSE 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 algebra A many sorted signature describes the syntactic aspect of a many sorted algebra It consists of two sets of symbols called sorts and operators Second order signature is a system of two coupled many sorted signatures where the top level offers kinds as sorts and type constructors as operators.
Second order signature A second, bottom level signature uses the types defined by the top level signature as sorts.
The type of a partition • The partition is a disjoint subdivision of the plane into regions with associated attributes. • We would like to test conditions such as adjacency or overlay • The 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.
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
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
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
Spatial predicates These operations compare to spatial values with respect to their topological relationships and return a Boolean value
Example query List the names and the land use of districts which are neighbors with the same land use. Which states are enclosed by which other states?
Conclusion • Implementation of the ROSE algebra. • Invariance under redrawing. • Objects and operations violating realm closure.