<div dir="ltr">Unfortunately, I don't have a good solution to offer, but I wanted to add my two cents. I did a ton of research on this exact problem a couple of years ago and virtually none of the open source routing platforms I came across were properly equipped to handle it. It seems to be an issue that only bicycle-oriented folks think about. The solution for my problem was to implement in pgRouting where I can do additional processing to assign costs as you've described. It's not the way I'd prefer to do it but until bicycle routing becomes more sophisticated on other routing platforms that's what I've settled on.<div><br></div><div>I don't have the technical expertise to contribute code to OSRM but I'd be more than happy to share my experience with bicycle network planning with anyone looking to improve OSRM's handling of bicycles on this and other questions.</div><div><br></div><div>Spencer</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 23, 2019 at 6:35 AM Richard Fairhurst <<a href="mailto:richard@systemed.net">richard@systemed.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
<div name="messageBodySection"><span>Jeroen Hook wrote:</span><br>
<blockquote type="cite" style="margin:5px;padding-left:10px;border-left:thin solid rgb(26,188,156)">Is there another way to find out what type of road(s) I am crossing?</blockquote>
<div dir="auto"><br></div>
<div dir="auto">
<div dir="auto">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.</div>
<div dir="auto"><br></div>
</div>
<div dir="auto">My private <a href="http://cycle.travel" target="_blank">cycle.travel</a> fork does something like this in its equivalent of process_turn (e.g. <a href="https://cycle.travel/map?from=51.7546,-1.2612&to=51.7554,-1.2616" target="_blank">https://cycle.travel/map?from=51.7546,-1.2612&to=51.7554,-1.2616</a>), though it’s a (pretty extensive) fork of 4.9.x so not directly comparable.<br></div>
<div dir="auto"><br></div>
<div dir="auto">Alternatively, you could do some preprocessing to mark intersections, depending on the size of your source data. For a different project I wrote <a href="https://github.com/systemed/intersector" target="_blank">https://github.com/systemed/intersector</a> 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.</div>
<div dir="auto"><br></div>
<div dir="auto">Richard</div>
</div>
</div>

_______________________________________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/osrm-talk</a><br>
</blockquote></div>