Skip to content

joejoepie/import-osmborder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Import OSM Borders into PostGIS

Docker Automated build

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

Usage

The process is split into tow steps

  1. generate-osmborder: Generate a CSV file containing the geometries
  2. import-osmborder: Docker image containing the CSV file for easy import into PostGIS

Download PBF File

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

Generate

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.

Import

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

Version of OpenStreetMap

2017-11-20

About

Import OSM Borders

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 72.0%
  • Dockerfile 28.0%