Skip to content

Directions API routes through parking lots rather than go through intersections #1981

@mws-ggagnon

Description

@mws-ggagnon

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

For the record I first posted about this issue on the forum (link) but I figured it made more sense to create an issue here. This issue will more or less be a copy paste of that forum post.

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 the 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 are some simple examples of what can happen:
Example 1
Example 2
Example 3
Example 4

In all those cases, the proposed route is 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, as expected.


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 also 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)?
I haven't really coded in Java in a while but i might be able to look into it a little.



PS: Sorry, this is so long, I tried to give all the details I could think of… But i figured its probably better to give more than less.



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:
Properly working corner example

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:
Peculiar routing
I still included it as it might be linked to this issue somehow?

Also, there was this issue that seemed somewhat similar to mine : GitHub Issue

Proposed solution

I dont have the necessary knowledge to be able to propose an actual solution, but i suspect it will probably be related to the way ORS handles OSM's tags and the weighs used when calculating routes?

Additional context

No response

Forum Topic Link

https://ask.openrouteservice.org/t/problematic-routing-from-ors/7089

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions