Geography Markup Language
The Geography Markup Language is the XML grammar defined by the Open Geospatial Consortium 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 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:- [|Feature]
- Geometry
- [|Coordinate reference system]
- Topology
- Time
- Dynamic feature
- Coverage
- Unit of measure
- Directions
- Observations
- Map presentation styling rules
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 ;
- A GML profile for RSS.
Profiles are often created in support for GML derived languages created in support of particular application domains such as commercial aviation, nautical charting or resource exploitation.
The GML Specification contains a pair of XSLT scripts 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 and the corresponding aggregate geometries.
- A simplified feature model which can only be one level deep.
- All non-geometric properties must be XML Schema simple types – i.e. cannot contain nested elements.
- Remote property value references just like in the main GML specification.
- coverages
- topology
- observations
- value objects
- dynamic features
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.
Application schema
In order to expose an application's geographic data with GML, a community or organization creates an XML schema specific to the application domain of interest. This schema describes the object types whose data the community is interested in and which community applications must expose. For example, an application for tourism may define object types including monuments, places of interest, museums, road exits, and viewpoints in its application schema. Those object types in turn reference the primitive object types defined in the GML standard.Some other markup languages for geography use schema constructs, but GML builds on the existing XML schema model instead of creating a new schema language.
Application schemas are normally designed using ISO 19103 conformant UML, and then the GML Application created by following the rules given in Annex E of ISO 19136.
List of public GML Application Schemas
Following is a list of known, publicly accessible GML Application Schemas:- AIXM Aeronautical Information eXchange Model
- – Canadian Avalanche Association Markup Language
- CityGML – a common information model and GML application schema for virtual 3D city / regional models.
- Coverages – an interoperable, encoding-neutral information model for the digital representation of spatio-temporally varying phenomena, based on the abstract model of ISO 19123
- Climate Science Modelling Language
- Darwin Core GML application schema. An implementation of the Darwin Core schema in GML for sharing biodiversity occurrence data.
- GeoSciML – from
- GPML – the GPlates Markup Language, an information model and application schema for plate-tectonics
- - a GML implementation initiated 2012, reflecting the then missing update of
- INSPIRE application schemas
- IWXXM – Aviation weather GML application schema
- NcML/GML – NetCDF-GML
- Observations and Measurements schema for observation metadata and results
- OS MasterMap GML
- SensorML schema for describing instruments and processing chains
- SoTerML schema for describing Soil and Terrain data
- TigerGML – US Census
- from Dept. of Natural Resources, New South Wales
- WXXM – Weather Information Exchange Model
GML and KML
GML geometries
GML encodes the GML geometries, or geometric characteristics, of geographic objects as elements within GML documents according to the "vector" model. The geometries of those objects may describe, for example, roads, rivers, and bridges.The key GML geometry object types in GML 1.0 and GML 2.0, are the following:
- Point
- LineString
- Polygon
such as gathered via remote sensors and images, including most satellite data.
Features
GML defines features distinct from geometry objects. A feature is an application object that represents a physical entity, e.g. a building, a river, or a person. A feature may or may not have geometric aspects. A geometry object defines a location or region instead of a physical entity, and hence is different from a feature.In GML, a feature can have various geometry properties that describe geometric aspects or characteristics of the feature.
GML also provides the ability for features to share a geometry property with one another by using a remote property reference on the shared geometry property. Remote properties are a general feature of GML borrowed from RDF. An xlink:href attribute on a GML geometry property means that the value of the property is the resource referenced in the link.
For example, a Building feature in a particular GML application schema might have a position given by the primitive GML geometry object type Point. However, the Building is a separate entity from the Point that defines its position. In addition, a feature may have several geometry properties, for example an extent and a position.
Coordinates
Coordinates in GML represent the coordinates of geometry objects. Coordinates can be specified by any of the following GML elements:GML has multiple ways to represent coordinates. For example, the
element can be used, as follows:Note that, when expressed as above, the individual coordinates are not separately accessible through the XML Document Object Model since the content of the
element is just a single string.To make GML coordinates accessible through the XML DOM, GML 3.0 introduced the
and
elements. Using the
element instead of the
element, the same point can be represented as follows:The coordinates of a
geometry object can be represented with the
element:The
element is used to represent a list of coordinate tuples, as required for linear geometries:For GML data servers and conversion tools that only support GML 1 or GML 2, there is no alternative to
. For GML 3 documents and later, however,
and
are preferable to
.Coordinate reference system
A coordinate reference system determines the geometry of each geometry element in a GML document.Unlike KML or GeoRSS, GML does not default to a coordinate system when none is provided. Instead, the desired coordinate system must be specified explicitly with a CRS. The elements whose coordinates are interpreted with respect to such a CRS include the following:
The value of the srsName attribute is a Uniform Resource Identifier. It refers to a definition of the CRS that is used to interpret the coordinates in the geometry. The CRS definition may be in a document or in an online web service. Values of EPSG codes can be resolved by using the EPSG Geodetic Parameter Dataset registry operated by the Oil and Gas Producers Association at http://www.epsg-registry.org.
The srsName URI may also be a Uniform Resource Name for referencing a common CRS definition. The OGC has developed a URN structure and a set specific URNs to encode some common CRS. A URN resolver resolves those URNs to GML CRS definitions.
Examples
s, Points, and LineString objects are encoded in GML 1.0 and 2.0 as follows:Note that LineString objects, along with LinearRing objects, assume linear interpolation between the specified points. Also the coordinates of a Polygon have to be closed.
Features using geometries
The following GML example illustrates the distinction between features and geometry objects. The Building feature has several geometry objects, sharing one of them with the SurveyMonument feature:Note that the reference is to the shared Point and not to the SurveyMonument, since any feature object can have more than one geometry object property.
Point Profile
The GML Point Profile contains a single GML geometry, namely axsi:schemaLocation="http://www.myphotos.org
MyGoodPhotos.xsd">
Note that when using the Point Profile, the only geometry object is the '
History
Initial work – to OGC recommendation paper
Ron Lake started work on GML in the fall of 1998, following earlier work on XML encodings for radio broadcasting. Lake presented his early ideas to an OGC meeting in Atlanta, Georgia, in February 1999, under the title xGML. This introduced the idea of a GeoDOM, and the notion of Geographic Styling Language based on XSL. Akifumi Nakai of NTT Data also presented at the same meeting on work partly underway at NTT Data on an XML encoding called G-XML, which was targeted at location–based services. In April 1999, Galdos created the XBed team. Xbed was focused on the use of XML for geospatial. This led to the creation of SFXML with input from Galdos, US Census, and NTT Data. Galdos demonstrated an early map style engine pulling data from an Oracle-based "GML" data server at the first OGC Web Map Test Bed in September 1999. In October 1999, Galdos Systems rewrote the SFXML draft document into a Request for Comment, and changed the name of the language to GML Object-Property-Value rule, 2) Remote properties the decision to use application schemas rather than a set of static schemas. The paper also proposed that the language be based on the Resource Description Framework rather than on the DTDs used to that point. These issues, including the use of RDF, were hotly debated within the OGC community during 1999 and 2000, with the result that the final GML Recommendation Paper contained three GML profiles – two based on DTD, and one on RDF – with one of the DTD's using a static schema approach. This passed as a Recommendation Paper at the OGC in May 2000.Moving to XML Schema – Version 2.
Even before the passage of the Recommendation Paper at the OGC, Galdos had started work on an XML Schema version of GML, replacing the rdf:resource scheme for remote references with the use of xlink:href, and developing specific patterns for handling extensions for complex structures like feature collections. Much of the XML Schema design work was done by Mr. Richard Martell of Galdos who served as the document editor and who was mainly responsible for the translation of the basic GML model into an XML Schema. Other important inputs in this time frame came from Simon Cox, Paul Daisey, David Burggraf, and Adrian Cuthbert. The US Army Corps of Engineers were quite supportive of the development of GML. The US Army Corps of Engineers sponsored the “USL Pilot” project, which was very helpful in exploring the utility of linking and styling concepts in the GML specification, with important work being done by Monie and Xia Li. The XML Schema specification draft was submitted by Galdos and was approved for public distribution in December 2000. It became a Recommendation Paper in February 2001 and an Adopted Specification in May of the same year. This version eliminated the “profiles” from version 1. and established the key principles, as outlined in the original Galdos submission, as the basis of GML.GML and G-XML (Japan)
As these events were unfolding, work was continuing in parallel in Japan on G-XML under the auspices of the Japanese Database Promotion Center under the direction of Mr. Shige Kawano. G-XML and GML differed in several important respects. Targeted at LBS applications, G-XML employed many concrete geographic objects, while GML provided a very limited concrete set and built more complex objects by the use of application schemas. At this point in time, G-XML was still written using a DTD, while GML had already transitioned to an XML Schema. On the one hand G-XML required the use of many fundamental constructs not at the time in the GML lexicon, including temporality, spatial references by identifiers, objects having histories, and the concept of topology-based styling. GML, on the other hand, offered a limited set of primitives and a recipe to construct user defined object types.A set of meetings held in Tokyo in January 2001, and involving Ron Lake, Richard Martell, OGC Staff, Mr. Shige Kawano, Mr. Akifumi Nakai and Dr. Shimada led to the signing of an MOU between DPC and OGC by which OGC would endeavour to inject the fundamental elements required to support G-XML into GML, thus enabling G-XML to be written as a GML application schema. This resulted in many new types entering GML's core object list, including observations, dynamic features, temporal objects, default styles, topology, and viewpoints. Much of the work was conducted by Galdos under contract to NTT Data. This laid the foundation for GML 3, although a significant new development occurred in this time frame, namely the intersection of the OGC and ISO/TC 211.
Towards ISO – GML 3.0 broadens the scope of GML
While a basic coding existed for most of the new objects introduced by the GML/G-XML agreement, and for some introduced by Galdos within the OGC process, it soon became apparent that few of these encodings were compliant with the abstract specifications developed by the ISO TC/211, specifications which were increasingly becoming the basis for all OGC specifications. GML geometry, for example, had been based on an earlier and only partly documented geometry model and this was insufficient to support the more extensive and complex geometries described in TC/211. The management of GML development was also altered in this time frame with the participation of many more individuals. Significant contributions in this time frame were made by Milan Trninic , Ron Lake , Richard Martell .On June 12, 2002, Mr. Ron Lake was recognized by the OGC for his work in creating GML by being presented the Gardels award. The citation on the award reads “In particular, this award recognizes your great achievement in creating the Geography Markup Language,, and your uniquely sensitive and effective work to promote the reconciliation of national differences to promote meaningful standardization of GML on a global level.” Simon Cox and Clemens Portele also subsequently received the Gardels award, in part for their contributions to GML.
Standards
The Open Geospatial Consortium is an international voluntary consensus standards organization whose members maintain the Geography Markup Language standard. The OGC coordinates with the ISO TC 211 standards organization to maintain consistency between OGC and ISO standards work. GML was adopted as an International Standard in 2007.GML can also be included in version 2.1 of the United States National Information Exchange Model.
ISO 19136
ISO 19136 Geographic information – Geography Markup Language, is a standard from the family ISO – of the standards for geographic information. It resulted from unification of the Open Geospatial Consortium definitions and Geography Markup Language with the ISO-191xx standards.Earlier versions of GML were not ISO conformal with GML version 3.1.1. ISO conformity means in particular that GML is now also an implementation of ISO 19107.
The Geography Markup Language is an XML encoding in compliance with ISO 19118 for the transport and storage of geographic information modelled according to the conceptual modelling framework used in the ISO 19100-series and including both the spatial and nonspatial properties of geographic features. This specification defines the XML Schema syntax, mechanisms, and conventions that:
- Provide an open, vendor-neutral framework for the definition of geospatial application schemas and objects;
- Allow profiles that support proper subsets of GML framework descriptive capabilities;
- Support the description of geospatial application schemas for specialized domains and information communities;
- Enable the creation and maintenance of linked geographic application schemas and datasets;
- Support the storage and transport of application schemas and data sets;
- Increase the ability of organizations to share geographic application schemas and the information they describe.