Changes between Initial Version and Version 1 of Ticket #4121


Ignore:
Timestamp:
Jun 15, 2011, 2:21:39 PM (13 years ago)
Author:
alexmantaut
Comment:

Replying to alexmantaut:

When GDAL opens an HDF5 file by calling GDALOpen() specifying the dataset it doesn´t load the metadata asociated to that dataset.

If you open the file with the filename alone it shows all the metadata OK.

The diference between these 2 cases comes from the fact that when GDAL opens an HDF5 file from its filename it calls hdf5imagedataset but when you specify the subdataset it uses hdf5imagedataset.

I'm not 100% sure what the expected behavior is when opening a subdataset's metadata. But from what I discused with Frank Warmerdam I'm guessing that GetMetadata("") should return the metadata asociated to the subdataset and the root group.

Rigth now the solution I found is to change this line:

/branches/1.8/gdal/frmts/hdf5/hdf5imagedataset.cpp@22341#L441

to:

poDS->ReadGlobalAttributes( TRUE );

So hdf5imagedataset reads all the metadata... I'm not sure if this is desirable... Maybe it would be better to load the metadata asociated to the specific subdataset...

Steps

  1. Open the subdataset

poDataset = (GDALDataset *) GDALOpen("HDF5:filename_path://subdataset",GA_ReadOnly );

  1. Get All the metadata

char allMetadata = poDataset->GetMetadata("");

  1. Print all the metadata
  2. Verify that there is no metadata asociated to the particular subdataset opened.

Example file:

ftp://cosmodemo:cosmodemo@ftp.e-geos.it/ScanSAR Huge - Camden Bay/CSKS1_DGM_B_HR_00_HH_RA_SF_20080211191721_20080211191753.h5

(40 MB aprox) In this file use the MBI subdataset

More files:http://www.e-geos.it/products/demos.html (under COSMO-SKYMED demos)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4121 – Description

    initial v1  
    2828Example file:
    2929
    30 ftp://cosmodemo:cosmodemo@ftp.e-geos.it/ScanSAR Huge - Camden Bay/CSKS1_DGM_B_HR_00_HH_RA_SF_20080211191721_20080211191753.h5
     30ftp://cosmodemo:cosmodemo@ftp.e-geos.it/ScanSAR%20Huge%20-%20Camden%20Bay/CSKS1_DGM_B_HR_00_HH_RA_SF_20080211191721_20080211191753.h5
    3131
    3232(40 MB aprox)