osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Distance Matrix Problem

Open aakokgetir opened this issue 3 years ago • 1 comments

Hi,

I am trying to get distance matrix for 12 points. I have this query. In the result, first 9 destinations are snapped into same position which are at least 3.3 km away from the original destinations and for last 3 destination osrm was unable to find route.

But if I remove the last destination from query, Osrm is able to find proper distances in all 11 locations.

I am confused in this situation and I thought there might be somthing I am missing.

Any ideas on what is happening here and how can I overcome the problem?

Thanks for your time.

aakokgetir avatar Jul 08 '22 09:07 aakokgetir

Take a look at the debug output for the foot profile: http://map.project-osrm.org/debug/foot.html#12.69/37.2254/27.6251

image

The pink highlighted areas indicate an isolated section that is disconnected from the main network. That is, according to the way OSRM parses the OSM tags, it can't guarantee a route between the pink paths and the non-pink paths.

So therein lies the answer. The first 11 locations are in the pink area, the 12th is part of the main network.

When you're routing between just the first 11, it's able to find the routes within the isolated network.

When the 12th is included, OSRM tries to be helpful and move the 11 waypoints to somewhere which has a better chance of finding a route to the 12th point. But given the remoteness of the area, it ends up moving them a long way (in this case, the same place) and even then, it still may not be routable.

The fix, is to understand why the underlying OSM data is not allowing walking between these areas. If you expect it should be possible, check for missing tags that allow pedestrian access.

mjjbell avatar Jul 08 '22 19:07 mjjbell