You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.
geotiff does not use the specified nodata value when writing to a tif file, whether it's the default -9999 or a custom one. It sets the nodata value for the file with ArchGDAL.setnodatavalue! correctly, but does not use it in the grid itself and uses NaN instead.
Because of this, it is always necessary to call replace(geotiff(SimpleSDMPredictor, file), NaN => nothing) when re-reading a layer after writing it, which in my sense could be avoided.
l =SimpleSDMPredictor(WorldClim, BioClim, 1)
# With -9999 as nodata
f1 =tempname()
geotiff(f1, l) # use -9999 as nodata by default
mp1 =geotiff(SimpleSDMResponse, f1)
length(mp1) ==length(l) # false, but should be true
mp1 == l # false, same thingreplace(mp1, NaN=>nothing) == l1 # true, but could be avoided# With custom nodata
f2 =tempname()
geotiff(f2, l; nodata=-3.4f38) # this is the nodata from the WorldClim files
mp2 =geotiff(SimpleSDMPredictor, f2)
length(mp2) ==length(l) # false
mp2 == l # falsereplace(mp2, NaN=>nothing) == l1 # true
The text was updated successfully, but these errors were encountered:
geotiff
does not use the specifiednodata
value when writing to a tif file, whether it's the default-9999
or a custom one. It sets the nodata value for the file withArchGDAL.setnodatavalue!
correctly, but does not use it in the grid itself and usesNaN
instead.Because of this, it is always necessary to call
replace(geotiff(SimpleSDMPredictor, file), NaN => nothing)
when re-reading a layer after writing it, which in my sense could be avoided.The text was updated successfully, but these errors were encountered: