@@ -16,6 +16,7 @@ export CONF_FILE=${CONF_FILE:-"/conf/valhalla.json"}
1616export REGION=${REGION:- " us-east-1" }
1717export OSMLR_DIR=${OSMLR_DIR:- " ${DATA_DIR} /osmlr" }
1818export NUMBER_OF_THREADS=${NUMBER_OF_THREADS:- " 4" }
19+ export INCLUDE_EXTRAS=${INCLUDE_EXTRAS:- " true" }
1920
2021catch_exception () {
2122 if [ $? != 0 ]; then
@@ -176,22 +177,30 @@ mkdir -p ${CUR_PLANET_DIR}
176177catch_exception
177178pushd ${CUR_PLANET_DIR}
178179catch_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+
195204pushd ${TILES_DIR}
196205catch_exception
197206find . | sort -n | tar -cf ${CUR_PLANET_DIR} /planet_${stamp} .tar --no-recursion -T -
0 commit comments