Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.0 Area for isochrones returns NaN #4

Closed
itsozz opened this issue May 24, 2019 · 1 comment
Closed

v1.0.0 Area for isochrones returns NaN #4

itsozz opened this issue May 24, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@itsozz
Copy link
Contributor

itsozz commented May 24, 2019

This is a 2-stage issue. Firstly, the reason for the NaN is an incorrectly referenced key "total_area_km" which doesn't exist in the response from the API, it should be "area".

Secondly, the units for the "area" output have been changed by the API to match those of the input type, rather than simply defaulting to km^2. See openrouteservice issue #91 for more background. This means that the units conversion code needs to be reworked to match the output from the API. My understanding is that the output from the API is as follows:

  • For isochrones based on time, the "value" for the range is always in seconds and the "area" is always in km^2
  • For isochrones based on distance, the "value" for the range is always in metres and the "area" is in the units specified, e.g. (mi -> mi^2, m -> m^2, km -> km^2)

The fix for the second part will be based on the understanding above.

@itsozz itsozz added the bug Something isn't working label May 24, 2019
@itsozz itsozz self-assigned this May 24, 2019
@itsozz
Copy link
Contributor Author

itsozz commented May 30, 2019

Fixed in release v1.0.1

@itsozz itsozz closed this as completed May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant