HFA driver: re-writing statistics with 8-bit base data value
|Reported by:||nflood||Owned by:||warmerdam|
Description (last modified by )
When re-writing statistics in an existing HFA file, i.e. it already has some statistics, but they needed to be re-calculated (e.g. after raster editing in Imagine), the only case dealt with in hfafield.cpp was when the basedata value was a float64. However, Imagine can also write this as an 8-bit value, and when GDAL tries to re-write it, it doesn't have a case for that, and results in an error message, and the value is not re-written. The attached patch adds a case for the basedata field being 8-bit, and handles it otherwise the same way.
The patch is against the current 1.10.0 release. It was originally done against 1.9.0, and has been in use for over a year without further problems.
Also added a patch against the current trunk (.trunk.patch), as at 2013-07-31 (revision 25971), which appears to be the same. This trunk version has not been operationally tested, although I would not anticipate any problem.