Gregws
October 6, 2025, 12:41am
1
Hiyas,
Using GH 7.0 custom profiles I want to be able to enable driving on construction roads -
road_class == Construction causes errors
.setVehiclesString(“foot|block_private=false,car|block_private=false|turn_costs=true”)
Access is also set to “No” within OSM.
I encounter this issue on newly constructed areas where houses exist, but the underlying dataset in OSM hasn’t been updated to residential roads.
Thanks,
Hi!
As far as I know, RoadClass.CONSTRUCTION wasn’t yet included in GraphHopper 7 — it was introduced only after the 9.x releases (probably around v10 or in the current master branch). That’s why the custom model fails when you try road_class == CONSTRUCTION.
You can double-check the release notes here .
Hope this helps — and please correct me if I’m wrong!
2 Likes
Gregws
October 7, 2025, 8:51am
3
Thanks, you are correct. Do you happen to know if this overwrites where access = NO?
master ← caspg:add-construction-road-class
opened 12:18PM - 10 Jun 24 UTC
This change will allow to route through `highway=construction` as discussed here… https://github.com/graphhopper/graphhopper/issues/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:
```json
{
"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" }
]
}
```
1 Like
I’m not completely sure, but I checked some discussions and found Use explicit ignore list for highway values that might clarify it.
As far as I understood, access=no still takes precedence unless a parser or custom model explicitly allows it.
Gregws
October 15, 2025, 11:17pm
5
Hey, to follow up that adding construction to priority list does override the access = no.
model.addToPriority(If(“road_class == CONSTRUCTION”, MULTIPLY, “1.0”));
I didn’t need to adjust anything to overwrite the access tag. Which is one less thing that I needed to do.
1 Like