Roadworks and how to handle it

Hi,

We are discussing on talk-fr mailing list of osm about roadworks. some initiatives exist to reference it in opendata or by contribution.
https://cyclo.phyks.me/#/map=17/48.8589/2.3469

http://live.openeventdatabase.org/

How to make it available and used in openroute service ?

Hi @wadouk ,

openrouteservice itself currently only uses data that is available within OSM, and as far as I know roadworks don’t generally appear in OSM as they are seen as temporary. There are some exceptions where the roadworks last for over a month or so, but not for short term items.

In previous discussions we have had where such obstacles need to be taken into account in routing by other services, the general approach is to have the obstacles stored in a service (outside of the control of openrouteservice) which is queried prior to sending a request to openrouteservice and used to create avoid areas. Obviously care would be needed as providing too many avoid areas to openrouteservice can slow down query time, and querystring length is limited.

Hope that gives a bit of an idea of an approach to consider

1 Like

Hi,

Thanks for the information, I was also thinking about having the data stored in an external service and creating avoid areas for the roadworks. One problem I have with this approach is that the avoid areas seem to be an “all or nothing” thing, meaning they are simply completely avoided by OpenRouteService (https://wiki.openstreetmap.org/wiki/OpenRouteService/Help#Avoid_Areas).

Is there an easy way to create hints for avoid areas, that is areas which we’d like to avoid and are given a (huge) malus, but can still be used if required?

The reasoning behind this is that most of the opendata we have at the moment have a free form field for the impact on the traffic, which is not standardized and difficult to parse. Then, knowing there are some works in a given place will almost surely result in issues (whatever the transport mode in use) but it can range from “work trucks are passing, there might be some jams” to “the road is fully blocked”.

Thanks!

At the minute we do not have a way of dynamically adjusting weights when the route is requested. It could be something we look into in the future, but at the minute there is unfortunately no quick or easy way of doing this in the routing generation process itself.