Filename extension | .gml or .xml |
---|---|
Internet media type | application/gml+xml [1] |
Developed by | Open Geospatial Consortium |
Initial release | 2000 |
Latest release | |
Type of format | Geographic Information System |
Extended from | XML |
Standard | ISO 19136:2007 |
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 contains a rich set of primitives which are used to build application specific schemas or application languages. These primitives include:
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.
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:
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.
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:
Since the profile aims to provide a simple entry point, it does not provide support for the following:
Nonetheless it supports a good variety of real world problems.
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. 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.
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 (the application schema). 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 (Geographic information – Conceptual schema language) [3] conformant UML, and then the GML Application created by following the rules given in Annex E of ISO 19136.
Following is a list of known, publicly accessible GML Application Schemas:
KML, made popular by Google, complements GML. Whereas GML is a language to encode geographic content for any application, by describing a spectrum of application objects and their properties (e.g. bridges, roads, buoys, vehicles etc.), KML is a language for the visualization of geographic information tailored for Google Earth. KML can be used to render GML content, and GML content can be “styled” using KML for the purposes of presentation. KML is first and foremost a 3D portrayal transport, not a data exchange transport. As a result of this significant difference in purpose, encoding GML content for portrayal using KML results in significant and unrecoverable loss of structure and identity in the resulting KML. Over 90% of GML's structures (such as, to name a few, metadata, coordinate reference systems, horizontal and vertical datums, geometric integrity of circles, ellipses, arcs, etc.) cannot be transformed to KML without loss or non-standard encoding. Similarly, due to KML's design as a portrayal transport, encoding KML content in GML will result in significant loss of KML portrayal structures such as regions, level of detail rules, viewing and animation information, as well as styling information and multiscale representation. The ability to portray placemarks at multiple levels of details distinguishes KML from GML, since portrayal is outside the scope of GML. [12]
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:
GML 3.0 and higher also includes structures to describe "coverage" information, the "raster" model, such as gathered via remote sensors and images, including most satellite data.
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 (e.g. the feature's Point or Extent properties). 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 (or none at all), for example an extent and a position.
Coordinates in GML represent the coordinates of geometry objects. Coordinates can be specified by any of the following GML elements:
<gml:coordinates><gml:pos><gml:posList>
GML has multiple ways to represent coordinates. For example, the <gml:coordinates>
element can be used, as follows:
<gml:Pointgml:id="p21"srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:coordinates>45.67,88.56</gml:coordinates></gml:Point>
When expressed as above, the individual coordinates (e.g. 88.56) are not separately accessible through the XML Document Object Model since the content of the <gml:coordinates>
element is just a single string.
To make GML coordinates accessible through the XML DOM, GML 3.0 introduced the <gml:pos>
and <gml:posList>
elements. (Although GML versions 1 and 2 had the <gml:coord>
element, it is treated as a defect and is not used.) Using the <gml:pos>
element instead of the <gml:coordinates>
element, the same point can be represented as follows:
<gml:Pointgml:id="p21"srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:possrsDimension="2">45.6788.56</gml:pos></gml:Point>
The coordinates of a <gml:LineString>
geometry object can be represented with the <gml:coordinates>
element:
<gml:LineStringgml:id="p21"srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:coordinates>45.67,88.5655.56,89.44</gml:coordinates></gml:LineString >
The <gml:posList>
element is used to represent a list of coordinate tuples, as required for linear geometries:
<gml:LineStringgml:id="p21"srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:posListsrsDimension="2">45.6788.5655.5689.44</gml:posList></gml:LineString >
For GML data servers (WFS) and conversion tools that only support GML 1 or GML 2 (i.e. only the <gml:coordinates>
element), there is no alternative to <gml:coordinates>
. For GML 3 documents and later, however, <gml:pos>
and <gml:posList>
are preferable to <gml:coordinates>
.
A coordinate reference system (CRS) 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:
<gml:coordinates>
<gml:pos>
<gml:posList>
An srsName attribute attached to a geometry object specifies the object's CRS, as shown in the following example:
<gml:Pointgml:id="p1"srsName="#srs36"><gml:coordinates>100,200</gml:coordinates></gml:Point>
The value of the srsName attribute is a Uniform Resource Identifier (URI). 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 (i.e. a flat file) 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 Archived 2020-08-09 at the Wayback Machine .
The srsName URI may also be a Uniform Resource Name (URN) 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.
Polygons, Points, and LineString objects are encoded in GML 1.0 and 2.0 as follows:
<gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,0100,0100,1000,1000,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon><gml:Point><gml:coordinates>100,200</gml:coordinates></gml:Point><gml:LineString><gml:coordinates>100,200150,300</gml:coordinates></gml:LineString>
LineString objects, along with LinearRing objects, assume linear interpolation between the specified points. Also the coordinates of a Polygon have to be closed.
The following GML example illustrates the distinction between features and geometry objects. The Building feature has several geometry objects, sharing one of them (the Point with identifier p21) with the SurveyMonument feature:
<abc:Buildinggml:id="SearsTower"><abc:height>52</abc:height><abc:positionxlink:type="Simple"xlink:href="#p21"/></abc:Building><abc:SurveyMonumentgml:id="g234"><abc:position><gml:Pointgml:id="p21"><gml:posList>100,200</gml:posList></gml:Point></abc:position></abc:SurveyMonument>
The reference is to the shared Point and not to the SurveyMonument, since any feature object can have more than one geometry object property.
The GML Point Profile contains a single GML geometry, namely a <gml:Point>
object type. Any XML Schema can use the Point Profile by importing it and referencing the subject <gml:Point>
instance:
<PhotoCollectionxmlns="http://www.myphotos.org"xmlns:gml="http://www.opengis.net/gml"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.myphotos.org MyGoodPhotos.xsd"><items><Item><name>LynnValley</name><description>Ashotofthefallsfromthesuspensionbridge</description><where>NorthVancouver</where><position><gml:PointsrsDimension="2"srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pos>49.40-123.26</gml:pos></gml:Point></position></Item></items></PhotoCollection>
When using the Point Profile, the only geometry object is the '<gml:Point>' object. The rest of the geography is defined by the photo-collection schema.
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 (GSL) 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. [13] In April 1999, Galdos created the XBed team (with CubeWerx, Oracle Corporation, MapInfo Corporation, NTT Data, Mitsubishi, and Compusult as subcontractors). Xbed was focused on the use of XML for geospatial. This led to the creation of SFXML (Simple Features XML) 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 (precursor of the WFS) 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 (Geography Markup Language). This document introduced several key ideas that became the foundation of GML, including the 1) Object-Property-Value rule, 2) Remote properties (via rdf:resource), and 3) 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 (RDF) 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. [14]
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 (e.g. Barbarians at the Gate) 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 (CSIRO Australia), Paul Daisey (US Census), David Burggraf (Galdos), and Adrian Cuthbert (Laser-Scan). The US Army Corps of Engineers (particularly Jeff Harrison) 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 (Ionic) and Xia Li (Galdos). 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 (V2.0) eliminated the “profiles” from version 1. and established the key principles, as outlined in the original Galdos submission, as the basis of GML.
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 (e.g. Mover, POI), 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 (geometry, feature) and a recipe to construct user defined object (feature) types.
A set of meetings held in Tokyo in January 2001, and involving Ron Lake (Galdos), Richard Martell (Galdos), OGC Staff (Kurt Buehler, David Schell), Mr. Shige Kawano (DPC), Mr. Akifumi Nakai (NTT Data) and Dr. Shimada (Hitachi CRL) 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.
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 (notably coverages), 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 (Simple Features Geometry) 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 (Galdos) (default styles, CRS), Ron Lake (Galdos) (Observations), Richard Martell (Galdos) (dynamic features).
On June 12, 2002, Mr. Ron Lake was recognized by the OGC for his work in creating GML by being presented the Gardels award. [15] The citation on the award reads “In particular, this award recognizes your great achievement in creating the Geography Markup Language, (GML), 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 (CSIRO) [16] and Clemens Portele (Interactive Instruments) [17] also subsequently received the Gardels award, in part for their contributions to GML.
The Open Geospatial Consortium (OGC) 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 (ISO 19136:2007) in 2007.
GML can[ clarification needed ] also be included in version 2.1 of the United States National Information Exchange Model (NIEM).
ISO 19136 Geographic information – Geography Markup Language, is a standard from the family ISO – of the standards for geographic information (ISO 191xx). It resulted from unification of the Open Geospatial Consortium definitions and Geography Markup Language (GML) with the ISO-191xx standards.
Earlier versions of GML were not ISO conformal (GML 1, GML 2) 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 (GML) 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:
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them free open standards—define XML.
A coverage is the digital representation of some spatio-temporal phenomenon. ISO 19123 provides the definition:
In computing, the Open Geospatial Consortium Web Feature Service (WFS) Interface Standard provides an interface allowing requests for geographical features across the web using platform-independent calls. One can think of geographical features as the "source code" behind a map, whereas the WMS interface or online tiled mapping portals like Google Maps return only an image, which end-users cannot edit or spatially analyze. The XML-based GML furnishes the default payload-encoding for transporting geographic features, but other formats like shapefiles can also serve for transport. In early 2006 the OGC members approved the OpenGIS GML Simple Features Profile. This profile is designed both to increase interoperability between WFS servers and to improve the ease of implementation of the WFS standard.
ISO 6709, Standard representation of geographic point location by coordinates, is the international standard for representation of latitude, longitude and altitude for geographic point locations.
Keyhole Markup Language (KML) is an XML notation for expressing geographic annotation and visualization within two-dimensional maps and three-dimensional Earth browsers. KML was developed for use with Google Earth, which was originally named Keyhole Earth Viewer. It was created by Keyhole, Inc, which was acquired by Google in 2004. KML became an international standard of the Open Geospatial Consortium in 2008. Google Earth was the first program able to view and graphically edit KML files, but other projects such as Marble have added KML support.
ISO/TC 211 is a standard technical committee formed within ISO, tasked with covering the areas of digital geographic information and geomatics. It is responsible for preparation of a series of International Standards and Technical Specifications numbered in the number range starting at ISO-19101. The Chair of the committee was 1994-2016: Olaf Østensen; during 2017-2018: Christina Wasström; and from 2019 Agneta Gren Engberg.
A spatial reference system (SRS) or coordinate reference system (CRS) is a framework used to precisely measure locations on the surface of Earth as coordinates. It is thus the application of the abstract mathematics of coordinate systems and analytic geometry to geographic space. A particular SRS specification comprises a choice of Earth ellipsoid, horizontal datum, map projection, origin point, and unit of measure. Thousands of coordinate systems have been specified for use around the world or in specific regions and for various purposes, necessitating transformations between different SRS.
Simple Features is a set of standards that specify a common storage and access model of geographic features made of mostly two-dimensional geometries used by geographic databases and geographic information systems. It is formalized by both the Open Geospatial Consortium (OGC) and the International Organization for Standardization (ISO).
Catalogue Service for the Web (CSW), sometimes seen as Catalogue Service - Web, is a standard for exposing a catalogue of geospatial records in XML on the Internet. The catalogue is made up of records that describe geospatial data, geospatial services, and related resources.
CityGML is an open standardised data model and exchange format to store digital 3D models of cities and landscapes. It defines ways to describe most of the common 3D features and objects found in cities and the relationships between them. It also defines different standard levels of detail (LoDs) for the 3D objects, which allows the representation of objects for different applications and purposes, such as simulations, urban data mining, facility management, and thematic inquiries.
GeoRSS is a specification for encoding location as part of a Web feed. (Web feeds are used to describe feeds of content, such as news articles, Audio blogs, video blogs and text blog entries. These web feeds are rendered by programs such as aggregators and web browsers.) The name "GeoRSS" is derived from RSS, the most known Web feed and syndication format.
Geospatial metadata is a type of metadata applicable to geographic data and information. Such objects may be stored in a geographic information system (GIS) or may simply be documents, data-sets, images or other objects, services, or related items that exist in some other native environment but whose features may be appropriate to describe in a (geographic) metadata catalog.
Observations and Measurements (O&M) is an international standard which defines a conceptual schema encoding for observations, and for features involved in sampling when making observations. While the O&M standard was developed in the context of geographic information systems, the model is derived from generic patterns proposed by Fowler and Odell, and is not limited to geospatial information. O&M is one of the core standards in the OGC Sensor Web Enablement suite, providing the response model for Sensor Observation Service (SOS).
The Open Geospatial Consortium (OGC), an international voluntary consensus standards organization for geospatial content and location-based services, sensor web and Internet of Things, GIS data processing and data sharing. It originated in 1994 and involves more than 500 commercial, governmental, nonprofit and research organizations in a consensus process encouraging development and implementation of open standards.
The Sensor Observation Service (SOS) is a web service to query real-time sensor data and sensor data time series and is part of the Sensor Web. The offered sensor data consists of data directly from the sensors, which are encoded in the Sensor Model Language (SensorML), and the measured values in the Observations and Measurements encoding format. The web service as well as both file formats are open standards and specifications of the same name defined by the Open Geospatial Consortium (OGC).
The Web Coverage Processing Service (WCPS) defines a language for filtering and processing of multi-dimensional raster coverages, such as sensor, simulation, image, and statistics data. The Web Coverage Processing Service is maintained by the Open Geospatial Consortium (OGC). This raster query language allows clients to obtain original coverage data, or derived information, in a platform-neutral manner over the Web.
The Augmented Reality Markup Language (ARML) is a data standard to describe and interact with augmented reality (AR) scenes. It has been developed within the Open Geospatial Consortium (OGC) by a dedicated ARML 2.0 Standards Working Group. ARML consists of both an XML grammar to describe the location and appearance of virtual objects in the scene, as well as ECMAScript bindings to allow dynamic access to the properties of the virtual objects, as well as event handling, and is currently published in version 2.0. ARML focuses on visual augmented reality.