kopia lustrzana https://github.com/osm2vectortiles/osm2vectortiles
Add Dockerfile and import script
rodzic
dce1fd2734
commit
f3f5387390
|
|
@ -1,7 +0,0 @@
|
|||
FROM mdillon/postgis:9.4
|
||||
|
||||
apt update
|
||||
apt install wget
|
||||
|
||||
|
||||
CMD ["./import.sh"]
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
FROM mdillon/postgis:9.4
|
||||
|
||||
ADD http://data.openstreetmapdata.com/water-polygons-split-3857.zip /data
|
||||
|
||||
CMD ["./import.sh"]
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
readonly OSM_DB=${OSM_DB:-osm}
|
||||
readonly OSM_USER=${OSM_USER:-osm}
|
||||
readonly OSM_PASSWORD=${OSM_PASSWORD:-osm}
|
||||
|
||||
readonly DB_HOST=$DB_PORT_5432_TCP_ADDR
|
||||
|
||||
function import_shp() {
|
||||
shp2pgsql -g way /data/water-polygons-split-3857/water_polygons.shp | psql -h $DB_HOST -p 5432 -U $OSM_USER -W $OSM_PASSWORD $OSM_DB
|
||||
}
|
||||
|
||||
function main() {
|
||||
import_shp
|
||||
}
|
||||
|
||||
main
|
||||
Ładowanie…
Reference in New Issue