Geographic Markup Language (GML) is a standardized means of storing geographic information in eXtensible Markup Language (XML) encoded files specified by the openGIS Consortium.XML, an open, ASCII based, format uses descriptive tags to store data doing away with any proprietary vendor specific formats.Tags may be nested within each other and may be extended in an object oriented like manner to suit your own data model, while maintaining compatibility with the standard.
Why is GML important for me?
GML provides both a vendor neutral as well as implementation neutral format that is optimally suited for distribution over a network.Both plain XML files as well as compressed XML files may be streamed so that a user does not have to wait for downloading an entire file before opening; this greatly enhances usability in a networked environment.
XML has become the common base for many applications; as a result many applications are available to work with XML files and thus with GML datasets. The bottom line on this for you is that using a standard off the shelf XML tool you are able to do many of the same things that you would have needed a heavyweight desktop GIS for a few years back.For example visualization does not require a GIS tool at all, because a simple transformation of the GML to another XML based format like Scalable Vector Graphics (SVG) or eXtensible 3D graphics (X3D) can be accomplished through some scripting and a XSL (eXtensible Stylesheet Language) file describing how to represent the GML features and a commonly available transformation engine which most platforms have built in today.All this is possible because GML has standardized the way geographic features are described.Even your web browser could be used to do these transforms.GML definitions are described using the XML Schema standard.XML Schema files specify the rules and format to use for encoding abstract spatial features, such as lines and polygons in GML. You can define a more application specific schema or document type definition that fits your data model by extending the available GML schemas.
GML 2 (and now GML 3; recently approved by the OGC) can take advantage of the XLink and XPointer mechanisms enabling linking of features in one GML file to those in another XML file through use of hyperlinks.This ultimately allows constructing a new, even virtual, dataset by setting up links between two or more primary GML data stores.As a consequence Geography Markup Language has become the driving technology engine behind the geo-spatial Internet like other XML standards have done for the rest of the web.
Is GML only for data?
Apart from describing real world features and attributes GML can also be used to describe spatial operations and attribute queries and specify arguments, typically bounding boxes or other geometries, for these operations. GML currently is mostly used as an interchange format in the broadest sense possible.As a data format the version 2 of the GML standard supports the description of ?Simple Features? another OpenGIS standard.This means that 0, 1 and 2 dimensional objects (geometries) and their attributes can be described using GML2.As such only real world objects that can be captured as a vector can be described using GML2.As of GML 3 it is possible to represent coverage type data such as remote sensing or distribution functions. This will enable you to use gridded datasets and for example do density analysis on this data.Next to coverage data features with complex 2D and 3D geometries can now be captured in GML as well as temporal features, observation data and dynamic features.
Another feature missing from GML 2 is the lack of support for topology; this means that overlay, neighbours and other functions like these cannot take advantage of this.GML now supports a topology model, so that arguments for a network analysis can be specified in GML and the results (a route for example) returned in GML.
One more problem with XML in general is that files tends to be bulky and can take quite some time to parse more time to parse files for processing. Possible solutions for this problem are file compression using the commonly supported gzip format to reduce file size.Indexing mechanisms for XML are starting to appear, it will just be a matter of time before these percolate into GML and are extended to support spatial indexing.Next to that a growing number of both relational and object oriented native XML databases is available. As we have seen above there are some serious issues using GML 2 for geo-processing applications.Many of these have been solved with the acceptance of GML 3 by the OpenGIS consortium.A good thing about GML 3 is it modular design and backwards compatiblity; this way you can select to use those parts of the standard that you need without any overhead burden.Most software in the meantime will import GML to its native format to do spatial analysis on that data instead of using the GML natively.This way the application can take advantage of (vendor specific) indexing and topology for analysis and display.
Weaknesses in GML 2 have not stopped organizations of investigating and implementing GML; most of the implementations only use GML as an export format/mechanism and do conversions to a proprietary format before actual use in an application.With the efforts made for GML 2 they can now easily step up to GML 3 obtaining conformance to various ISO standards in the process.
Two examples of data providers using GML today are the British Ordnance Survey with their Digital National Framework dataset and the Dutch Topographic Service (TDN) with the next generation ? still experimental ? of their 1:10000 mapping product: Top10Vector.TDN is, as part of an improvement process, busy designing and implementing this on a GML 2 based data model.
Why should I use GML?
You should use GML, if not already using it, because it will enable you to take part in the Spatial Web.More organizations are starting to use GML each day, the rationale behind that choice is the fact that it is based on the world wide accepted XML standard and the rapidly increasing number of tools and commercial products to generate, check, interpret and serve online XML (and thus GML) data sets.
Also when you use GML you can easily integrate your data with that of other data providers and distribute your data to others, even if these others are just your colleagues in a different department using some other GIS package with its vendor specific storage format.Once you achieve this interoperability your organization will be able to save on daily operations costs and enhance quality of service at the same time.
Still there are some problems achieving the state of full interoperability. As was demonstrated during the GML Relay event organized by the Netherlands Society for Earth Observation and Geo-Informatics (KvAG) in June of 2001. The goal of this event was to demonstrate interoperability between software of different vendors through using GML.During the event an XML file was read into an application, then some edits were made after which the file was written back to disk and passed on to the next vendor.For a start, only a very limited number of vendors participated and of those few most had problems importing or exporting the GML file.Things looked more promising during the next event, in December 2002, when a greater number of vendors participated in the relay and with a greater succes.
What software can I use now?
The OpenGIS consortium has defined a software interface called the Web Feature Server (WFS) that will allow you to offer an online GML service. Most vendors have a Web Feature Server implementation available as off the shelf package, usually this supports vendor specific data formats only. To generate maps without advanced clients you can use another OpenGIS specified software interface: the Web Map Server (WMS).The WMS will render a map as an image based or return attribute data in a predefined format, among others GML.
All OpenGIS Web Feature Server implementations, such as the CARIS Spatial Fusion transactional WFS, support GML; most Web Map Servers have some level of GML support (for attribute data and bounding box definition). As far as spatial databases (like Oracle Spatial and PostGIS) are concerned, most have support for GML loading and export.Making a converter for reading GML files into your desktop GIS is almost trivial because of the large number of XML parsers and libraries available and wide support for scripting of applications through use of languages such as Visual Basic for Applications. An example; GeoPortal and the CARIS Spatial Fusion services CARIS has implementations of both the Open GIS specified Web Feature Server (WFS) and Web Map Server (WMS) as part of the CARIS Spatial Fusion suite of products.Both a standalone as well as a cascading Web Map Server (cWMS) are available.These products extensively use the GML standard for communication of queries and results. Both the Spatial Fusion cascading WMS as well as the Spatial Fusion WFS have recently been deployed in a project for the Canadian Department of Fisheries and Oceans (DFO).During this project, a first in Canada, a broad based geospatial infrastructure (GeoPortal) that focuses specifically on the marine community was developed.By using backend Spatial Fusion Services such as the OGC Cascading Web Mapping Server DFO will be enabled to incorporate layers from various proprietary data formats in multiple spatial reference systems.Also because the cascading WMS acts as a client next to being a server it will enable fusion of map layers from other WMS's in a way that is transparent to the end users of the system.This allows combination of data that is stored in different spatial reference systems on different servers, e.g.on servers of other parties, to be combined into one comprehensive map image.This is independent of the brand of server and greatly enhanced the interoperability of the portal.
The Spatial Fusion Web Feature Server is a transactional server that will allow database transactions such as insert, delete or select to be conducted over the web for spatial objects.As a result of queries GML may be returned/downloaded to clients, which may then be imported into or linked to proprietary desktop GIS software.For deployment within the DFO a custom client was developed which contains additional functionality to browse in the metadata systems hosted on a catalogue server and connect to a download server.The download server enables the download of data in proprietary formats so that it can be used in (non OGC compliant) desktop GIS for example for off line analysis or other use.
To answer the question of this article "Is GML only for Internet
GIS?" We may conclude that, though not specifically intended for Internet
GIS, GML is ideally suited format for Internet GIS.Actual use currently
is twofold.The first being bulk (and update) data distribution by data
providers; either next to the other supported formats or as sole format.
The second usage is as part of the Geographic Information Infrastructure
that it has been designed for.As the GML standard matures to a more robust
spatial format with support for topology, versioning and indexing we will
see more and more applications supporting GML as a "native" format.Geographic
Markup Language will enable the step from Geographic Information System
to Geographic Information Infrastructure.