docker image build -t osm_imposm .
Au moyen de l'image Docker avec comme options :
-v `<repertoire local de telechargement>:/data`
-v `<repertoire local du présent repo git>:/git/covid19_map`
Lancer l'image avec le shell import_imposm.sh et en arguments :
- l'URL du dataset souhaité. En production : https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf ou https://download.geofabrik.de/europe-latest.osm.pbf Pour tester : https://download.geofabrik.de/europe/luxembourg.html
- la chaîne de connexion Postgres sur le modèle postgis://username:password@host:port/databasename?sslmode=require&prefix=NONE
Lancer l'image avec le shell con_refresh_db.sh
et en argument la chaîne de connexion Postgres
Once : pull the GDAL/OGR Docker image
./get_gdal_docker.sh
Everytime a refresh of the countries_subcountries PG table is required :
./load_countries.sh "connexion string"
connexion_string may be formated for ogr2ogr with any combination of following arguments :
dbname=<databasename> host=<addr> port=<port> user=<role> password=<password>
connexion_string may also follow the URL syntax :
postgres://username:password@host:port/databasename?sslmode=require
In order for the OSM points and polygons to inherit from country codes for newly set up countries, launch :
./update_imposm_with_country.sh <connexion string> <ISO2 country string>
sample for France (code FR) : ./update_imposm_with_country.sh postgres://username:password@host:port/databasename:port?sslmode=prefer FR