-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Incorrect error message when querying a table service #5845
Description
Before calculating routes, I try to check the reachability (no “disconnected” road segments) of the destinations.
I want to do this through a table query - from depot to each item.
To test it, I took a sample query from the documentation and added an unreachable point to it and added a "radiuses" parameter.
http://router.project-osrm.org/table/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219;44.0086,30.7672?sources=0&radiuses=300;300;300;300
Query result:
{"message":"Could not find a matching segment for coordinate 3","code":"NoSegment"}
OK. I change the source point number to 2
http://router.project-osrm.org/table/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219;44.0086,30.7672?sources=2&radiuses=300;300;300;300
Query result:
{"message":"Could not find a matching segment for coordinate 3","code":"NoSegment"}
OK. I change the order of the points and put the unreachable point first.
http://router.project-osrm.org/table/v1/driving/44.0086,30.7672;13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?sources=0&radiuses=300;300;300;300
Query result:
{"message":"Could not find a matching segment for coordinate 3","code":"NoSegment"}
OK. I change the source point number to 1
http://router.project-osrm.org/table/v1/driving/44.0086,30.7672;13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?sources=1&radiuses=300;300;300;300
Query result:
{"message":"Could not find a matching segment for coordinate 3","code":"NoSegment"}
I would like to get exactly the index of the point (or points) to which the route cannot be laid. But the response from the server is the same every time, and it is impossible to understand what the destination is incorrect.
It would be ideal to have an array of such points in the server's response.
It would be possible to make separate routing requests for each depot-client pair, but I have 400-500 destinations each time.
Is there another way to find unreachable destinations with a single query?