# GML Overview

This chapter describes the GML format for OS VectorMap District. GML serves as a modeling language for geographic systems as well as an open interchange format for geographic transactions on the Internet. More information can be found on the [Geography Markup Language Standards](https://www.ogc.org/standards/gml) [page on the Open Geospatial Consortium (OGC) website](https://www.ogc.org/standards/gml).

The XML specifications that GML is based on are available from the World Wide Web Consortium (The XML specifications that GML is based on are available from the [World Wide Web Consortium (W3C)](https://www.w3.org/) [website](https://www.w3.org/).

Information about Unicode and UTF-8, the character encoding we have chosen, is available on the [Unicode](https://home.unicode.org/) [Consortium website](https://home.unicode.org/).

## **Use of examples**

Any examples in this chapter that mention specific data content are to be taken as examples only.

## **Clarification of terms used in this chapter**

### **Feature attribute**

A property of a feature implemented as an XML element, as defined in ISO 19109.

### **XML attribute**

Attribute as used in an XML context is referred to as an XML attribute.

### **Property**

Most feature attributes are encoded as GML properties – property means a GML property.

### **Schema overview and location**

XML schemas are used to define and validate the format and content of the GML. The GML v3.2 specification provides a set of schemas that define the GML feature constructs and geometric types. These are designed to be used as a basis for building application-specific schemas, which define the data content.

The Ordnance Survey application schemas, which are referenced by the data, are available in the product release.

These schemas make use of XSDs (XML schema definitions) and DTDs (document type definitions) produced by the W3C®, which are available from the W3C website at <http://www.w3.org/XML/1998/namespace.html>.

### **Schema descriptions**

The W3C-provided XSDs and DTDs are:

* **xml.xsd** – to allow the use of the xml:lang attribute for language qualification.
* **XMLSchema.dtd** – required by xml.xsd.
* **datatypes.dtd** – required by XMLSchema.dtd. The OGC-provided schemas are:
* **feature.xsd** – the feature and property constructs.
* **geometry.xsd** – the geometric constructs such as polygon and point.
* **xlinks.xsd** – a schema based on the W3C XLINK recommendation provided by the OGC to make use of the XLINK constructs.

The Ordnance Survey-provided schema is:

* **district.xsd** – the feature type, complex type and simple type declarations.

## **Format description**

### **Documentation**

The ‘OSVectorMapDistrict’ schema document defines the following XML namespaces:

* **district:** `http://namespaces.os.uk/cmd/district/v2.1`&#x20;
* **gml:** `http://www.opengis.net/gml`
* **xsi:** `http://www.w3.org/2001/XMLSchema`
* **xlink:** `http://www.w3.org/1999/xlink`&#x20;

The location of the schema is defined as:

`http://namespaces.os.uk/cmd/district/v2.1`&#x20;

<https://os.uk/xml/cmdschema/district/v2.1/district.xsd>

Features within each tile are provided in a FeatureCollection.

## **Simple Features Profile – Level 0**

GML is designed to support a wide variety of capabilities, ranging from simple contextual mapping, such as OS VectorMap District, to products that include complex geometric property types or even spatial and temporal topology. The [Simple Features Profile of GML 3.2](http://portal.opengeospatial.org/files/?artifact_id=15201) defines a restricted subset of GML, allowing scope for greater interoperability.

This product conforms to Simple Features Profile – Level 0.

### **Geometry**

A geometric property is one that describes a specific geometry. All geometric properties are encoded according to the Simple Features Profile, as referenced above.

The XML attribute ‘srsName’ shall be set to ‘urn:ogc:def:crs:EPSG::27700’, which uses eastings and northings specified in metres.

{% hint style="info" %}
*EPSG (European Petroleum Survey Group) provides numeric identifiers for many common projections and associated projection or coordinate metadata (such as measurement units or central meridian) for each identifier.*
{% endhint %}

All exterior polygon boundaries have an anticlockwise orientation and all interior polygon boundaries have a clockwise orientation.

Raw GML data extract from NT VMD GML open data styled using open GIS software.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.os.uk/os-downloads/products/maps-and-imagery-portfolio/os-vectormap-district/os-vectormap-district-technical-specification/gml-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
