[Gdal-dev] accessing Class_Names from an img file in GDAL

Stephane Routelous route at cae.com
Mon Feb 28 09:26:51 EST 2005


Hi,

I would like to have access to the Class_Names values from an img file (hfa)
I compiled the hfatest programm from frmts\hfa directory, and dumping the
tree gives me :

root(root) @ 82 + 0 @ 0
  Layer_1(Eimg_Layer) @ 210 + 20 @ 338
  + width = 11133
  + height = 5916
  + layerType = thematic
  + pixelType = u8
  + blockWidth = 64
  + blockHeight = 64
    Descriptor_Table(Edsc_Table) @ 838 + 4 @ 966
    + numrows = 256
      Class_Names(Edsc_Column) @ 1963 + 14 @ 2091
      + numRows = 256
      + columnDataPtr = 66517758
      + dataType = string
      + maxNumChars = 32
        Column_Attributes(Eded_ColumnAttributes_1) @ 2105 + 80 @ 2233
        + position = 0
        + name = `Class_Names'
        + editable = EMSC_TRUE
        + alignment = LEFT
        + format = (no values)
        + formulamode = DEFAULT
        + formula = (no values)
        + columnwidth = 11.000000
        + units = (no values)
        + colorflag = NO_COLOR
        + greenname = (no values)
        + bluename = (no values)

Can I have this information in GDAL  ?
Can I access this information at the HFAHandle level ?
As the dump of the tree does not output the strings, it seems those class
names are not read.
How can I read them ?

I checked the HFA API, but I'm confused and lost.

Thanks in advance for any help.

Stephane





More information about the Gdal-dev mailing list