Rearrange OSM2PGSQL_EXTRA_ARGS to allow overriding of existing parameters (fixes #112)

This commit is contained in:
Alexander Overvoorde 2020-04-26 19:00:59 +02:00
parent e838310073
commit 2754592d1c
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ OSM2PGSQL_BIN=osm2pgsql
TRIM_BIN=/home/$ACCOUNT/src/regional/trim_osc.py TRIM_BIN=/home/$ACCOUNT/src/regional/trim_osc.py
DBNAME=gis DBNAME=gis
OSM2PGSQL_OPTIONS="-d $DBNAME -G --hstore ${OSM2PGSQL_EXTRA_ARGS} --tag-transform-script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua --number-processes ${THREADS:-4} -S /home/renderer/src/openstreetmap-carto/openstreetmap-carto.style" OSM2PGSQL_OPTIONS="-d $DBNAME -G --hstore --tag-transform-script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua --number-processes ${THREADS:-4} -S /home/renderer/src/openstreetmap-carto/openstreetmap-carto.style" ${OSM2PGSQL_EXTRA_ARGS}
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# When using trim_osc.py we can define either a bounding box (such as this # When using trim_osc.py we can define either a bounding box (such as this

2
run.sh
View File

@ -73,7 +73,7 @@ if [ "$1" = "import" ]; then
fi fi
# Import data # Import data
sudo -u renderer osm2pgsql -d gis --create --slim -G --hstore --tag-transform-script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua --number-processes ${THREADS:-4} ${OSM2PGSQL_EXTRA_ARGS} -S /home/renderer/src/openstreetmap-carto/openstreetmap-carto.style /data.osm.pbf sudo -u renderer osm2pgsql -d gis --create --slim -G --hstore --tag-transform-script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua --number-processes ${THREADS:-4} -S /home/renderer/src/openstreetmap-carto/openstreetmap-carto.style /data.osm.pbf ${OSM2PGSQL_EXTRA_ARGS}
# Create indexes # Create indexes
sudo -u postgres psql -d gis -f indexes.sql sudo -u postgres psql -d gis -f indexes.sql