Problematic routing from ORS

I think I found a ‘soft’ bug (not sure if that is the best description in English…)

Basically, when using the Directions API (self-hosted through Docker), sometimes the route returned by ORS takes ‘shortcuts’ through parking lots (and other similar type roads), instead of going through proper intersections. This is an issue since, unless I am mistaken, where I live this is illegal to do. Its also typically much slower due to the much lower speed limit in parking lots + the presence of pedestrians. Also, it results in an overall higher number of turns compared to using the ‘normal’ intersection…

I first saw this issue on a self hosted (Docker) ORS instance. I tried on 3 computers (1 Linux, two Windows, all through Docker so the host OS should not have any impact regarding this issue), with the latest OSM data for the region (Canada/Québec).

I then tried and got the same result with ORS’s online map service. Here is a simple example of what can happen:

Another one, at the same intersection:

And another, not so far at a different intersection:

https:// classic-maps .openrouteservice.org/directions?n1=45.645203&n2=-73.868294&n3=18&a=45.645796,-73.869088,45.644693,-73.869361&b=0&c=0&k1=en-US&k2=km

Another, nearby:

https:// classic-maps .openrouteservice.org/directions?n1=45.643898&n2=-73.869045&n3=18&a=45.644802,-73.868964,45.643399,-73.870059&b=0&c=0&k1=en-US&k2=km

In all those cases, the proposed route is simply worst then simply following the ‘real’ road due to traversing parking lots.

Now, for the record, I tried those very same examples on OpenStreetMap’s website using all three available routing engines (Valhalla, GraphHopper, OSRM) and they all gave a ‘normal’ result that uses the intersection.

My best guess as to why this is happening is that those roads are marked with the OSM tag “highway=service” (or at least the ones I checked) but without the “service=parking_aisle". Some of the ones I tested had “service=driveway”. From what I can tell, they all had “access=customer”.

From my understanding of the OSM tags documentation, all of those should have been avoided, unless absolutely needed (like if the start/end point was only accessible through such road).

I tried to find some settings in the API or within the different driving profiles, but I haven’t found anything that allowed me to avoid such results.

Am I doing something wrong? Did I truly find a bug, and if so, where should I start looking to try and fix this (if I figure out how to that is)?




PS: Sorry, this is so long, I tried to give all the details I could think of…

And sorry for the broken links, I could only put two since my account is fresh.



Also, just to be clear, it does not do that on every corner with parking lots and/or businesses/shops. I did find some that do work properly like this one here:

https:// classic-maps .openrouteservice.org/directions?n1=45.643771&n2=-73.858868&n3=18&a=45.643336,-73.858461,45.644521,-73.859217&b=0&c=0&k1=en-US&k2=km

And here is a somewhat ironic case where it tries very very hard to avoid going through the parking lot, even though it starts from within that very same parking lot:

https:// classic-maps .openrouteservice.org/directions?n1=45.639896&n2=-73.842764&n3=18&a=45.640016,-73.842491,45.640316,-73.843516&b=0&c=0&k1=en-US&k2=km

For the record, there is now a GitHub issue opened for this : Link

2 Likes