Opened 11 years ago

Closed 11 years ago

#5175 closed defect (fixed)

HFA driver: re-writing statistics with 8-bit base data value

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

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.

Attachments (2)

hfafield.cpp.u8basedatafield.patch (598 bytes ) - added by nflood 11 years ago.
hfafield.cpp.u8basedatafield.trunk.patch (578 bytes ) - added by nflood 11 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by nflood, 11 years ago

Description: modified (diff)

comment:2 by nflood, 11 years ago

Description: modified (diff)

comment:3 by Even Rouault, 11 years ago

Component: defaultGDAL_Raster
Keywords: hfa added
Milestone: 1.10.1
Resolution: fixed
Status: newclosed

Committed in trunk (r26253) and branches/1.10 (r26254)

Note: See TracTickets for help on using tickets.