I am writing some training notes for new QGIS users at my work.

I have a section on types of vector files; ESRI Shapefile, MapInfo Tab and GML & GZ so far.

We sometimes use the UK Land Registry INSPIRE polygons, supplied as .gml, and Ordnance Survey MasterMap supplied as .gz

So I have written a paragraph on shapefiles and Tab files, but have struggled to come up with anything succinct for GML files. I have tried to understand the Wikipedia entry Geographic Markup Language so I understand that it is markup language for geographic information, as the name obviously implies.

But then the details require a degree of technical understanding that I am finding pretty impenetrable.

I have had a look at other web pages as well and they all more or less say the same thing, even the GIS Stackechange tag for gml that says "Geography Markup Language (GML) is an OGC Standard for expressing geographical features" - doesn't, to my mind, shed any light.

Also the question What does it mean "GML is an XML grammar"? goes over my head.

I am looking for a short paragraph that explains what it is for a new user (and myself clearly)

The best I can come up with at the moment is...

GML is a vector file format that allows for geographic data to be kept as a text file that can be shared easily between systems

It's easy enough to open a GML file in QGIS, and work with it, so perhaps this explanation more or less be skipped over anyway, but then how does a GML get created, in what software? I'd be looking for this to be included as part of the answer.

Or am I overcomplicating it?

  • The Geography Markup Language (GML) is an XML grammar for expressing geographical features > more details opengeospatial.org/standards/gml
    – Mapperz
    Commented Feb 2, 2019 at 16:36
  • Look into the new OS ZoomStack Products (released end of January 2019) they come as geopackage (making it much easier to load and go in QGIS) no converting. > ordnancesurvey.co.uk/opendatadownload/products.html#ZMSTCK
    – Mapperz
    Commented Feb 2, 2019 at 16:39
  • Zoomstack does not contain master map that is still shipped as gml.
    – Ian Turton
    Commented Feb 2, 2019 at 17:20
  • Open MasterMap (Coming soon in 2019). get ready for Geopackage > ordnancesurvey.co.uk/about/news/2018/…
    – Mapperz
    Commented Feb 2, 2019 at 17:38
  • Thanks for the heads up on the OS Open and the Geopackage, now downloaded and already in use. It's great. I am still not sure what a gml file is though! I do have GeoPackage to add to my training notes as well now. Commented Feb 2, 2019 at 18:58

1 Answer 1


Herewith an answer to my own question based on the information I have gleaned, and with some new understanding. If it needs tweaking I am hoping it may be commented upon over time.

Markup language, as the name implies is a way of "Marking up" text. A software application can then interpret this and display the marked up text in a specific way.

From Wikipedia - Markup Language "In computer text processing, a markup language is a system for annotating a document in a way that is syntactically distinguishable from the text.

"HTML (Hypertext Markup Language) is a markup language that web browsers use to interpret and compose text, images, and other material into visual or audible web pages." From Wikipedia - HTML

For example:

<B>If this was HTML this text will be displayed in a web browser in bold because it
has been marked by tags indicated by the <> brackets and the instruction B for Bold<\B>

GML is a type of markup language, based upon another called XML. It is a language that allows for geographic data to encoded as text. A text file can be shared easily between systems.

Below is a copy and paste of a very small part of a GML file opened in Notepad. The co-ordinates of a geometry are stored as a string of text that is markedup with information that the reading software can interpret and display as, in this case, polygons.

<AB:GEOMETRY><gml:Polygon srsName="urn:ogc:def:crs:EPSG::27700" srsDimension="9">
<gml:exterior><gml:LinearRing><gml:posList>611745.88 141314.13 656755.48 141362.72 
611459.48 148360.82 611779.27 141349.98 611798.72 141339.10 617802.75 141247.74 
611506.79 14</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></AB:GEOMETRY>
  • XML is strictly speaking a meta language, it defines a way of defining mark up languages such as GML, through the use of 'Schema'. XML is itself a subset of SGML (Standard Generalized Markup Language).
    – nmtoken
    Commented Feb 5, 2019 at 20:02
  • A GML file is a well-formed XML file that is valid against a/the GML application schema
    – nmtoken
    Commented Feb 5, 2019 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.