






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 32
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
Additional literature:
Example reference schemas:
For each schema, a set of reference queries is determined:
ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 34
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.
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
ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 38
The line ADT includes the following operations:
The point ADT includes the following operations:
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.
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
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.
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
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.
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
ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 46
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.
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.
ECS 266 – Spatial DatabasesMichael Gertz © 2008 UC Davis 2. Spatial Concepts 50
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
There has been plenty of work on defining spatial relationships
Again, see Schneider’s tutorial for an overview.