graphhopper / directions-api

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

Isochrone returns "Bad request" if time_limit is too small #55

Open boldtrn opened 7 years ago

boldtrn commented 7 years ago

When requesting isochrones, there seems to be a lower bound for the time_limit. If I want to request isochrones below a certain level, I just get "Bad request" but no hint what is wrong. Not sure why this happens, we should at least document it. Maybe even return a explanatory exception.

OK: https://graphhopper.com/api/1/isochrone?point=-33.827141,%20151.188251&key=[MY_KEY]&time_limit=60

Bad request: https://graphhopper.com/api/1/isochrone?point=-33.827141,%20151.188251&key=[MY_KEY]&time_limit=59

OK: https://graphhopper.com/api/1/isochrone?point=51.131108%2C12.414551&key=[MY_KEY]&time_limit=115

Bad request: https://graphhopper.com/api/1/isochrone?point=51.131108%2C12.414551&key=[MY_KEY]&time_limit=114

boldtrn commented 7 years ago

Just an addition to the above. Somehow the isochrone is too likely to return just bad request IMHO. For example this request is placed over water, so no isochrones are found. Instead of telling the user about that you just get Bad Request:

https://graphhopper.com/api/1/isochrone?point=37.57859625002284,-122.18685150146484&time_limit=600&buckets=2&vehicle=car&key=[KEY]