[gdal-dev] hdf5 and metadata

Andreas Wiesmann wiesmann at gamma-rs.ch
Thu Apr 17 09:08:33 EDT 2008


Hi,
on http://www.gdal.org/frmt_hdf5.html it says that no Metadata are read
at this time from the HDF5 files. 

However, when I run gdalinfo on the dataset or a subdataset I get some
corresponding meta information (see below). But using the API I found no
way to get the metadata from the root, the h5group "/". 
However, I can read this metadata with h5dump (see below). Is there a
way to access this meta information through gdal or do I have to dig
into the hdf5 API?

h5dump:
HDF5 "test.h5" {
GROUP "/" {
   ATTRIBUTE "a1" {
      DATATYPE  H5T_STD_I16LE
      DATASPACE  SCALAR
      DATA {
      (0): 0
      }
   }
 etc...
   }
   GROUP "SUBDIR" {
      ATTRIBUTE "AAPG" {
         DATATYPE  H5T_IEEE_F64LE
         DATASPACE  SIMPLE { ( 81 ) / ( 81 ) } 
         etc...

gdalinfo:
Driver: HDF5/Hierarchical Data Format Release 5
Size is 512, 512
Coordinate System is `'
Metadata:
  etc...
  SUBDIR:AAPG=-29.91
  etc...


Thanks for any hints.
Andreas







More information about the gdal-dev mailing list