Matrix endpoint returning null for all locations when some routes exist

Hello, I’m using the matrix endpoint and noticed that some requests are getting all null responses for distance & duration. It looks like some locations when included, will prevent all the other locations from getting good data.

Here is an example:

  "locations": [
    [-157.8814736, 21.3280137],
    [-157.8667852, 21.3138143],
    [-158.0245043, 21.4545909],
    [-157.9076614, 21.6066256],
    [-157.9186302, 21.6240531],
    [-157.9813495, 21.6950804],
    [-156.2243193, 20.6204251]
  "destinations": [0],
  "metrics": ["distance", "duration"],
  "units": "mi"

This returns null for all distance and location values.

If you remove the last location, the expected distance and duration will be returned. I would have expected only the distance and duration for the last location to return null and the rest to continue returning values.

Forgot to say that this is for the driving-car profile eg:

Hi @ddunlop,

it seems this is due to the last point in your list not being found.
If you drop that one, you will get results. But it shouldn’t be the case that all values are returned null.

Would you mind opening an issue in our backend repo with description and this example?

Best regards


Here is the issue: Matrix endpoint returning null for all locations when one route does not exist · Issue #1785 · GIScience/openrouteservice · GitHub

1 Like