Webster's Revised Unabridged Dictionary defines geometry as "That
branch of mathematics which investigates the relations, properties,
and measurement of solids, surfaces, lines, and angles; the science
which treats of the properties and relations of magnitudes; the science
of the relations of space." The word geometry has
also been used to denote the geometric features that, for the past
millennium or more, cartographers have used to map the world. An abstract
definition of this new meaning of geometry is "a point or aggregate
of points representing a feature on the ground."
In DB2 Spatial Extender, the model
can be expressed in terms of the feature's coordinates. The model
conveys information; for example, the coordinates identify the position
of the feature with respect to fixed points of reference. Also, the
model can be used to produce information; for example, the ST_Overlaps
function can take the coordinates of two proximate regions as input
and return information as to whether the regions overlap or not.
The
coordinates of a feature that a geometry represents are regarded as properties of the geometry. Several
kinds of geometries have other properties as well; for example, area,
length, and boundary.
The geometries supported by DB2 Spatial Extender form a hierarchy, which
is shown in the following figure. The geometry hierarchy is defined
by the OpenGIS Consortium, Inc. (OGC) document "OpenGIS Simple Features
Specification for SQL". Seven members of the hierarchy are instantiable.
That is, they can be defined with specific coordinate values and rendered
visually as the figure shows.
Figure 1. Hierarchy
of geometries supported by DB2 Spatial
Extender.
Instantiable geometries in this figure include
examples of how they might be rendered visually.
The spatial data types supported by DB2 Spatial Extender are implementations of the
geometries shown in the figure.
As the figure indicates, a superclass
called geometry is the root of
the hierarchy. The root type and other proper subtypes in the hierarchy
are not instantiable. Additionally, users can define their own instantiable
or not instantiable proper subtypes.
The subtypes are divided
into two categories: the base geometry subtypes, and the homogeneous
collection subtypes.
The base geometries include:
- Points
- A single point. Points represent discrete features that are perceived
as occupying the locus where an east-west coordinate line (such as
a parallel) intersects a north-south coordinate line (such as a meridian).
For example, suppose that the notation on a world map shows that each
city on the map is located at the intersection of a parallel and a
meridian. A point could represent each city.
- Linestrings
- A line between two or more points. It does not have to be a straight
line. Linestrings represent linear geographic features (for example,
streets, canals, and pipelines).
- Polygons
- A polygon or surface within a polygon. Polygons represent multisided
geographic features (for example, welfare districts, forests, and
wildlife habitats).
The homogeneous collections include:
- Multipoints
- A multiple point geometry collection. Multipoints represent multipart
features whose components are each located at the intersection of
an east-west coordinate line and a north-south coordinate line (for
example, an island chain whose members are each situated at an intersection
of a parallel and meridian).
- Multilinestrings
- A multiple curve geometry collection with multiple linestrings.
Multilinestrings represent multipart features that are made up (for
example, river systems and highway systems).
- Multipolygons
- A multiple surface geometry collection with multiple polygons.
Multipolygons represent multipart features made up of multisided units
or components (for example, the collective farmlands in a specific
region, or a system of lakes).
As their names imply, the homogeneous collections
are collections of base geometries. In addition to sharing base geometry
properties, homogeneous collections have some of their own properties
as well.