Skip to content

Latest commit

 

History

History
57 lines (45 loc) · 2.91 KB

converters.md

File metadata and controls

57 lines (45 loc) · 2.91 KB

##Converters to turn .osm data into other data types:

###Smaller datasets:

####To GeoJSON:

####To Shapefile:

####To various formats, including GeoJSON and Shapefile:

  • QGIS: native support in version 2.0, OSM plugin for earlier versions
    • After importing or downloading OSM data, select the features you want and then do Save As… to select a new format and/or projection

###Larger datasets:

Note: most of these require using the command line. If you're not used to that, don't be afraid--it can save you a lot of time!

####To various formats:

  • Osmium: built with C++ and JavaScript, powers a number of other tools

  • ogr2ogr (part of GDAL): convert to GeoJSON, Shapefile, PostGIS, and a variety of other formats

    ogr2ogr -f GeoJSON points.json data.osm.pbf points
    ogr2ogr -f GeoJSON lines.json data.osm.pbf lines
    ogr2ogr -f GeoJSON multilinestrings.json data.osm.pbf multilinestrings
    ogr2ogr -f GeoJSON multipolygons.json data.osm.pbf multipolygons
    ogr2ogr -f GeoJSON other_relations.json data.osm.pbf other_relations
    

####To PostGIS:

After it's in PostGIS:

###Going the other direction: