Skip to content

Instantly share code, notes, and snippets.

@wcmatthysen
Last active February 19, 2019 10:49
Show Gist options
  • Save wcmatthysen/b7df0c2ab682d00e93cedd002f965594 to your computer and use it in GitHub Desktop.
Save wcmatthysen/b7df0c2ab682d00e93cedd002f965594 to your computer and use it in GitHub Desktop.
Import OSM-data into Postgres-database.
# Normal command on a country-file.
osm2pgsql --create --hstore --slim -U postgres -d osm-country -H localhost --style openstreetmap-carto.style country.osm.pbf
# Command for planet-wide import.
osm2pgsql --create --number-processes 6 --flat-nodes /tmp/flat_nodes.bin --cache 8000 --hstore --slim -U postgres -W -d osm-world -H localhost --style openstreetmap-carto.style ~/planet-latest.osm.pbf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment