Skip to content

should locked=yes have lower priority? #2982

Closed

Description

@karussell

This node is tagged bicycle=yes and foot=yes and locked=yes. And we cannot pass it.

Or is this incorrect tagging?

Activity

  1. bt90 commented on Apr 21, 2024

    @bt90
    Contributor

    An example from the OSM wiki:

    Example

    It's locked, yet still passable for bikes and pedestrians.

  2. karussell commented on Apr 21, 2024

    @karussell
    MemberAuthor

    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.

  3. bt90 commented on Apr 21, 2024

    @bt90
    Contributor
  4. BURMAUG commented on May 13, 2024

    @BURMAUG

    If bikes are allowed and pedestrians can walk freely then yes to both but not a vehicle.

  5. caspg commented on Jun 9, 2024

    @caspg
    Contributor

    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.

  6. karussell commented on Jun 10, 2024

    @karussell
    MemberAuthor

    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.

  7. caspg commented on Jun 10, 2024

    @caspg
    Contributor

    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?

    commit

            if (restrictedValues.contains(firstValue))
                return true;
            else if (node.hasTag("locked", "yes") && !intendedValues.contains(firstValue))
                return true;
  8. added a commit that references this issue on Jun 10, 2024
  9. ratrun commented on Jun 10, 2024

    @ratrun
    Contributor

    I think that one also needs to take the transportation mode into regard. See master...ratrun:biketourplanner:issue2982 for a draft

  10. caspg commented on Jun 11, 2024

    @caspg
    Contributor

    @ratrun Don't we already return restrictionKeys based on transportation mode?

    https://github.com/graphhopper/graphhopper/blob/master/core/src/main/java/com/graphhopper/routing/util/parsers/AbstractAccessParser.java#L37

    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))
  11. ratrun commented on Jun 11, 2024

    @ratrun
    Contributor

    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

  12. caspg commented on Jun 11, 2024

    @caspg
    Contributor

    @ratrun nice one

  13. added a commit that references this issue on Jun 11, 2024
  14. added this to the 10.0 milestone on Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions