Convert GML to GEOJSON

Turn GML files into GEOJSON. A GeoJSON FeatureCollection in WGS 84 longitude and latitude, as the GeoJSON standard asks, with each feature's attributes as its properties.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop GML files on the dialor turn it to pick what to do

GML map data as GeoJSON.Features come out in WGS 84 longitude and latitude, with their attributes kept.

  1. What you get

    One GeoJSON file holding a FeatureCollection. Each feature keeps its attributes as its properties, so the data you read from a WFS service is still attached to the shapes.

    The coordinates are in WGS 84 longitude and latitude, as the GeoJSON standard asks.

  2. Coordinate systems

    If the GML uses another coordinate system, such as Korea's EPSG:5186, the coordinates are converted to WGS 84.

    If the GML names no system, the coordinates are taken as WGS 84 when they fit. When they do not fit, the conversion stops with unsupported_elements.

  3. Several layers

    A GML file with several layers becomes one FeatureCollection. Each feature gets a layer column that names the layer it came from, so you can still tell them apart.

    To go the other way, use GEOJSON to GML.

GML and GEOJSON.What each format is.

The formats

From · GML

GML

Geography Markup Language, the OGC's XML for map features, as WFS services send it.

Extensions
.gml
MIME type
application/gml+xml
Kind
Text and data
To · GEOJSON

GeoJSON

Points, lines and polygons as JSON, the web's map data format.

Extensions
.geojson
MIME type
application/geo+json
Kind
Text and data

In your code.The same GML to GEOJSON conversion through the API, for your app or your agent.

terminal
$ cv convert report.gml report.geojson
$ cv convert report.gml report.geojson

Questions.What people ask about GML to GEOJSON.

01OF 04

WGS 84 longitude and latitude, as the GeoJSON standard asks. Coordinates in another system are converted to it.

Yes. Each feature's attributes become its properties in the GeoJSON.

The layers are joined into one file. A layer column on each feature names where it came from.

The file names no coordinate system, and its coordinates do not fit WGS 84. The conversion stops instead of guessing.

More conversions.Other ways in and out of GML and GEOJSON.