Closed guillemc23 closed 7 months ago
Ah yes, this could be explained better in the documentation.
When querying a location outside the bounds of any dataset file, null
is always returned. The ASTER dataset doesn't include a file that covers the location (0,0)
, resulting in a null
result.
The nodata_value
is only used when querying a point that is covered by a .tif
file in the dataset, but the value at that location is NODATA
. Because Aster uses a value of 0 for points covering the ocean, there are no NODATA
pixels in the ASTER dataset, so the nodata_value
setting will have no impact on this data source.
So this setting is only for datasets that have NODATA
(aka blank) pixels in their files, commonly to designate water or the edge of the dataset bounds.
Does that make sense??
Okay, yes, it makes sense. The ASTER dataset contains zeroes for values near the coast and null for points further away. It's nice to know to be able to handle it properly 😄
Thank you @ajnisbet!
I am trying to set up a
nodata_value
, which according to the docs should be used like this: https://api.opentopodata.org/v1/aster30m?locations=0,0&nodata_value=-9999I'm using a dataset that does not have bathymetry data, so testing at 0,0 should return no data since it's in the middle of the Atlantic ocean. The result presents
null
in the elevation, but it should be replaced by thenodata_value
: