Convert OSM to GEOJSON

Turn OSM 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 OSM files on the dialor turn it to pick what to do

Map data you can open on the web.A GeoJSON file of points, lines and polygons, with each tag kept as a property.

  1. What you get

    One GeoJSON FeatureCollection in WGS 84 longitude and latitude, as the GeoJSON standard asks. Each feature carries its attributes as properties.

    Tagged nodes become points. Ways become lines, or polygons when they are closed and tagged as areas. Route and multipolygon relations become multilines and multipolygons.

  2. How tags are kept

    Common tags such as name, highway and building become their own columns. The other tags are kept as JSON in other_tags, so they are still in the file.

    When the input holds several layers, they are joined into one file. A layer column names where each feature came from. To join GeoJSON files after converting, see merge GEOJSON.

  3. What it leaves behind

    Untagged nodes are dropped. Relations other than route and multipolygon relations are dropped too. Versions and authors are not kept.

OSM and GEOJSON.What each format is.

The formats

From · OSM

OpenStreetMap Data

OpenStreetMap nodes, ways and relations with their tags, as .osm XML or the smaller .osm.pbf.

Extensions
.osm .osm.pbf
MIME type
application/vnd.openstreetmap.data+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 OSM to GEOJSON conversion through the API, for your app or your agent.

terminal
$ cv convert report.osm report.geojson
$ cv convert report.osm report.geojson

Questions.What people ask about OSM to GEOJSON.

01OF 04

Yes. Common tags such as name, highway and building become columns, and the other tags are kept as JSON in other_tags.

A way becomes a polygon when it is closed and tagged as an area. Other ways become lines.

Route and multipolygon relations are converted. Route relations become multilines and multipolygon relations become multipolygons. Other relations are dropped.

Yes. OSM covers both .osm XML and .osm.pbf, and the output is one GeoJSON file.

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