-
Notifications
You must be signed in to change notification settings - Fork 78
Using the emod2018 dataset, opentopodata.org's API returns invalid JSON #13
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
Comments
Thanks for raising this! Python supports I would like to remove The main issue is that I currently use There's a few options I can think of
I'll give it some thought and see what clients other APIs are doing around |
Hey, thanks for your quick reply :-) I personally would be totally fine with returning I first thought about checking the server's response for So if you ask me how to address this:
I hope I could help you a bit. |
Sets default from NaN to null to address issue #13
Thanks for your patience and thoughtful feedback! This should now be fixed on master and on api.opentopodata.com by 3620454: Having invalid json that breaks clients by default is a bug so I agree that But there is a semantic difference between NODATA and out of bounds, and other tools like rasterio and gdal have different behaviour for NODATA and querying outside bounds. So anyone relying on the old behaviour can set Going forward, if people want to handle NODATA differently they should instead use a numerical value for the |
Nice! I think this is a solution everybody can live with :-) You could e. g. set |
Hi :-)
Whilst working on a geotagging program using opentopodata.org's API, I noticed some error when parsing the server's answer to a
QJsonDocument
. It yieldedQJsonParseError::IllegalNumber
. After having had a closer look, this happened when using theemod2018
dataset.Example: Requesting
https://api.opentopodata.org/v1/emod2018?locations=50,11
returnsThe
elevation
key's value isNaN
(instead ofnull
, as the other datasets return when a coordinate is out of bounds). This is, per RFC 4627, not permitted (cf. https://tools.ietf.org/html/rfc4627#section-2.4):Most probably, this is what
QJsonDocument::fromJson
complains about.Anyway, thanks about this great piece of software and the great service you provide :-)
The text was updated successfully, but these errors were encountered: