[gdal-dev] hdf5image metadata problems

Frank Warmerdam warmerdam at pobox.com
Wed Jun 15 15:28:06 EDT 2011


On 11-06-15 03:19 PM, Alex Mantaut wrote:
> Hi all,
>          I'm trying to open the metadata from a subdataset of an HDF5 file...
>          When I open the file by it's filename and then ask for the metadata it
> returns the metadata asociated to the root and all the subdatasets.... But when
> I open the file by specifying the subdataset name to GDALOpen() and then ask
> for the metadata it returns the metadata asociated to all groups but none of
> the subdatasets...
>          I looked a bit into the hdf5dataset code and realized that
> this difference emerges from the fact that when GDAL opens the file specifying
> only the filename it uses hdf5dataset to open the file, but when I specify the
> subdataset to GDALOpen() it uses hdf5imagedataset instead, and it loads the
> metadata in a different way.
>          I'm not sure of what the expected behavior is on hdf5image for loading
> metadata... It should load all the metadata of the file? Just the metadata
> asociated to the subdataset? Or should the application ask for the subdataset
> in some other way and then ask for the metadata?

Alex,

I'm not sure of the details of the metadata handling, but to the extent
possible I think opening a subdataset should return metadata specific to
that subdataset and any "root" metadata that applies to everything in the
.hdf file.

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