Loading OSM data into PostgreSQL database using osm2pgsql - SpotScore/spotscore GitHub Wiki
Steps:
- Ensure that 'spotscore_postgis_1' container is up to date and running.
- If running Docker in Vagrant, import the OSM data file to a known folder (or clone the spotscore repo to get the example file in sample_data folder).
- Run:
docker run -it --rm --link spotscore_postgis_1:pg -v /home/vagrant/spotscore/sample_data:/import spotscore/osm2pgsql sh -c 'osm2pgsql --create --slim --cache 500 -d gis -E 3857 -U spotscore --host pg --port 5432 -W /import/tartu-copy.osm'
.
- Enter the database password: notsecret
- Import process starts and database tables become populated with data.