graphhopper / directions-api

Issues for the GraphHopper Directions API
https://graphhopper.com/api/1/docs/
60 stars 25 forks source link

Matrix API bug for disconnected locations #40

Closed karussell closed 7 years ago

karussell commented 7 years ago

curl "https://graphhopper.com/api/1/matrix?point=55.925644%2C-5.152433&point=55.918959%2C-5.159128&type=json&vehicle=small_truck&debug=true&out_array=weights&out_array=times&out_array=distances&key=[key]"

This returns time and distance == 0 but should either throw a RuntimeException (would be consistent with the Routing API) or an 'infinite' value to still use parts of the results.

Although we normally prefer fail fast, I would prefer an 'infinite' value here. Some other Matrix API providers return negative values which I don't like too.

karussell commented 7 years ago

Fixed via explicitely throwing the RuntimeException (keep consistency with Routing API). This will be deployed in the next ~30h