Trim PBF file with poly while downloading
This commit is contained in:
parent
6088b9b37f
commit
c33aab8dae
@ -68,6 +68,7 @@ RUN apt-get update \
|
||||
mapnik-utils \
|
||||
npm \
|
||||
osm2pgsql \
|
||||
osmctools \
|
||||
osmium-tool \
|
||||
osmosis \
|
||||
postgresql-$PG_VERSION \
|
||||
|
||||
12
run.sh
12
run.sh
@ -67,13 +67,19 @@ if [ "$1" == "import" ]; then
|
||||
DOWNLOAD_POLY="https://download.geofabrik.de/europe/luxembourg.poly"
|
||||
fi
|
||||
|
||||
if [ -n "${DOWNLOAD_PBF:-}" ]; then
|
||||
echo "INFO: Download PBF file: $DOWNLOAD_PBF"
|
||||
wget ${WGET_ARGS:-} "$DOWNLOAD_PBF" -O /data/region.osm.pbf
|
||||
if [ -n "${DOWNLOAD_POLY:-}" ]; then
|
||||
echo "INFO: Download PBF-POLY file: $DOWNLOAD_POLY"
|
||||
wget ${WGET_ARGS:-} "$DOWNLOAD_POLY" -O /data/region.poly
|
||||
fi
|
||||
|
||||
if [ -n "${DOWNLOAD_PBF:-}" ]; then
|
||||
echo "INFO: Download PBF file: $DOWNLOAD_PBF"
|
||||
if [ -f /data/region.poly ]; then
|
||||
wget ${WGET_ARGS:-} "$DOWNLOAD_PBF" -O - | osmconvert - -B=/data/region.poly -o=/data/region.osm.pbf
|
||||
chown renderer: /data/region.osm.pbf
|
||||
else
|
||||
wget ${WGET_ARGS:-} "$DOWNLOAD_PBF" -O /data/region.osm.pbf
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${UPDATES:-}" == "enabled" ] || [ "${UPDATES:-}" == "1" ]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user