Admiral/admiral-router/INSTALL.sh
2025-06-24 14:22:50 +02:00

27 lines
867 B
Bash

country=slovenia
port=5000
set -o xtrace
mdir -p data
cd data
if ! test -f "../maps/${country}-latest.osm.pbf"; then
curl -kLSs "http://download.geofabrik.de/europe/${country}-latest.osm.pbf" -o "../maps/${country}-latest.osm.pbf"
fi
for profile in bike car ev km kpm mk walk ;
do
mkdir -p $profile
cp "../maps/${country}-latest.osm.pbf" "${profile}/${country}-${profile}.osm.pbf"
cd $profile
osrm-extract -p "../../vehicles/${profile}.lua" "${country}-${profile}.osm.pbf"
osrm-partition "${country}-${profile}.osrm"
osrm-customize "${country}-${profile}.osrm"
echo "osrm-routed --port=${port} --algorithm mld --max-table-size=1000000000 --max-viaroute-size=1000000000 --max-trip-size=1000000000 ${country}-${profile}.osrm" >> RUN.sh
(( port++ ))
cd ..
done
read -p "Press enter to continue"
exit 0