What is a .gml file?
application/gml+xml
GML (Geography Markup Language) is the OGC's XML grammar for geographic features. Features carry typed properties and geometry elements such as gml:Point, gml:LineString, gml:Polygon, and their aggregates, with coordinates in gml:posList or gml:coordinates and the coordinate reference system named by an srsName attribute. It is the payload format of WFS services and the base of several national and INSPIRE data standards.
How to use a .gml file
Use an example .gml file to test GML parsers and XML-based GIS pipelines, checking namespace handling, srsName resolution including the axis-order rules that differ between GML versions, and conversion to GeoJSON or shapefile.
Download example .gml files
- Kestrel Bay Territory — GML 3.2 Twin (latitude-first)The territory as GML 3.2 with an EPSG URN srsName — which means latitude comes first, the opposite of GeoJSON. This is the single most common cause of features landing in the wrong hemisphere, so the file is built to catch it.
- GML 3.2 — CRS84 srsName (longitude first)The same five towns as the territory GML twin, but declared with the CRS84 URN instead of the EPSG one — which flips the axis order to longitude first. The two files are otherwise identical in structure, so together they isolate axis-order handling from everything else.
- GML 2.1 — Legacy gml:coordinates With Custom SeparatorsGML 2.1 packed coordinates into a single `gml:coordinates` string whose decimal, coordinate and tuple separators are all declared as attributes and can be anything. GML 3 replaced it with `gml:posList`, but WFS 1.0 servers still emit this, and a parser that assumes the default separators mis-reads any file that changes them.
- GML 3.2 — MultiSurface With an Interior RingGML calls a multipolygon a MultiSurface and its parts surfaceMembers, and nests exterior and interior rings under named elements rather than relying on ring order. This feature holds the holed lake and a solid parcel in one geometry, which is the shape a WFS response usually takes.