maps/backend/scripts/update_all.sh
2026-03-30 12:57:06 +02:00

33 lines
1.2 KiB
Bash
Executable file

#!/bin/bash
# scripts/update_all.sh
# Full data import pipeline. Run steps individually if you only need to refresh one.
set -euo pipefail
echo "=== Maps data import started at $(date -u) ==="
# Step 1: Download latest PBF
/app/scripts/01_download.sh
# Step 2: Import tile data into PostGIS (osm2pgsql default schema)
/app/scripts/02_import_tiles.sh
# Step 3: Import POI data into PostGIS (pois table)
/app/scripts/03_import_pois.sh
# Step 4: Download Photon geocoding index
/app/scripts/04_import_geocoding.sh
# Step 5: OSRM routing graphs — must be run on the HOST, not in this container
echo "NOTE: Run OSRM preprocessing on the Pi host:"
echo " bash backend/scripts/05_import_routing_host.sh ~/dev/maps/data"
# Step 6: Register offline regions in the database
/app/scripts/06_build_offline_packages.sh
echo "=== Maps data import completed at $(date -u) ==="
echo ""
echo "Next steps:"
echo " - Restart martin to pick up new tile data: podman compose restart martin"
echo " - Restart osrm services with new data: podman compose restart osrm-driving osrm-walking osrm-cycling"
echo " - Mount /data/photon/photon_data into the photon container and restart it"