Opened 10 years ago

Closed 10 years ago

#5359 closed defect (fixed)

HFA driver: Histogram column uses GFU_PixelCount on writing, but not on reading

Reported by: nflood Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

When creating a column in a raster attribute table with the HFA driver, setting eFieldUsage=GFU_PixelCount will force the column to be called "Histogram", which is consistent with Imagine's conventions (HFA has no explicit column usage mechanism, just reserved column names). However, when reading the Histogram column, the usage in the GDALRasterAttributeTable is set to GFU_Generic. I believe this should set it to GFU_PixelCount, in order that one can generically find this column by using GetColOfUsage().

In the current trunk, in hfadataset.cpp, compare line 561 (for reading) with line 1605 (for writing).

Attached is a patch against the current trunk (2014-01-20), which fixes line 561. Also attached is a patch against the 1.10.1 release (line numbers are wildly different), in case anyone needs it.

Attachments (2)

hfadataset.cpp.1.10.1.histogramusage.patch (456 bytes ) - added by nflood 10 years ago.
patch against 1.10.1 release
hfadataset.cpp.trunk20410120.histogramusage.patch (485 bytes ) - added by nflood 10 years ago.
patch against trunk 2014-01-20

Download all attachments as: .zip

Change History (4)

by nflood, 10 years ago

patch against 1.10.1 release

by nflood, 10 years ago

patch against trunk 2014-01-20

comment:1 by nflood, 10 years ago

Sorry about the two tickets. Our departmental firewall got in the way of the first one, while attaching files. Please ignore previous ticket #5358, it is the same thing.

comment:2 by Even Rouault, 10 years ago

Resolution: fixed
Status: newclosed

trunk r26871 "HFA: report histogram column as GFU_PixelCount instead of GFU_Generic (#5359, patch by nflood)"

Note: See TracTickets for help on using tickets.