There is a subtle bug in GDAL's HFA driver, which can cause HFA's binFunctionType field to have the wrong value after calculating statistics on the file, if the SetLinearBinning function is used when writing the histogram.
This bug only shows up when the file is then opened using ERDAS Imagine. GDAL pays no attention to this value, so all programs which read it using GDAL are unaffected.
The value of binFunctionType is wrong for files whose datatype is larger than 8-bit. When displaying the file using Imagine, it is unable to work out how to stretch the file, and it displays very badly. The raster data itself is not affected.
This pull request disables the use of SetLinearBinning for HFA files. It should remain in force until a fix for GDAL's HFA driver has been accepted and widely distributed.
There was a previous mechanism for disabling this in RIOS versions up until 1.4.10, but this was removed in 1.4.11 (Feb 2021). Any 16/32 bit HFA files written using versions 1.4.11 to 1.4.14 are thus suspect.
There is a subtle bug in GDAL's HFA driver, which can cause HFA's
binFunctionType
field to have the wrong value after calculating statistics on the file, if theSetLinearBinning
function is used when writing the histogram.This bug only shows up when the file is then opened using ERDAS Imagine. GDAL pays no attention to this value, so all programs which read it using GDAL are unaffected.
The value of
binFunctionType
is wrong for files whose datatype is larger than 8-bit. When displaying the file using Imagine, it is unable to work out how to stretch the file, and it displays very badly. The raster data itself is not affected.This pull request disables the use of
SetLinearBinning
for HFA files. It should remain in force until a fix for GDAL's HFA driver has been accepted and widely distributed.There was a previous mechanism for disabling this in RIOS versions up until 1.4.10, but this was removed in 1.4.11 (Feb 2021). Any 16/32 bit HFA files written using versions 1.4.11 to 1.4.14 are thus suspect.
Ping @gillins.