Opened 11 years ago

Last modified 11 years ago

#5175 closed defect

HFA driver: re-writing statistics with 8-bit base data value — at Version 2

Reported by: nflood Owned by: warmerdam
Priority: normal Milestone: 1.10.1
Component: GDAL_Raster Version: 1.10.0
Severity: normal Keywords: hfa
Cc:

Description (last modified by nflood)

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.

Change History (4)

comment:1 by nflood, 11 years ago

Description: modified (diff)

comment:2 by nflood, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.