offroute: add auto mode for standard driving routes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-05-08 21:55:31 +00:00
commit cf758476b4

View file

@ -53,7 +53,8 @@ MEMORY_LIMIT_GB = 12
OFF_NETWORK_THRESHOLD_M = 500 OFF_NETWORK_THRESHOLD_M = 500
# Mode to Valhalla costing mapping # Mode to Valhalla costing mapping
MODE_TO_COSTING = { MODE_TO_COSTING = {
"auto": "auto",
"foot": "pedestrian", "foot": "pedestrian",
"mtb": "bicycle", "mtb": "bicycle",
"atv": "auto", "atv": "auto",
@ -62,7 +63,9 @@ MODE_TO_COSTING = {
# Mode to valid entry point highway classes # Mode to valid entry point highway classes
# foot = any trail/track/road, mtb = tracks and roads, vehicle = roads only # foot = any trail/track/road, mtb = tracks and roads, vehicle = roads only
MODE_TO_VALID_HIGHWAYS = { MODE_TO_VALID_HIGHWAYS = {
"auto": {"primary", "secondary", "tertiary", "unclassified", "residential",
"service"},
"foot": {"primary", "secondary", "tertiary", "unclassified", "residential", "foot": {"primary", "secondary", "tertiary", "unclassified", "residential",
"service", "track", "path", "footway", "bridleway"}, "service", "track", "path", "footway", "bridleway"},
"mtb": {"primary", "secondary", "tertiary", "unclassified", "residential", "mtb": {"primary", "secondary", "tertiary", "unclassified", "residential",