Hello,
Is there a way to detect and avoid sharp turns that occur on a single way? I’m encountering an issue with the following path:
Way: 1148573586 | OpenStreetMap
This way is tagged with "footway"
and "bicycle=yes"
, which causes it to be promoted by BikeCommonPriorityParser
due to this logic:
if (pushingSectionsHighways.contains(highway) || "parking_aisle".equals(way.getTag("service"))) {
PriorityCode pushingSectionPrio = SLIGHT_AVOID;
if (way.hasTag("highway", "steps"))
pushingSectionPrio = BAD;
else if (way.hasTag("bicycle", "yes") || way.hasTag("bicycle", "permissive"))
pushingSectionPrio = PREFER;
else if (isDesignated(way))
pushingSectionPrio = VERY_NICE;
As a result, the priority becomes PREFER
. I understand I could lower this using a custom model, but in general, I want to keep the footway + bicycle=yes
combo as preferred—except in cases where it leads to sharp, awkward turns like this.
Interestingly, when planning a similar route using the GraphHopper website:
GraphHopper Maps | Route Planner
…it correctly avoids this problematic path.
I also tried enabling TurnCosts, but it didn’t seem to have any effect—probably because this is a single way, possibly represented by a single edge?
Is there any recommended approach to detect or penalize such turns within a single way?
Thanks!