Matrix and Directions maximum search radius

hi,

in my case study I use these api together: matrix and directions

before making an api matrix request for N points I check if each points are reachable to the graph, I check this condition with the api directions and I rely on the maximum_snapping_radius parameter.
If one of the N points has no routing solution with a certain maximum_snapping_radius then I exclude it from the next matrix request.

I would like to know if the matrix.maximum_search_radius parameter is calculated in a similar way to directions.maximum_snapping_radius and if they can be set to the same value.
I thought that for right behavior directions.maximum_snapping_radius it should be a little bit bigger to say matrix.maximum_search_radius

this is because sometimes it happens that two points are “reachable” with directions but they are not reachable by matrix

hi @stefcud ,

yes, the distance calculation uses the exact same function for the same locations and comes (at least in my test just now) to the exact same result and matches it against the given restriction.
Code lines:
directions

matrix

If you debug your instance at these locations, you will see.

Can you provide the example, where something is reachable by directions but not by matrix?

Best regards

1 Like