[OSRM-talk] Bicycle routing, crossing large roads: how to get information on the roads crossed

Richard Fairhurst richard at systemed.net
Mon Dec 23 13:50:04 UTC 2019


Jeroen Hook wrote:
> Is there another way to find out what type of road(s) I am crossing?

I think the easiest solution would be to allow bicycles on your highway=primary, but set it to be a restricted access road (or just to have a really high cost). That way you’d still call process_turn, but in reality the primary road wouldn't be used for routing.

My private cycle.travel fork does something like this in its equivalent of process_turn (e.g. https://cycle.travel/map?from=51.7546,-1.2612&to=51.7554,-1.2616), though it’s a (pretty extensive) fork of 4.9.x so not directly comparable.

Alternatively, you could do some preprocessing to mark intersections, depending on the size of your source data. For a different project I wrote https://github.com/systemed/intersector which identifies junctions in an .osm.pbf. If you were to patch it to output node IDs, then look up those node IDs in process_node, you could assign crossing penalties that way.

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20191223/0eea7e40/attachment.html>


More information about the OSRM-talk mailing list