Skip to content

add CONSTRUCTION to RoadClass enum - #3017

Merged
karussell merged 1 commit into
graphhopper:masterfrom
caspg:add-construction-road-class
Jun 10, 2024
Merged

karussell merged 1 commit into
graphhopper:masterfrom
caspg:add-construction-road-class

Conversation

@caspg

@caspg caspg commented Jun 10, 2024 •

Copy link
Copy Markdown
Contributor

This change will allow to route through highway=construction as discussed here #3016

For example, we 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.

To use highway=construction one need to update custom model server side, for exmaple like this:

{
  "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" }
  ]
}

@karussell
karussell merged commit 835f2a2 into graphhopper:master Jun 10, 2024
@karussell

Copy link
Copy Markdown
Member

Thanks!

@karussell karussell added this to the 10.0 milestone Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants