Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 441610d

Browse files
committed
made the extras optional via INCLUDE_EXTRAS var.
1 parent ce63d71 commit 441610d

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

scripts/cut_tiles.sh

+23-14
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export CONF_FILE=${CONF_FILE:-"/conf/valhalla.json"}
1616
export REGION=${REGION:-"us-east-1"}
1717
export OSMLR_DIR=${OSMLR_DIR:-"${DATA_DIR}/osmlr"}
1818
export NUMBER_OF_THREADS=${NUMBER_OF_THREADS:-"4"}
19+
export INCLUDE_EXTRAS=${INCLUDE_EXTRAS:-"true"}
1920

2021
catch_exception() {
2122
if [ $? != 0 ]; then
@@ -176,22 +177,30 @@ mkdir -p ${CUR_PLANET_DIR}
176177
catch_exception
177178
pushd ${CUR_PLANET_DIR}
178179
catch_exception
179-
echo "[INFO] building connectivity."
180-
valhalla_build_connectivity -c ${CONF_FILE}
181-
catch_exception
182-
echo "[INFO] building stats."
183-
valhalla_build_statistics -c ${CONF_FILE}
184-
catch_exception
185-
echo "[INFO] exporting edges."
186-
valhalla_export_edges --config ${CONF_FILE} > edges_${stamp}.0sv
187-
catch_exception
180+
181+
if [[ "$INCLUDE_EXTRAS" == "true" ]]; then
182+
echo "[INFO] building connectivity."
183+
valhalla_build_connectivity -c ${CONF_FILE}
184+
catch_exception
185+
echo "[INFO] building stats."
186+
valhalla_build_statistics -c ${CONF_FILE}
187+
catch_exception
188+
echo "[INFO] exporting edges."
189+
valhalla_export_edges --config ${CONF_FILE} > edges_${stamp}.0sv
190+
catch_exception
188191

189192
#Don't upload these for now.
190-
#for f in connectivity*; do mv_stamp $f ${stamp}; done
191-
#mv_stamp statistics.sqlite ${stamp}
192-
#mv_stamp maproulette_tasks.geojson ${stamp}
193-
#cp_stamp ${DATA_DIR}/$(basename ${admin_file}) ${stamp}
194-
#cp_stamp ${DATA_DIR}/$(basename ${timezone_file}) ${stamp}
193+
for f in connectivity*; do mv_stamp $f ${stamp}; done
194+
mv_stamp statistics.sqlite ${stamp}
195+
mv_stamp maproulette_tasks.geojson ${stamp}
196+
cp_stamp ${DATA_DIR}/$(basename ${admin_file}) ${stamp}
197+
cp_stamp ${DATA_DIR}/$(basename ${timezone_file}) ${stamp}
198+
else
199+
rm -f ${admin_file}
200+
rm -f ${timezone_file}
201+
rm -f maproulette_tasks.geojson
202+
fi
203+
195204
pushd ${TILES_DIR}
196205
catch_exception
197206
find . | sort -n | tar -cf ${CUR_PLANET_DIR}/planet_${stamp}.tar --no-recursion -T -

0 commit comments

Comments
 (0)