Jump:

Ordnance Survey – Great Britain's national mapping agency

OS MasterMap® – GML (Geography Mark-up Language)

GML was developed by the Open GIS Consortium (OGC), a global organisation of developers and users that aims to maximise the benefit of geographic information. GML is a spatially enabled dialect of XML schema. According to the World Wide Web Consortium (W3C), XML schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents. Following a schema ensures a level of standardisation. Standardisation encourages compatibility between different sources of data. GML can therefore be considered as a worldwide standard language for the production and distribution of geographic data. 

OS MasterMap now supplied in GML 2.1.2

OpenGIS GML 2.1.2 implementation specification (PDF)

This has replaced the GML 2.0 version. GML 2.1.2 was ratified by the OGC in September 2002 to bring it in line with the W3C XML schema specification of May 2001.

By upgrading to GML 2.1.2 Ordnance Survey hopes to remove some of the confusion that the older specification caused. This will allow partners and customers to use many more XML products that do not provide support for the older (October 2000) XML schema draft specification.

Consultation with Ordnance Survey OS MasterMap partners indicates that the impact on customers' systems has been minimal, as the changes to the data are minor.

OS MasterMap partners

Changes to the OS MasterMap data files

There is virtually no change to the XML instance documents that contain the OS MasterMap data. The two changes required are:

  • The XML schema name space now reflects the 2001 specification.
  • The schema location will reference the new schemas.

For example:

<?xml version="1.0" encoding="UTF-8"?> <osgb:FeatureCollection
xmlns:osgb="http://www.ordnancesurvey.co.uk/xml/namespaces/osgb"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ordnancesurvey.co.uk/xml/namespaces/osgb
http://www.ordnancesurvey.co.uk/xml/schema/v3/OSDNFFeatures.xsd"
fid="example gml2.1.2">

Changes to the OS MasterMap schema files

The following changes were required to the XML schema that define OS MasterMap:

Update the XML name space.
Swap the timeInstant type to dateTime.
Use a different construct for default values of attributes.
Import all name spaces that are referenced in the schema file explicitly.
For example:

OSDNFFeatures.xsd
original : xmlns="http://www.w3.org/2000/10/XMLSchema"
revised : xmlns="http://www.w3.org/2001/XMLSchema"

OSQueryResult.xsd
original : <element name="queryTime" type="timeInstant" minOccurs="1" maxOccurs="1"/>
revised : <element name="queryTime" type="dateTime" minOccurs="1" maxOccurs="1"/>

OSComplexTypes.xsd
original : <attribute name="broken" type="boolean" use="default" value="false"/>
revised : <attribute name="broken" type="boolean" use="optional" default"false"/>

OSDNFFeatures.xsd
original : <include schemaLocation="OSComplexTypes.xsd"/>
revised : <include schemaLocation="OSComplexTypes.xsd"/>
<import namespace="http://www.opengis.net/gml"/>

View current schemas

If you have any technical queries please contact us.

 

Top of page