Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5066 closed defect (fixed)

ERDAS Imagine does not recognise thematic hfa files as thematic

Reported by: thjc Owned by: Robert Coup
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.10.0
Severity: normal Keywords: HFA


If a thematic hfa file is exported from gdal, it shows up correctly as thematic in gdalinfo, but ERDAS Imagine (v9.1 was tested) detects this as athematic/continuous.

This appears to be related to the way statistics, in particular histogram/mapping data is reported.

If histogram is dumped as reals instead of ints, and the BinFunction is set to direct instead of linear then Imagine correctly see's a thematic data set.

Two sample files from Imagine are attached, 1x1 images, one is thematic and one is athematic.

Attachments (3)

onepixelcontinuous.img (8.5 KB ) - added by thjc 11 years ago.
continuous/athematic example from Imagine
onepixelthematic.img (8.5 KB ) - added by thjc 11 years ago.
thematic example from Imagine
0001-Improve-ERDAS-compatibility-for-hfa-output.patch (3.4 KB ) - added by thjc 11 years ago.
Candidate patchset v1

Download all attachments as: .zip

Change History (7)

by thjc, 11 years ago

Attachment: onepixelcontinuous.img added

continuous/athematic example from Imagine

by thjc, 11 years ago

Attachment: onepixelthematic.img added

thematic example from Imagine

by thjc, 11 years ago

Candidate patchset v1

comment:1 by thjc, 11 years ago

Possible solution patch attached

comment:2 by Robert Coup, 11 years ago

Status: newassigned

See also #4903

comment:3 by warmerdam, 11 years ago

Resolution: fixed
Status: assignedclosed

Patch applied in trunk (r26024).

The existing tests pass, but it would be nice to add something to confirm proper behavior here.

I'm somewhat hesitant to back port this to 1.10.x unless we can get feedback from some key users that everything still works right. Reopen if you would like to pursue that.

comment:4 by warmerdam, 11 years ago

Keywords: HFA added
Note: See TracTickets for help on using tickets.