Inquiry About Extracting Distances Using OpenRouteService Matrix API :/v2/matrix/

Matrix API (/v2/matrix/):

The API returns a 2-dimensional array representing distances between sources and destinations, structured like a table. Could you clarify the correct way to extract the distance between a specific start point and end point?

For example, when providing the following coordinates:
“locations”: [[13.407032, 52.524932], [10.007046, 53.576158]]

The response includes the following distance matrix:
“distances”: [[0, 288152], [287735.53, 0]]

Could you confirm how I should extract the distance from Berlin (13.407032, 52.524932)(start) to Hamburg (10.007046, 53.576158)(end) from this matrix?

Hey,

check our backend documentation on this:

https://giscience.github.io/openrouteservice/api-reference/endpoints/matrix/

Best regards

2 Likes

Hey,

Thank you for the response.

Best Regards

1 Like