should locked=yes have lower priority?
karussell opened this issue · comments
This node is tagged bicycle=yes and foot=yes and locked=yes. And we cannot pass it.
Or is this incorrect tagging?
I know how this is meant. It is still discussable if this is the same way where it is passable. So IMO in the photo this would be two different ways and locked=yes means inaccessible for all transportation modes.
Seems like a tagging mistake to me:
If bikes are allowed and pedestrians can walk freely then yes to both but not a vehicle.
I asked question about this on forum https://discuss.graphhopper.com/t/barrier-lift-gate-is-blocking-bike/8398
I have similar node near me (Poland) which blocks routing through official cycling route.
I would vote for ignoring locked=yes
if there is [access]=yes
.
Probably the majority of mappers uses locked=yes
as equivalent to access=no
and in such a case we would also let it through for bicycle=yes
.
I did this change in my fork to allow bicycles when there is locked=yes
. Maybe something like this could go to the main branch?
if (restrictedValues.contains(firstValue))
return true;
else if (node.hasTag("locked", "yes") && !intendedValues.contains(firstValue))
return true;
I think that one also needs to take the transportation mode into regard. See master...ratrun:biketourplanner:issue2982 for a draft
@ratrun Don't we already return restrictionKeys
based on transportation mode?
restrictionKeys.addAll(OSMRoadAccessParser.toOSMRestrictions(transportationMode));
Then below lines will return true
for bicycle=yes
only for bike profile, right?
String firstValue = node.getFirstValue(restrictionKeys);
intendedValues.contains(firstValue))
Don't we already return
restrictionKeys
based on transportation mode?
Yes, you are right. Thank you! I now simplified my change and created a PR, see #3018
@ratrun nice one