1 Representing Geographic Features

1.1 Introduction

This section introduces the key concepts required to understand how the Geography Markup Language (GML) models the world. It is based on the OGC Abstract Specification (available online: http://www.opengis.org/techno/specs.htm), which defines a geographic feature as "an abstraction of a real world phenomenon; it is a geographic feature if it is associated with a location relative to the Earth." Thus a digital representation of the real world can be thought of as a set of features. The state of a feature is defined by a set of properties, where each property can be thought of as a {name, type, value} triple. The number of properties a feature may have, together with their names and types, are determined by its type definition. Geographic features are those with properties that may be geometry-valued. A feature collection is a collection of features that can itself be regarded as a feature; as a consequence a feature collection has a feature type and thus may have distinct properties of its own, in addition to the features it contains.

This specification is concerned with what the OGC calls simple features: features whose geometric properties are restricted to 'simple' geometries for which coordinates are defined in two dimensions and the delineation of a curve is subject to linear interpolation. While this release of GML does permit coordinates to be specified in three dimensions, it currently provides no direct support for three-dimensional geometry constructs. The term 'simple features' was originally coined to describe the functionality defined in the set of OpenGIS® Implementation Specifications (available online: http://www.opengis.org/techno/specs.htm); GML follows the geometry model defined in these specifications. For example, the traditional 0, 1 and 2-dimensional geometries defined in a two-dimensional spatial reference system (SRS) are represented by points, line strings and polygons. In addition, the geometry model for simple features also allows geometries that are collections of other geometries (either homogeneous multi-point, multi-line string and multi-polygon collections, or heterogeneous geometry collections). In all cases the 'parent' geometry element is responsible for indicating in which SRS the measurements have been made.

How can GML be used to represent real-world phenomena? Suppose somebody wishes to build a digital representation of the city of Cambridge in England. The city could be represented as a feature collection where the individual features represent such things as rivers, roads and colleges; such a classification of real world phenomena determines the feature types that need to be defined. The choice of classification is related to the task to which the digital representation will ultimately be put. The River feature type might have a property called name whose value must be of the type 'string'. It is common practice to refer to the typed property; thus the River feature type is said to have a string property called name. Similarly, the Road feature type might have a string property called classification and an integer property called number. Properties with simple types (e.g. integer, string, float, boolean) are collectively referred to as simple properties.

The features required to represent Cambridge might have geometry-valued properties as well as simple properties. Just like other properties, geometric properties must be named. So the River feature type might have a geometric property called centerLineOf and the Road feature type might have a geometric property called linearGeometry. It is possible to be more precise about the type of geometry that can be used as a property value. Thus in the previous examples the geometric property could be specialised to be a line string property. Just as it is common to have multiple simple properties defined on a single feature type, so too a feature type may have multiple geometric properties.

1.2 Feature and Geometry models

The abstract feature model used by the Open GIS Consortium is shown in Figure 1.1 using Syntropy notation. While it is common practice in the Geospatial Information (GI) community to refer to the properties of a feature as attributes, this document refers to them as properties in order to avoid potential confusion with the attributes of XML elements.

Figure 1.1. The abstract feature model


The 'Simple Features' model represents a simplification of the more general model described in the OpenGIS Abstract Specification, this simplification was the result of developing a number of implementation specifications. There are two major simplifications:

  • Features are assumed to have either simple properties (booleans, integers, reals, strings) or geometric properties; and

  • Geometries are assumed to be defined in two-dimensional SRS and use linear interpolation between coordinates.

A number of consequences follow from these simplifications. For example, simple features only provide support for vector data; and simple features are not sufficiently expressive to explicitly model topology. This version of GML addresses the first of these limitations in that it allows features to have complex or aggregate non-geometric properties. Such complex properties may themselves be composed of other complex and simple properties. Common examples include dates, times, and addresses. It is expected that future versions of GML will address the second of these limitations and provide more elaborate geometry models.

The geometry object model for simple features (Figure 1.2) has an (abstract) base Geometry class and associates each geometry object with an SRS that describes the coordinate space in which the object is defined. GML mirrors this class hierarchy but omits some intermediate (i.e. non-leaf) types such as Curve, Surface, MultiSurface, and MultiCurve.

Figure 1.2. The geometry model for simple features