Hello, new to ORS but getting along fine. I noticed that a matrix v2 request snaps to the nearest graph node, presumably using snap v2 internally. However, since I cannot set the snap radius, I guess matrix uses the default 350 m (I can figure this out by using snap v2 with different radius values).
Would it be possible to pass radius also as a post parameter to matrix v2?
Keep up the good stuff!
Guido
Hey,
yup, that is exactly what happens.
Currently, radius is not planned as a parameter to /matrix.
Introducing the /snap-endpoint was done among others to enable you to check the results of snapping and alter your input as desired.
Best regards
Thanks for this. As a follow up, I run into the following:
- For a (large) set of (medium sized) administrative units, I try to get matrix response for the units’ centroids to a fixed (national) location. This is good enough for our current modeling set up;
- The direct matrix call runs into the problem described above, i.e. for many admin units, no snapped node is found within the default snap radius applied inside matrix;
- I now first do a snap call with a 10 kilometer radius. This leaves 8 (out of > 600) admin units without a snapped node, and, therefore, without a matrix response;
- When I inspect OSM for the centroids of the missing 8 admin units, I find roads well within the 10 km radius. I am a bit puzzled, therefore, why these are not found as valid nodes.
(NB. I also used a 100 km radius, but the same 8 units centroids will not be snapped to anything).
May this be linked to (topological) issues in OSM?
G.
It might, and it might also be linked to this issue of differing snapping implementations.
I am also not sure whether there doesn’t exist a global (and probably undocumented) limit to snapping…
8 units without a snapped node sounds like something one could manually fix, by setting the corresponding centroids to something valid?