GH 7 - Enabling "construction and access = no" access

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

Thanks, you are correct. Do you happen to know if this overwrites where access = NO?

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.

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