Home      Discussion      Topics      Dictionary      Almanac
Signup       Login
Geography Markup Language

Geography Markup Language

Discussion
Ask a question about 'Geography Markup Language'
Start a new discussion about 'Geography Markup Language'
Answer questions from other users
Full Discussion Forum
 
Encyclopedia
The Geography Markup Language (GML) is the XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 grammar defined by the Open Geospatial Consortium
Open Geospatial Consortium
The Open Geospatial Consortium , an international voluntary consensus standards organization, originated in 1994. In the OGC, more than 400 commercial, governmental, nonprofit and research organizations worldwide collaborate in a consensus process encouraging development and implementation of open...

 (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. Note that the concept of feature in GML is a very general one and includes not only conventional "vector" or discrete objects, but also coverages (see also GMLJP2) and sensor data. The ability to integrate all forms of geographic information is key to the utility of GML.

GML model


GML contains a rich set of primitives
Geometric primitive
The term geometric primitive in computer graphics and CAD systems is used in various senses, with the common meaning of the simplest geometric objects that the system can handle . Sometimes the subroutines that draw the corresponding objects are called "geometric primitives" as well...

 which are used to build application specific schemas or application languages. These primitives include:
  • Feature
  • Geometry
  • Coordinate reference system
  • Topology
    Geospatial topology
    Geospatial topology studies the rules concerning the relationships between the points, lines, and polygons that represent the features of a geographic region. For example, where two polygons represent adjacent counties, typical topological rules would require that the counties share a common...

  • Time
  • Dynamic feature
  • Coverage (including geographic images)
  • Unit of measure
  • Directions
  • Observations
  • Map presentation styling rules


The original GML model was based on the World Wide Web Consortium
World Wide Web Consortium
The World Wide Web Consortium is the main international standards organization for the World Wide Web .Founded and headed by Tim Berners-Lee, the consortium is made up of member organizations which maintain full-time staff for the purpose of working together in the development of standards for the...

's Resource Description Framework
Resource Description Framework
The Resource Description Framework is a family of World Wide Web Consortium specifications originally designed as a metadata data model...

 (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 define. 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.

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
    Web Feature Service
    The Open Geospatial Consortium Web Feature Service Interface Standard provides an interface allowing requests for geographical features across the web using platform-independent calls...

  • A GML profile for GMJP2 (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:
  1. 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.).
  2. 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).
  3. All non-geometric properties must be XML Schema simple types – i.e. cannot contain nested elements.
  4. 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.

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 (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.

A list of known publicly available GML Application Schemas
GML Application Schemas
Geography Markup Language provides the basis for domain- or community-specific "Application Schemas", which in turn support data interoperability within a community of interest...

 is being assembled.

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.

GML and KML


KML
Keyhole Markup Language
Keyhole Markup Language is an XML notation for expressing geographic annotation and visualization within Internet-based, 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...

, 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
Google Earth
Google Earth is a virtual globe, map and geographical information program that was originally called EarthViewer 3D, and was created by Keyhole, Inc, a Central Intelligence Agency funded company acquired by Google in 2004 . It maps the Earth by the superimposition of images obtained from satellite...

. KML can be used to carry GML content, and GML can be “styled” to KML for the purposes of presentation. KML instances may be transformed losslessly to GML, however roughly 90% of GML's structures (such as, to name a few, metadata, coordinate reference systems, horizontal and vertical datums, etc.) cannot be transformed to 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


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.

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 (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


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:



45.67, 88.56



Note that, when expressed as above, the individual coordinates (e.g. 88.56) are not separately accessible through the XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 Document Object Model
Document Object Model
The Document Object Model is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Aspects of the DOM may be addressed and manipulated within the syntax of the programming language in use...

 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. (Note that although GML versions 1 and 2 had the element, it is treated as a defect and is not used.) Using the element instead of the element, the same point can be represented as follows:



45.67 88.56



The coordinates of a geometry object can be represented with the element:



45.67, 88.56 55.56,89.44



The element is used to represent a list of coordinate tuples, as required for linear geometries:



45.67 88.56 55.56 89.44



For GML data servers (WFS
Web Feature Service
The Open Geospatial Consortium Web Feature Service Interface Standard provides an interface allowing requests for geographical features across the web using platform-independent calls...

) and conversion tools that only support GML 1 or GML 2 (i.e. only the element), there is no alternative to . For GML 3 documents and later, however, and are preferable to .

For more information on the srsName attribute, see coordinate reference system below.

Coordinate Reference System



A coordinate reference system (CRS) determines the geometry of each geometry element in a GML document.

Unlike KML
Keyhole Markup Language
Keyhole Markup Language is an XML notation for expressing geographic annotation and visualization within Internet-based, 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...

 or GeoRSS
GeoRSS
GeoRSS is an emerging standard for encoding location as part of a Web feed. GeoRSS is an emerging standard for encoding location as part of a Web feed. GeoRSS is an emerging standard for encoding location as part of a Web feed. (Web feeds are used to describe feeds ("channels") of content, such as...

, 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:


An srsName attribute attached to a geometry object specifies the object's CRS, as shown in the following example:



100,200



The value of the srsName attribute is a Uniform Resource Identifier
Uniform Resource Identifier
In computing, a uniform resource identifier is a string of characters used to identify a name or a resource on the Internet. Such identification enables interaction with representations of the resource over a network using specific protocols...

 (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 CRS Registry Service operated by the Oil and Gas Producers Association (OGP at http://www.epsg-registry.org.

The srsName URI may also be a Uniform Resource Name
Uniform Resource Name
A uniform resource name is a uniform resource identifier that uses the urn scheme and does not imply availability of the identified resource. Both URNs and URLs are URIs, and a particular URI may be a name and a locator at the same time.The functional requirements for uniform resource names are...

 (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.

Examples


Polygon
Polygon
In geometry a polygon is a flat shape consisting of straight lines that are joined to form a closed chain orcircuit.A polygon is traditionally a plane figure that is bounded by a closed path, composed of a finite sequence of straight line segments...

s, Point
Point (geometry)
In geometry, topology and related branches of mathematics a spatial point is a primitive notion upon which other concepts may be defined. In geometry, points are zero-dimensional; i.e., they do not have volume, area, length, or any other higher-dimensional analogue. In branches of mathematics...

s, and LineString objects are encoded in GML 1.0 and 2.0 as follows:





0,0 100,0 100,100 0,100 0,0




100,200


100,200 150,300



Note that LineString objects, along with LinearRing objects, assume linear interpolation between the specified points.

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 (the Point with identifier p21) with the SurveyMonument feature:



Sears Tower
52


100,200






100,200











100,200





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 a object type. Any XML Schema can use the Point Profile by importing it and referencing the subject instance:


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.myphotos.org
MyGoodPhotos.xsd">


Lynn Valley
A shot of the falls from the suspension bridge
North Vancouver


49.40 -123.26







Note that when using the Point Profile, the only geometry object is the '' object. The rest of the geography is defined by the photo-collection schema.

Initial Work - to OGC Recommendation Paper


Mr. Ron Lake started work on GML in the fall of 1998, following earlier work on XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 encodings for radio broadcasting. Mr. Lake presented his early ideas to an OGC
Open Geospatial Consortium
The Open Geospatial Consortium , an international voluntary consensus standards organization, originated in 1994. In the OGC, more than 400 commercial, governmental, nonprofit and research organizations worldwide collaborate in a consensus process encouraging development and implementation of open...

 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
Extensible Stylesheet Language
In computing, the term Extensible Stylesheet Language is used to refer to a family oflanguages used to transform and render XML documents....

. Mr. 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 (with CubeWerx, Oracle Corporation
Oracle Corporation
Oracle Corporation is an American multinational computer technology corporation that specializes in developing and marketing hardware systems and enterprise software products – particularly database management systems...

, MapInfo
MapInfo
MapInfo Corporation, initially incorporated as Navigational Technologies Incorporated, was a leading Location Intelligence and GIS company, headquartered in North Greenbush, New York. It was acquired on April 19, 2007 by Pitney Bowes, and on January 28, 2009, the name of division of Pitney Bowes it...

, NTT Data, Mitsubishi
Mitsubishi
The Mitsubishi Group , Mitsubishi Group of Companies, or Mitsubishi Companies is a Japanese multinational conglomerate company that consists of a range of autonomous businesses which share the Mitsubishi brand, trademark and legacy...

, 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
Resource Description Framework
The Resource Description Framework is a family of World Wide Web Consortium specifications originally designed as a metadata data model...

 (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
Document Type Definition
Document Type Definition is a set of markup declarations that define a document type for SGML-family markup languages...

, 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 (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 Corp 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.

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 (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.

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
Open Geospatial Consortium
The Open Geospatial Consortium , an international voluntary consensus standards organization, originated in 1994. In the OGC, more than 400 commercial, governmental, nonprofit and research organizations worldwide collaborate in a consensus process encouraging development and implementation of open...

 (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. 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) and Clemens Portele (Interactive Instruments) also subsequently received the Gardels award, in part for their contributions to GML.

Standards


The Open Geospatial Consortium
Open Geospatial Consortium
The Open Geospatial Consortium , an international voluntary consensus standards organization, originated in 1994. In the OGC, more than 400 commercial, governmental, nonprofit and research organizations worldwide collaborate in a consensus process encouraging development and implementation of open...

 (OGC) is an international voluntary consensus standards organization whose members maintain the Geography Markup Language standard. The OGC coordinates with the ISO
International Organization for Standardization
The International Organization for Standardization , widely known as ISO, is an international standard-setting body composed of representatives from various national standards organizations. Founded on February 23, 1947, the organization promulgates worldwide proprietary, industrial and commercial...

 TC 211
ISO/TC 211
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 range starting at 19101...

 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 also be included in version 2.1 of the United States
United States
The United States of America is a federal constitutional republic comprising fifty states and a federal district...

 National Information Exchange Model
National Information Exchange Model
The National Information Exchange Model is an XML-based information exchange framework from the United States. NIEM represents a collaborative partnership of agencies and organizations across all levels of government and with private industry...

 (NIEM).

See also

  • GML Application Schemas
    GML Application Schemas
    Geography Markup Language provides the basis for domain- or community-specific "Application Schemas", which in turn support data interoperability within a community of interest...

  • CityGML
    CityGML
    CityGML is a common information model for the representation of sets of 3D urban objects. It defines the classes and relations for the most relevant topographic objects in cities and regional models with respect to their geometrical, topological, semantical and appearance properties...

  • Geographic Data Files
    Geographic Data Files
    Geographic Data Files or GDF is an interchange file format for geographic data.In contrast with generic GIS formats, GDF provides detailed rules for data capture and representation, and an extensive catalog of standard features, attributes and relationships...

     (GDF)
  • SOSI
    SOSI
    SOSI is a much used geospatial vector data format for predominantly used for exchange of geographical information in Norway.SOSI is short for Samordnet Opplegg for Stedfestet Informasjon .The standard includes standardized...

  • Well-known text
    Well-known text
    Well-known text is a text markup language for representing vector geometry objects on a map, spatial reference systems of spatial objects and transformations between spatial reference systems. A binary equivalent, known as well-known binary is used to transfer and store the same information on...


External links