You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build a distance "matrix" from two vectors of points in a dataset using OSRM, using a set up similar to that of mapdist or gmapsdistance.
I am trying to find an output of 20 rows with one vector (distance) from an input of 20 rows with two vectors (POINTS from origin and destination). That is to say, ONE distance derived from the two points in each row. Instead, I am getting 20 vectors, which I take to be part of a complete matrix. Is there any way I could use OSRM to get the latter product?
The text was updated successfully, but these errors were encountered:
jnwadiuko
changed the title
1:1 distance matrix from OSRM?
pairwise distance matrix from OSRM?
Jun 2, 2023
Hello,
Pairwise distances computation is not provided by the OSRM routing software, and it is not provided by osrm package either.
The solution could be to extract only desired values from the full matrix or to use osrmRoute(..., overview = FALSE) on each desired distances (using the apply() family or a for() loop)
Hopefully this makes sense.
I am trying to build a distance "matrix" from two vectors of points in a dataset using OSRM, using a set up similar to that of mapdist or gmapsdistance.
I am trying to find an output of 20 rows with one vector (distance) from an input of 20 rows with two vectors (POINTS from origin and destination). That is to say, ONE distance derived from the two points in each row. Instead, I am getting 20 vectors, which I take to be part of a complete matrix. Is there any way I could use OSRM to get the latter product?
The text was updated successfully, but these errors were encountered: