You are trying the new MyGeodata Cloud. Send feedback Back to the previous version

Vector · GIS vector

GML — Geography Markup Language

OGC XML grammar for encoding geographic features, geometries and coordinate reference systems using application schemas.

Type
Vector · GIS vector
Extension
.gml, .xml
Converter
Read & write
Coordinate system
Any (EPSG, ESRI, custom)
Layers
Multiple

What is a GML file?

Geography Markup Language (GML) is an XML grammar for encoding geographic features, standardised by the Open Geospatial Consortium (OGC) and also published as ISO 19136. Rather than prescribing a fixed data model, GML provides building blocks for geometry, coordinate reference systems, time and topology, from which communities define their own application schemas in XML Schema (XSD). A dataset typically consists of a .gml or .xml instance document that references such a schema; some readers create an additional cached schema file alongside it.

GML is widely used in spatial data infrastructures, as an output format of Web Feature Services and in government and cadastral data exchange, and it underlies application schemas such as CityGML and many INSPIRE themes. Each geometry can carry its own srsName, and GML 3 supports curves, arcs, surfaces and solids in addition to simple features. Its flexibility comes at the cost of verbose files and complex schemas that software may support only partially.

GML files usually come from public authorities, cadastral and mapping agencies, or from a Web Feature Service, and are exchanged between GIS, CAD and database systems. Because each GML dataset follows its own application schema, two files with the .gml extension can be structured very differently. When working with them, check that the XSD is available, which GML version is used, and what srsName each geometry declares.

Typical uses

  • Downloading features from a Web Feature Service as XML.
  • Exchanging cadastral and topographic data between government bodies.
  • Publishing harmonised datasets under INSPIRE application schemas.
  • Storing 3D city models and other CityGML-based data.
Files: OGC XML with schemas; flexible but verbose.

Sample GML files — free download

Small, real datasets of the island of Saint Helena (OpenStreetMap, Copernicus DEM, Sentinel-2). Download them, open them in your software, or convert them in one click.

Preview of the sample data: Saint Helena places st-helena-places.gml

Places (GML 3.2)

58 places of Saint Helena (20 settlements, 17 peaks, 21 points of interest) with name, category, elevation from Copernicus DEM and OSM id. GML 3.2 simple features, schema-less (types are inferred on reading).

  • places · Point · 58
  • EPSG:4326
  • 42.5 kB
Attributes (7)
idIntegernameStringcategoryStringkindStringelevationIntegersummaryStringosm_idString
10Jamestowntownsettlement36Capital and only port of Saint Helena293673697
22Diana's Peakpeakpeak809Highest point of Saint Helena4254622180
47Longwood Housemuseumpoi544Napoleon's residence in exile, 1815-182135798100
46Jacob's Ladderlandmarkpoi74Staircase of 699 steps from Jamestown up to Ladder Hill146163201
53Saint Helena Airportairportpoi326Island airport, scheduled flights since 2017166589674

© OpenStreetMap contributors, ODbL 1.0 · Copernicus DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA

Preview of the sample data: Saint Helena basemap st-helena-basemap-gml.zip

Basemap (GML 3.2 + XSD)

Multi-layer basemap of Saint Helena: island outline, land cover, waterways, 100 m contours, roads, Jamestown buildings and places. GML 3.2 with its application schema (.xsd) in a ZIP.

  • island · MultiPolygon · 1
  • landcover · Polygon · 190
  • waterways · LineString · 117
  • contours · LineString · 27
  • EPSG:4326
  • 208 kB
Attributes (3)
nameStringarea_km2Realosm_idString
Saint Helena122.914868269

Inside: README.txt, st-helena-basemap.gml, st-helena-basemap.xsd

© OpenStreetMap contributors, ODbL 1.0 · Copernicus DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA

Frequently asked questions

The reader may not fully support the application schema, or the XSD referenced by the file may be unavailable. Placing the schema next to the .gml file, or letting the software build its own schema, often helps. Unsupported geometry types can also be skipped.

Ready to convert your data?

Drop the files and the Converter does the rest — no install, no account needed for your first conversions.