This Docker image will import an OSM PBF file using imposm3 and a custom mapping configuration.
The process is split into tow steps
- generate-osmborder: Generate a CSV file containing the geometries
- import-osmborder: Docker image containing the CSV file for easy import into PostGIS
Use Geofabrik and choose the extract of your country or region. Download it and put it into the directory.
The generate-osmborder Docker container will take the first PBF file and generate the CSV file.
Mount your PBFs into the /import
folder
docker run --rm \
-v $(pwd):/import \
openmaptiles/generate-osmborder
Now upload the generated CSV to GitHub releases and update the reference link inside import-osmborder.
The import-osmborder will import the embedded CSV into the database.
docker run --rm \
-e POSTGRES_USER="osm" \
-e POSTGRES_PASSWORD="osm" \
-e POSTGRES_HOST="127.0.0.1" \
-e POSTGRES_DB="osm" \
-e POSTGRES_PORT="5432" \
openmaptiles/import-osmborder
2017-11-20