Skip to content

Allow to route through highway=construction #3016

Closed

Description

@caspg

In some usecases it would be useful to treat highway=construction as accessible roads.

For example, I could use map matching API to snap some older GPX track and get OSM informations. This would allow to maintain original GPX geometry without avoiding roads under construction.

By default highway=construction shouldn't be accessible but there should be an option to change that with custom profile.

link to the forum discussion

Activity

  1. karussell commented on Jun 10, 2024

    @karussell
    Member

    Would be adding CONSTRUCTION to RoadClass sufficient for your use case?

  2. caspg commented on Jun 10, 2024

    @caspg
    ContributorAuthor

    @karussell I think it's not enough. I had to add "construction" to allowedHighways here.

    But then construction ways are included by default so they would have to be de-prioritized by default somehwere.

  3. karussell commented on Jun 10, 2024

    @karussell
    Member

    Did you try the custom model I suggested:

    {
      "priority":[
        { "if": "road_class != CONSTRUCTION", "multiply_by": "bike_priority" },
        { "if": "road_class == CONSTRUCTION", "multiply_by": "1" },
        { "else_if": "!bike_access && (!backward_bike_access || roundabout)", "multiply_by": "0" },
        { "else_if": "!bike_access && backward_bike_access", "multiply_by": "0.2" }
      ]
    }

    without the change to the source code in BikeCommonAccessParser.java?

  4. caspg commented on Jun 10, 2024

    @caspg
    ContributorAuthor

    @karussell without changing BikeCommonAccessParser.java it's not working.

    CleanShot 2024-06-10 at 12 58 54@2x

    After adding changing BikeCommonAccessParser:

    CleanShot 2024-06-10 at 13 03 09@2x

  5. karussell commented on Jun 10, 2024

    @karussell
    Member

    Can you share the custom model you used? Please note that the custom model must be used on the server-side (otherwise it won't work here but also not for map matching)

  6. caspg commented on Jun 10, 2024

    @caspg
    ContributorAuthor

    @karussell Your custom model worked server side! I need to read more about client vs server side models.

    Open PR with adding CONSTRUCTION TO RoadClass?

  7. karussell commented on Jun 10, 2024

    @karussell
    Member

    Basically with a client-side model you are adding more statements to the existing list of the server-side model (priority and speed sections separately) and so you currently cannot "unblock" roads that are blocked via the server-side model. Furthermore map matching, isochrone and spt endpoints only work with server-side models.

    Open PR with adding CONSTRUCTION TO RoadClass?

    👍

  8. caspg commented on Jun 10, 2024

    @caspg
    ContributorAuthor

    Thanks for the explanation. I'll prepare the PR shortly.

  9. added this to the 10.0 milestone on Jun 10, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions