Convert GML to CSV

Turn GML files into CSV. A CSV with one row for each feature: its shape as WKT in a first column named WKT, then every attribute as a column.

Converted in an isolated sandbox on our serversDeleted after 24 hours

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

One row per map feature, with its shape.Each GML feature becomes a row, with its shape as text in the first column.

  1. What you get

    One CSV file with one row for each feature. The first column is named WKT and holds the feature's shape as WKT. Every attribute follows as its own column.

    If the GML has several layers, they are joined into one table. A layer column names the layer each feature came from.

  2. Coordinates

    Coordinates are written as WGS 84 longitude and latitude. They are converted from the system the source uses, such as Korea's EPSG:5186. If the data names no system, the coordinates keep the values they have.

  3. Special cases

    A feature without a geometry keeps its row, and its WKT cell is empty. If an attribute is already named WKT, it is renamed WKT_1 so the shape column stays first.

    CSV has no place for lists or nested values. They are written as JSON text in their cells.

    To go the other way, use CSV to GML.

GML and CSV.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 · CSV

CSV

Rows of comma-separated values. The plainest way to move a table between programs.

Extensions
.csv
MIME type
text/csv
Kind
Text and data

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

terminal
$ cv convert report.gml report.csv
$ cv convert report.gml report.csv

Questions.What people ask about GML to CSV.

01OF 04

Yes. Features without a geometry keep their row, with an empty WKT cell.

WGS 84 longitude and latitude. Coordinates are converted from the source's system. If the data names no system, they are left as they are.

The layers are joined into one CSV. The layer column tells you which layer each feature came from.

It is renamed WKT_1. The first column named WKT holds the shapes.

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