Opened 15 years ago

Last modified 15 years ago

#857 closed enhancement (fixed)

Add ability to get and set HFA layer names

Reported by: sam.gillingham@… Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: minor Keywords:
Cc:

Description

The HFA format allows a name to be associated with each layer. Currently, layers
are created with a fixed name ie 'Layer_1' and this cannot be changed or
retrieved. Files created by ERDAS Imagine often have useful information stored
in the layer name. 
I have a patch which I will attach to this that allows the use of
GDALGetDescription/GDALSetDescription mechanism to get and set the layer name
for a band.

Attachments (2)

hfalayernamepatch.zip (3.2 KB) - added by sam.gillingham@… 15 years ago.
Patch to get and set layer name
hfalayername-1.3.0.zip (2.9 KB) - added by sam.gillingham@… 15 years ago.
Updated against 1.3.0

Download all attachments as: .zip

Change History (6)

Changed 15 years ago by sam.gillingham@…

Attachment: hfalayernamepatch.zip added

Patch to get and set layer name

comment:1 Changed 15 years ago by warmerdam

Sam,

The patch looks good, but I may not get to applying it for some time.  I would
add there has been sigificant work on the HFA code since 1.2.6 so I anticipate
some integration problems with the patches. 

Any particular reason for the COMPRESS/COMPRESSED change? 

comment:2 Changed 15 years ago by sam.gillingham@…

Hi Frank,

That's not a problem. How about I resubmit the patch against 1.2.7 when it comes
out? 

Good to hear there is some work happening on HFA - is this the attribute stuff?

Sorry I should have clarified the COMPRESS/COMPRESSED change. In
GDALRegister_HFA() in hfadataset.cpp the option is set as 'COMPRESSED' in the
GDAL_DMD_CREATIONOPTIONLIST, but everywhere else including the code that checks
for it 'COMPRESS' is used. This change would make them all consistent.

Thanks,

Sam.

comment:3 Changed 15 years ago by warmerdam

Sam,

I noticed that COMPRESS was indeed more consistent when I looked around a bit
too. 

Re-submitting it again 1.2.7 (or CVS head) at some point might be best.

To be honest, I haven't yet addressed the value attribute table support.  Now
it seems that will be put off till late June or July.  I am woefully behind
on some of my committments. 

The work was related to more regularized access to histograms, and support
for building overviews in .img files (and in the .ige spill files) in an 
imagine compatible manner.  


Changed 15 years ago by sam.gillingham@…

Attachment: hfalayername-1.3.0.zip added

Updated against 1.3.0

comment:4 Changed 15 years ago by warmerdam

Patch applied.

A bit of extra work was done in HFADelete() since the first layer is no longer
always Layer_1.  A test was also added to gdalautotest/gcore/hfa_write.py 
to test the capability.

Thanks for a well prepared patch!

Note: See TracTickets for help on using tickets.