Routing/Narrow Roads
< Routing
Jump to navigation
Jump to search
A summary detailing how prevalent open-source OSM routers manage navigation on narrow ways and the array of OSM tags they accommodate.
OSRM
The standard car profile:
- will not direct a vehicle along a road with a
width<2.2
and anarrow=yes
tags - will adhere to any specified legal
max_width
- will impose a 0.5 speed penalty for any way with
width<=3
, or any way withlanes<=1
that does not haveoneway=yes
. - will penalize
oneway=alternating
by a guesstimated delay of 40%. Some renderers might also draw two-way arrows based on this tag.
Sources:
- https://github.com/Project-OSRM/osrm-backend/issues/6613#issuecomment-1520813631
- https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/lib/way_handlers.lua#L400-L402
- https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/lib/way_handlers.lua#L487-L509
- https://github.com/Project-OSRM/osrm-backend/blob/31e31a63d062fb804f5f4695ed3036ca7a269ead/profiles/lib/way_handlers.lua#L404-L409
- https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L44
- https://github.com/Project-OSRM/osrm-backend/issues/6712
GraphHopper
No support. Currently, width
, max_width
, andlanes
are not taken into account.
Sources:
- https://discuss.graphhopper.com/t/osm-tags-and-penalty-rules-for-narrow-bidirectional-roads/8524
- https://github.com/graphhopper/graphhopper/blob/master/core/src/main/java/com/graphhopper/routing/util/parsers/CarAccessParser.java
- https://github.com/graphhopper/graphhopper/blob/master/core/src/main/java/com/graphhopper/routing/util/parsers/CarAverageSpeedParser.java
Valhalla
Limited support. The standard car profile:
- will adhere to any specified legal
max_width
- Currently,
width
, andlanes
are not taken into account.
Sources
- https://github.com/valhalla/valhalla/discussions/4591
- https://valhalla.github.io/valhalla/api/turn-by-turn/api-reference/
- https://taginfo.openstreetmap.org/projects/valhalla#tags
- https://github.com/valhalla/valhalla/blob/5d250d21ad06e396ddb731d471273780bbfa1655/src/sif/autocost.cc#L466
OpenRouteService
Limited support. The standard car profile:
- will adhere to any specified legal
max_width
- Currently,
width
, andlanes
are not taken into account.
Sources:
- https://ask.openrouteservice.org/t/osm-tags-and-penalty-rules-in-openrouteservice-for-narrow-bidirectional-roads/5794
- https://giscience.github.io/openrouteservice/technical-details/tag-filtering
- https://github.com/GIScience/openrouteservice/blob/main/ors-engine/src/main/java/org/heigit/ors/routing/graphhopper/extensions/flagencoders/CarFlagEncoder.java