Ticket #1660 (closed enhancement: duplicate)
add support for scale and offset in netCDF driver.
|Reported by:||hulst||Owned by:||dnadeau|
|Severity:||normal||Keywords:||netcdf, scale offset, add_offset, scale_factor|
I've modified the netcdf driver so that it supports scale and offset attributes.
One can argue from the description above that the netcdf driver is not responsible for applying offset and scale, but the calling application. I find the driver a convenient location.
Attached you find the updated driver. For now I can think of one situation where the driver gives problems:
--- In order to apply scale and offset the data is read in the native netCDF type (f.i. UInt16), but stored as a float in memory. I maintain the original _FillValue of the originating dataset (e.g., -32768). When the dataset contains this value after the application of scale and offset the data is wrongfully accused of being garbage. A small chance, but still. ---