[Gdal-dev] Accessing Raster Attributes
Frank Warmerdam
warmerdam at pobox.com
Wed Mar 12 11:56:15 EST 2003
Oliver Wesp wrote:
> Dear List,
>
> what we like to do, is accessing the class_names attribute form ERDAS
> img-Files (hfa). We thought **GDALGetRasterCategoryNames(
> GDALRasterBandH hBand ) should to the trick, but it points to
> GetCategoryNames() and this function returns null. Maybe we're on the
> wrong track anyway but this looks like it's not implemented.
>
> We would not hesitate to develop this by ourselfs but maybe this has
> done before or someone can point us to the right direction.
Oliver,
This hasn't been done yet, but would be a worthwhile improvement. If you
want to implement this, you would need to override the default implementation
of the GetCategoryNames() method on the HFARasterBand class in gdal/frmts/hfa.
You can use the low level HFA API to get the category names from the Erdas
file though I don't know the structure off hand. You can use the "hfatest"
application in gdal/frmts/hfa to dump the file structure to try and pick out
the location of the category names.
If this gets to messy for you, email me a small .img file with category names
and I will look into implementing it.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list