Converting map data between formats

This page lists tools to convert external map data to and from OSM formats.

GDAL/OGR, ogr2ogr and QGIS – the almost every time working solution

The GDAL/OGR library supports several dozen vector file formats. You can use the ogr2ogr command line programme to convert between them. It is also able to read/write PostgreSQL databases (with PostGIS extension).

A common workflow to get OSM data into a different file format using GDAL is

Using the command line programme ogr2ogr:

  1. Load OSM data into PostgreSQL database using Osm2pgsql or Imposm.
  2. Convert data using ogr2ogr where ogr2ogr reads from the database and writes to your desired output format.

Using the QGIS (no command line required):

  1. Open .osm.pbf file in QGIS
  2. Save in your desired output format.

Formats

File typeExtensionTo import into OSMTo export from OSMDiscussion/Comments
Adobe Illustrator.ainoosm2ai.plSee Exporting to Adobe Illustrator, OSM2ai and http://www.flosm.de/ai/
ArcGIS
(by ESRI)
severalExportToOSM.pyArcGIS
E00e00partialpartialSee message 593
Dafif ?dafif2osmno
DXF
(by AutoCad)
.dxfDXF_import (JOSM plugin), Dxf2gpxGeoConverter, Spatial Manager Desktop™, GDAL/OGR, QGIS, mygeodata.cloudSee Convert dxf File to Shapefile Using Grass
GADM ?gadm2osmno
Garmin maps.imgnoOSM Map on Garmin
Geobase ?geobase2osmno
GeoJSON.geojsonosm-and-geojson, geojsontoosm, geojson2osm-es6OSM2GEO, osmtogeojson, Gdal ogr2ogr, osmium exportogr2ogr tips
GeoPackage.gpkgnoGdal ogr2ogr, osm-export-tool
GML ?gml2osmXSLT, Python, GeoConverterSee Converting OSM to GML. See JOSM ticket #6921.
Google Earth (Keyhole) Markup Language.kmlJOSM/Plugins/OpenDataOSM in Google Earth, Osm2KML, GeoConverter, osm-export-tool.
GPX.gpxImport as layer in main site, josm, gpx2csv->csv2osmOGR, QGIS, GeoConverter
MP (Polish format).mpmp2osm
PFM2OSM
Osm2mp
Persistance of Vision Raytracer.povno
Shapefile.shpJOSM/Plugins/OpenDataGDAL, QGIS, GeoConverter, osm-export-toolSee Shapefiles
Smallworld (GE Smallworld datastore).dsnoOpenStreetMap Plug-In

Specialised formats

This lists only very specific formats, mostly dedicated for a specific import.

File typeExtensionTo import into OSMTo export from OSMDiscussion/Comments
AND ?and2osmnoSee AND Data
CIA World Database.wdbwdb2osmno
Coastlines.pgsperl scriptnoSee Almien coastlines (PGS)
LINZ ?LINZno
NKF ?Nkf2osmno
Frida ?Fridano
TIGER ?? ? ?See TIGER, most data has been imported

See also

  • For exporting a map as images (PNG, SVG, PDF) please refer to the Rendering page.
  • For a much more general overview, see the Export Guide.
This article is issued from Openstreetmap. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.