[gdal-dev] Specify data type on opening a netcdf
Federico Gianoli
alpacagis at gmail.com
Fri Jul 31 06:04:45 PDT 2020
Dear all,
I have an issue opening a netcdf with gdal. I should declare the data type
of my raster in gdal.Open().
The Netcdf data type is declared in the metadata as "Float", but GDAL reads
this information as Float64 and not as Float32. This reading error
misinterprets my decimal values causing rounding errors.
float 32 to float64 (wrong):
[0.9160000518, 0.920000052] > 0.92 --> [False, True] WRONG
flaot32 to float32 (correct):
[0.916, 0.92] > 0.92 --> [False, False] CORRECT
Is there a way to specify the input data type?
I'm not able to find a solution to this.
Regards
Federico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200731/148166c3/attachment.html>
More information about the gdal-dev
mailing list