Opened 5 years ago

Closed 4 years ago

Last modified 4 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
Cc:

Description

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 5 years ago.
continuous/athematic example from Imagine
onepixelthematic.img (8.5 KB) - added by thjc 5 years ago.
thematic example from Imagine
0001-Improve-ERDAS-compatibility-for-hfa-output.patch (3.4 KB) - added by thjc 5 years ago.
Candidate patchset v1

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by thjc

Attachment: onepixelcontinuous.img added

continuous/athematic example from Imagine

Changed 5 years ago by thjc

Attachment: onepixelthematic.img added

thematic example from Imagine

Changed 5 years ago by thjc

Candidate patchset v1

comment:1 Changed 5 years ago by thjc

Possible solution patch attached

comment:2 Changed 5 years ago by Robert Coup

Status: newassigned

See also #4903

comment:3 Changed 4 years ago by warmerdam

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 Changed 4 years ago by warmerdam

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