Skip to content

Import OpenStreetMap into PostGIS using imposm3

License

Notifications You must be signed in to change notification settings

MapcreatorIO/import-osm

 
 

Repository files navigation

Import OSM into PostGIS using imposm3

Docker Automated build

This Docker image will import an OSM PBF file using imposm3 and a custom mapping configuration.

Usage

Download PBF File

Use Geofabrik and choose the extract of your country or region. Download it and put it into the directory.

Import

The import-osm Docker container will take the first PBF file in the volume mounted to the /import folder and import it using imposm3 using the mapping file from the $MAPPING_YAML (default /mapping/mapping.yaml).

Volumes:

  • Mount your PBFs into the /import folder
  • Mount your mapping.yaml into the /mapping folder
  • If you want to use diff mode mountn a persistent location to the /cache folder for later reuse
docker run --rm \
    -v $(pwd):/import \
    -v $(pwd):/mapping \
    -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-osm

About

Import OpenStreetMap into PostGIS using imposm3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 65.1%
  • Dockerfile 29.0%
  • Makefile 5.9%