The Geography Markup Language (GML) is the XML grammar defined by the Open Geospatial Consortium (OGC) to express geographical features. GML serves as a modeling language for geographic systems as well as an open interchange format for geographic transactions on the Internet. Key to GML's utility is its ability to integrate all forms of geographic information, including not only conventional "vector" or discrete objects, but coverages (see also GMLJP2) and sensor data.

GML model

GML contains a rich set of primitives which are used to build application specific schemas or application languages. These primitives include:

Geography Markup Language

Feature

Geometry

Coordinate reference system

Topology

Time

Dynamic feature

Coverage (including geographic images) Unit of measure Directions Observations Map presentation styling rules

Geography Markup Language

The original GML model was based on the World Wide Web Consortium's Resource Description Framework (RDF). Subsequently, the OGC introduced XML schemas into GML's structure to help connect the various existing geographic databases, whose relational structure XML schemas more easily defined. The resulting XML-schema-based GML retains many features of RDF, including the idea of child elements as properties of the parent object (RDFS) and the use of remote property references.

Geography Markup Language

Profile

GML profiles are logical restrictions to GML, and may be expressed by a document, an XML schema or both. These profiles are intended to simplify adoption of GML, to facilitate rapid adoption of the standard. The following profiles, as defined by the GML specification, have been published or proposed for public use:

A Point Profile for applications with point geometric data but without the need for the full GML grammar; A GML Simple Features profile supporting vector feature requests and transactions, e.g. with a WFS; A GML profile for GMLJP2 (GML in JPEG 2000); A GML profile for RSS.

Note that Profiles are distinct from application schemas. Profiles are part of GML namespaces (Open GIS GML) and define restricted subsets of GML. Application schemas are XML vocabularies defined using GML and which live in an application-defined target namespace. Application schemas can be built on specific GML profiles or use the full GML schema set.

Profiles are often created in support for GML derived languages (see application schemas) created in support of particular application domains such as commercial aviation, nautical charting or resource exploitation.

The GML Specification (Since GML v3.) contains a pair of XSLT scripts (usually referred to as the "subset tool") that can be used to construct GML profiles.

GML Simple Features Profile

The GML Simple Features Profile is a more complete profile of GML than the above Point Profile and supports a wide range of vector feature objects, including the following:

A reduced geometry model allowing 0d, 1d and 2d linear geometric objects (all based on linear interpolation) and the corresponding aggregate geometries (gml:MultiPoint, gml:MultiCurve, etc.). A simplified feature model which can only be one level deep (in the general GML model, arbitrary nesting of features and feature properties is not permitted). All non-geometric properties must be XML Schema simple types – i.e. cannot contain nested elements. Remote property value references (xlink:href) just like in the main GML specification.

Since the profile aims to provide a simple entry point, it does not provide support for the following: coverages topology observations value objects (for real time sensor data) dynamic features

Nonetheless it supports a good variety of real world problems.

Subset tool

In addition, the GML specification provides a subset tool to generate GML profiles containing a user-specified list of components. The tool consists of three XSLT scripts. The scripts generate a profile that a developer may extend manually or otherwise enhance through schema restriction. Note that as restrictions of the full GML specification, application schemas that a profile can generate must themselves be valid GML application schemas.

The subset tool can generate profiles for many other reasons as well. Listing the elements and attributes to include in the resultant profile schema and running the tool results in a single profile schema file containing only the user-specified items and all of the element, attribute and type declarations on which the specified items depend. Some Profile schemas created in this manner support other specifications including IHO S-57 and GML in JPEG 2000.