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

Commit 7288ae5

Browse files
committed
added logic to build geojson osmlr.
1 parent 8127cbc commit 7288ae5

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

scripts/cut_tiles.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export REGION=${REGION:-"us-east-1"}
1717
export OSMLR_DIR=${OSMLR_DIR:-"${DATA_DIR}/osmlr"}
1818
export NUMBER_OF_THREADS=${NUMBER_OF_THREADS:-"4"}
1919
export INCLUDE_EXTRAS=${INCLUDE_EXTRAS:-"true"}
20+
export BUILD_GEOJSON_OSMLR=${BUILD_GEOJSON_OSMLR:-"false"}
2021

2122
catch_exception() {
2223
if [ $? != 0 ]; then
@@ -189,7 +190,6 @@ if [[ "$INCLUDE_EXTRAS" == "true" ]]; then
189190
valhalla_export_edges --config ${CONF_FILE} > edges_${stamp}.0sv
190191
catch_exception
191192

192-
#Don't upload these for now.
193193
for f in connectivity*; do mv_stamp $f ${stamp}; done
194194
mv_stamp statistics.sqlite ${stamp}
195195
mv_stamp maproulette_tasks.geojson ${stamp}
@@ -211,6 +211,24 @@ mv ${TILES_DIR}/1 ${CUR_PLANET_DIR}/1
211211
catch_exception
212212
mv ${TILES_DIR}/2 ${CUR_PLANET_DIR}/2
213213
catch_exception
214+
215+
if [ "$BUILD_GEOJSON_OSMLR" == "true" ] && [ -n "$S3_SEGMENT_PATH" ]; then
216+
echo "[INFO] building geojson osmlr."
217+
218+
mkdir -p ${TILES_DIR}/osmlr
219+
catch_exception
220+
221+
geojson_osmlr \
222+
-i ${OSMLR_DIR} \
223+
-o ${TILES_DIR}/osmlr \
224+
--config ${CONF_FILE}
225+
catch_exception
226+
227+
mv ${TILES_DIR}/osmlr ${CUR_PLANET_DIR}/osmlr
228+
catch_exception
229+
echo "[SUCCESS] geojson osmlr completed!"
230+
fi
231+
214232
popd
215233
catch_exception
216234
popd

0 commit comments

Comments
 (0)