#!/bin/bash # Regenerate every OSM crash-junction event. The spec strings live here because # they were previously nowhere -- the original invocations weren't recorded, and # recovering "which two streets is this event?" meant re-deriving them from the # generated geometry. Don't let that happen twice. # # woolies_carpark/junctions.json is hand-authored (Trolley Run) and not touched. set -e cd "$(dirname "$0")/.." C="${OSM_CACHE:-$HOME/.cache/burnout_osm}" [ -d "$C" ] || { echo "no OSM cache at $C -- see README"; exit 1; } while IFS='|' read -r id json lat lon specs; do [ -z "$id" ] && continue IFS=';' read -ra SPEC <<< "$specs" python3 tools/osm_junction.py "$C/$json" "levels/$id/junctions.json" "$lat" "$lon" "${SPEC[@]}" done <<'EOF' queen_st_mall|brisbane_cbd.json|-27.4699|153.0251|Albert x Adelaide|Albert Street|Adelaide Street;Elizabeth x George|Elizabeth Street|George Street southbank|southbank.json|-27.4775|153.0215|Melbourne x Merivale|Melbourne Street|Merivale Street;Grey x Glenelg|Grey Street|Glenelg Street albert_parklands|albert_parklands.json|-27.4740|153.0280|Alice x George|Alice Street|George Street;Margaret x Edward|Margaret Street|Edward Street story_bridge|story_bridge.json|-27.4635|153.0355|Bridge Approach|Bradfield Highway|Kemp Place kangaroo_point|kangaroo_point.json|-27.4780|153.0345|Cliffs Corner|River Terrace|Main Street EOF echo "junctions rebuilt (woolies_carpark left alone -- hand-authored)"