Skip to content

Instantly share code, notes, and snippets.

@Komzpa
Last active January 24, 2023 08:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Komzpa/7f7c6db6ef9341d3de373929a95a4826 to your computer and use it in GitHub Desktop.
Save Komzpa/7f7c6db6ef9341d3de373929a95a4826 to your computer and use it in GitHub Desktop.
given:
- Postgres database gis, user gis, accepting trust connections on localhost
# grab software
sudo apt install osmosis curl wget unzip
# import schema
curl https://raw.githubusercontent.com/openstreetmap/openstreetmap-website/master/db/structure.sql | psql
# get latest osmosis wit non-broken pbf support
wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.zip
unzip osmosis-latest.zip
# grab osm dump of Belarus
wget http://data.gis-lab.info/osm_dump/dump/latest/BY.osm.pbf
# import
bin/osmosis --read-pbf file="BY.osm.pbf" --log-progress --write-apidb database="gis" user="gis" host="localhost" validateSchemaVersion=no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment