bike should preffer more footways with bicycle=yes
caspg opened this issue · comments
I noticed that bike profile is preffering tertiary
highway instead of footway where bicycle traffic is allowed (bicycle=yes
). In my case, it leads to strange route.
Should we lower speed that much if there is bicycle=yes
tag in the footway
?
} else if (way.hasTag("bicycle", "designated") || way.hasTag("bicycle", "official") ||
way.hasTag("segregated", "yes") || way.hasTag("bicycle", "yes")) {
// Here we handle the cases where the OSM tagging results in something similar to "highway=cycleway"
if (way.hasTag("segregated", "yes"))
speed = highwaySpeeds.get("cycleway");
else
speed = way.hasTag("bicycle", "yes") ? 10 : highwaySpeeds.get("cycleway");
After changing speed from 10 to "cycleway" speed (18) it routed better:
As long as there is no segregated
tag I think that the speed penalty of 8km/h is reasonable compared to the speed you can go on the parallel tertiary
road. We need to assume pedestrians and therefore one needs to slow down.
I get that but routing in this case is clearly not ideal. Valhalla and Komoot are using footway in my example.
Can I somehow prioritize that footway with bicycle=yes?
Can I somehow prioritize that footway with bicycle=yes?
We are already prioritizing bicycle=yes
with the value PREFER, see BikeCommonPriorityParser
But we are prioritizing tertiary
also as PREFER, see
Eventually we should remove this line and additionally change the speed from 10 to 12 or 14. Can you try if this solves your reported example?
@ratrun Removing preferHighwayTags.add("tertiary");
and changing speed to 12 worked!
Should I submit PR with this change?
Should I submit PR with this change?
Yes, I think you should try it. I will support your PR, but we need to convince @karussell. If you do so I recommend to also remove the next line preferHighwayTags.add("tertiary_link");
You need to follow CONTRIBUTING.md. and may add yourself to the CONTRIBUTORS.md file.
#3015 is merged, should this issue be closed?