<div>Hi all, </div>
<div>        I&#39;m trying to open the metadata from a subdataset of an HDF5 file... </div>
<div> </div>
<div>        When I open the file by it&#39;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 <font size="2">GDALOpen() and then ask for the metadata it returns the metadata asociated to all groups but none of the subdatasets... </font></div>

<div> </div>
<div>        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. </div>

<div>        I&#39;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?</div>

<div> </div>
<div>       gdalinfo is returning the metadata asociated to the subdataset in both cases, but it shows the data in the bands section... So I looked in to the code of gdalinfo and it gets the information for the subdataset like this:</div>

<div> </div>
<div><font size="2">
<p align="left">GDALRasterBandH hBand;</p>
<p align="left">hBand = GDALGetRasterBand( </p></font><font color="#7f0055" size="2"><font color="#7f0055" size="2">poDataset</font></font><font size="2">, 1);
<p></p></font><font color="#7f0055" size="2"><font color="#7f0055" size="2">char</font></font><font size="2"> **allMetadata = GDALGetMetadata( hBand, NULL );</font></div>
<div>Must I use that in order to get the metadata?</div>
<div> </div>
<div>Thanks in advance       </div>
<div> </div>
<div>-- <br>--<br>     Alex Mantaut<br>SUR Emprendimientos Tecnológicos<br><br>Perú 345  Piso 5to Oficina &quot;B&quot; (C1067AAG)<br>Ciudad de Buenos Aires, Argentina<br>Tel. +54 (11) 4342-2976/84<br><a href="mailto:alexmantaut@suremptec.com.ar" target="_blank">alexmantaut@suremptec.com.ar</a><br>
<a href="http://www.suremptec.com/" target="_blank">www.suremptec.com</a><br></div>