Format Atlas

Compare

GML vs GeoJSON: schemas and coordinate systems

GML describes features using XML and application schemas. GeoJSON represents geometry and properties in JSON; this comparison uses the coordinate rules of RFC 7946.

Which format should you choose?

Consider GML for shared domain-specific feature definitions and GeoJSON for general geometry and properties in web maps.

Good fit for GML

Exchange geographic features and properties

  • Define domain features using a shared schema

Good fit for GeoJSON

Exchange map features and properties

  • Points, lines, and polygons in web maps

Basic information

FieldGMLGeoJSON
Extension.gml, .xml.geojson, .json
MIME typeapplication/gml+xmlapplication/geo+json
Common usesExchange geographic features and propertiesExchange map features and properties
How to openOpen it in a compatible GIS after checking the GML version and application schema; inspect and validate its XML structure.Open it in a GeoJSON-compatible map tool or text editor; inspect locations and geometry on a map.
Export or convertFor GeoJSON conversion, check CRS, axis order, property types and nested structures.When converting, verify coordinate order, coordinate reference system, geometry, and properties in the destination tool.

Choose by use case

Define domain features using a shared schema

Exchange geographic features and properties

GML

Points, lines, and polygons in web maps

Exchange map features and properties

GeoJSON

Key point 1

GML supports application schemas. GeoJSON uses common structures such as Feature and Geometry.

More on the differences

Key point 2

GML coordinates follow the declared or inherited CRS. RFC 7946 GeoJSON uses WGS 84 longitude, then latitude.

More on the differences

More on the differences

Check the recipient's GML version, profile and GeoJSON support; test round trips with representative features.

  • When moving from GML to GeoJSON, transform the CRS and map axis order rather than just copying coordinate arrays.
  • Define mappings for nested features, property types, identifiers and references. Successful rendering does not prove schema semantics were preserved.

Frequently asked questions

Does converting GML to GeoJSON preserve everything?

No. Check complex features, references and transformation precision; retain the source and schema when needed.

Learn more

Related uses and checks

Checks before handing off GIS data

References and specifications