Docsity

Spatial Abstract Data Types - Spatial Databases - Report | ECS 266, Papers of Computer Science

Toggle sidebar
bg1
ECS 266 – Spatial Databases
Michael Gertz ©2008 UC Davis 2. Spatial Concepts 32
Spatial Abstract Data Types (ADTs)
The previous section dealt with the internal representation of spatial
objects. In this section, we also take a look at the geographic properties
of objects in terms of a reference schema and reference queries.
From this, we then develop spatial ADTs, with a focus on
– extending data models with spatial ADTs
– designing spatial ADTs
– exploring topological predicates
Additional literature:
• [RSV02] Chapter 3 (Sections 3.1-3.3)
• Markus Schneider: "Spatial Data Types: Conceptual Foundation for the
Design and Implementation of Spatial Database Systems and GIS“,
tutorial given at 6th International Symposium on Advances in Spatial
Databases (SSD'99), 1999.
http://www.cise.ufl.edu/~mschneid/Service/Tutorials/TutorialSDT.pdf
ECS 266 – Spatial Databases
Michael Gertz ©2008 UC Davis 2. Spatial Concepts 33
Reference Schema and Queries
•A conceptual spatial database schema describes at an abstract level
one or many themes for representing a set of geographic objects in a
geographic application, including relationships among objects.
• For this, standard modeling frameworks can be used, such as UML.
• For a spatial database schema, then reference queries are described
that specify typical queries in the application(s) to be built.
Example reference schemas:
1. Administrative units (countries, states, counties,...)
2. Highway network among cities (highways, sections, cities,...)
3. Land use (areas in the plane, type of use,...)
For each schema, a set of reference queries is determined:
– Alphanumerical queries (only refer to descriptive components)
– Spatial queries (operations that apply to one or more spatial objects)
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Spatial Abstract Data Types - Spatial Databases - Report | ECS 266 and more Papers Computer Science in PDF only on Docsity!

ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 32

Spatial Abstract Data Types (ADTs)

The previous section dealt with the internal representation of spatial objects. In this section, we also take a look at the geographic properties of objects in terms of a reference schema and reference queries.

From this, we then develop spatial ADTs, with a focus on

  • extending data models with spatial ADTs
  • designing spatial ADTs
  • exploring topological predicates

Additional literature:

  • [RSV02] Chapter 3 (Sections 3.1-3.3)
  • Markus Schneider: "Spatial Data Types: Conceptual Foundation for the Design and Implementation of Spatial Database Systems and GIS“, tutorial given at 6th International Symposium on Advances in Spatial Databases (SSD'99), 1999. http://www.cise.ufl.edu/~mschneid/Service/Tutorials/TutorialSDT.pdf

Reference Schema and Queries

  • A conceptual spatial database schema describes at an abstract level one or many themes for representing a set of geographic objects in a geographic application, including relationships among objects.
  • For this, standard modeling frameworks can be used, such as UML.
  • For a spatial database schema, then reference queries are described that specify typical queries in the application(s) to be built.

Example reference schemas:

  1. Administrative units (countries, states, counties,...)
  2. Highway network among cities (highways, sections, cities,...)
  3. Land use (areas in the plane, type of use,...)

For each schema, a set of reference queries is determined:

  • Alphanumerical queries (only refer to descriptive components)
  • Spatial queries (operations that apply to one or more spatial objects)

ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 34

Spatial Abstract Data Types

An ADT is an abstract view of objects: a set of operations is defined on a set of objects of a given type.

The general idea is to hide implementation details of the data type from the user (or programmer) and only allow access through operations. ⇒ encapsulation

The ADT approach gives rise to distinguishing between geographic data models and spatial data models. Choice of spatial data model is crucial. Operation implementation depends on representation.

Choosing Appropriate Types

The are numerous candidates for geometric types: point, polyline, complex polyline, polygon, polygon set, mixed, ....

There is a trade-off between the modeling power captured by a definition of an ADT and the constraints imposed on a chosen representation. For example, what properties is a polyline supposed to have?

ADTs also need to be evaluated in terms of

  • space complexity : the amount of storage needed to represent objects and relationships between objects
  • Time complexity : the amount of time algorithms needs to compute properties of objects and collections of objects that are not explicitly represented. Also:
  • Realization should allow for an unambiguous representation of subdivisions.

ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 38

Spatial ADT Signatures (2)

The line ADT includes the following operations:

  • PointOnLine: line × point → bool
  • Length: line → real
  • OverlapsLR: line × region → bool

The point ADT includes the following operations:

  • Distance: region × point → real

The above lists are not exhaustive but would support typical queries corresponding to the reference schemas. However, some perhaps useful operations cannot be defined (examples ) )

In the following, we further explore the issue of spatial data type design.

Designing Spatial ADTs

Recall that type definitions are strongly application driven. A SDBMS, however, should support much more general sets of types and operations, providing a wide range of functions for data representation and data manipulation.

In the following, we define a (non-exhaustive) list of operations, with a particular focus on managing geospatial data; then we focus more on the semantics. We assume that at least one argument is of a spatial data type. Unary operations with Boolean result : This operation test a spatial object for a given property. SimpleLine: line → bool ClosedLine: line → bool Convex: polygon → bool ( IsSquare: rectangle → bool ) ( IsRectangle: polygon → bool )

ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 40

Operators

Unary operations with scalar result: area, length, diameter, perimeter, components (cardinality), direction,...

Unary operations with spatial result: There is a large number of operations of different nature in this class.

  1. Topological transforms , i.e., homeomorphisms that preserve topological relationships. That is, all of the continuous, bijective mappings R^2 → R^2. Example operators include rotation , translation , scale change , ...
  2. Dimension reduction , i.e., operators that transform a d- dimensional objects into a d-1- dimensional object (examples ) )
  3. Object extraction , including operations like minimum bounding rectangle, region centroid etc_._ (examples ) )

Operators (2)

N-ary operations with spatial result (assuming a homogeneous input set): C onvexHull: point* → polygon PointSCenter: point* → point Voronoi: point* → polygon* others ??? )

Binary operations with spatial result: Most frequently used operations for spatial queries are set operations, which apply to objects represented as (infinite) sets of points. An operand can be a single object or a set of objects of the same type. L1Intersect: line × line → point* L2Intersect: line* × line → point* L3Intersect: line* × line* → point*

We’ll look at these types of operators in more detail later...

ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 44

Semantics of Operators (2)

First of all, the result of operations should satisfy one of the existing types. One (minor) problem is that a result can be a set of objects of an existing type (e.g., the intersection of a polyline with a polygon, depending on how intersection is defined).

A larger type system thus seems appropriate, provided it at least incorporates the notion of a set. An approach that chooses a type large enough to remain closed under a set of common operations is called a weak type-based approach. In this approach, there is one type geometry , which is a set of either points, lines, or polygons.

⇒ Does not take advantage of the power of strong typing.

If a type system is not appropriately defined, it might be necessary to access the internal structure of objects, and thus violate encapsulation.

Topological Predicates

Exploring spatial relationships is a challenging task involving geography, cognitive sciences etc. (“far from”, “meets”). A formal definition of spatial relationships is crucial to clarify the understanding and implementation!

In the following, we introduce a computational method for reasoning about binary topological relations between spatial regions and deduce consistency of complete and incomplete topological information.

We use set theory as basis. Let points(x) denote the set of points that belong to a spatial region x. Then

  • x=y ≡ points(x) = points(y)
  • x ≠ y ≡ points(x) ≠ points(y)
  • x inside y ≡ points(x) ⊆ points(y)
  • x outside y ≡ points(x) ∩ points(y) = ∅
  • x intersects y ≡ points(x) ∩ points(y) ≠ ∅ Minimal and complete??

ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 46

4-Intersection Scheme

The point set approach has been augmented with the notion of boundary and interior of spatial objects to distinguish between the topological predicates meets and overlap. The goal is to have a “complete” collection of topological relationships.

By comparing whether or not boundaries and interiors of two spatial regions intersect, four relations can be identified, known as 4-intersection scheme.

For this, the common concepts of point set topology with open and closed sets are used.

(Def) A point set S in R^2 is open if for each point p ∈ S , there exists an ε ∈ R , ε > 0, such that the disc with radius ε and center p is contained in S. (recall the notion of open ball/disc from Section 2.1) S is closed if R^2 – S is open.

4-Intersection Scheme (2)

Interior, complement, and boundary of an object in 2-dimensional space that is described by a non-empty point set A:

Ao^ , δA, and CA are mutually exclusive; union = ...

Given two spatial regions (objects), the idea is to find out what topological relationships between them can be deduced from the relationships between their interiors and boundaries.

  • interior of A (≡ Ao^ ) is the union of all open sets in A
  • closure of A (≡ Ā) is the intersection of all closed sets that contain A
  • complement of A (≡ CA ) with respect to R^2 is the set of all points in R^2 not contained in A
  • boundary of A (≡ δA) is the intersection of the closure of A and the closure of the complement of A

ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 50

9-Intersection Scheme

Given 2-dimensional point sets A and B, the topological relationships can also be described by the 9-intersection scheme of A’s boundary, interior, and complement with the boundary, interior, and complement of B.

Representation as a 3 × 3 matrix:

A A A B

B

B 9

C B C δB C C

δA B δA δB δA C

A B A δB A C

I(A,B)

I I I

I I I

I I I

Remarks

There has been plenty of work on defining spatial relationships

  • The 4-intersection scheme has been introduced by Egenhofer and Herring in 1990.
  • This scheme has been extended to higher dimensions by Egenhofer and Franzosa in 1991.
  • Worboys and Bofakas (1993) describe a point set topology approach to define complex spatial relations with holes and islands to any finite level.
  • Belussi, Bertino,& Catania (1997), and Grumbach, Rigaux & Segoufin (1998) describe a linear constraint approach, based on the spatial constraint model.
  • Güting & Schneider (1995) present the ROSE algebra, which is based on a discrete geometric basis (system of realm-based spatial data types).

Again, see Schneider’s tutorial for an overview.