forked from openmaptiles/openmaptiles-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimport-diff
More file actions
executable file
·23 lines (21 loc) · 903 Bytes
/
import-diff
File metadata and controls
executable file
·23 lines (21 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
# For backward compatibility, allow both PG* and POSTGRES_* forms,
# with the non-standard POSTGRES_* form taking precedence.
# An error will be raised if neither form is given, except for the PGPORT
export PGHOST="${POSTGRES_HOST:-${PGHOST?}}"
export PGDATABASE="${POSTGRES_DB:-${PGDATABASE?}}"
export PGUSER="${POSTGRES_USER:-${PGUSER?}}"
export PGPASSWORD="${POSTGRES_PASSWORD:-${PGPASSWORD?}}"
export PGPORT="${POSTGRES_PORT:-${PGPORT:-5432}}"
imposm diff \
-connection "postgis://$PGUSER:$PGPASSWORD@$PGHOST:$PGPORT/$PGDATABASE" \
-mapping "${IMPOSM_MAPPING_FILE:?}" \
-cachedir "${IMPOSM_CACHE_DIR:?}" \
-diffdir "${IMPOSM_DIFF_DIR:?}" \
-expiretiles-dir "${EXPIRETILES_DIR:?}" \
-expiretiles-zoom "${EXPIRETILES_ZOOM:-14}" \
-config "${IMPOSM_CONFIG_FILE:?}" \
"${PBF_DATA_DIR:?}/changes.osc.gz"