<div>Then, to keep consistency, the fact that hdf5imagedataset isn't consistent with the hdf5dataset is a defect, right?</div>
<div>May I summarize the conclusions and update the ticket?</div>
<div> </div>
<div>thanks for your patience Antonio<br></div>
<div class="gmail_quote">2011/6/16 Antonio Valentino <span dir="ltr"><<a href="mailto:antonio.valentino@tiscali.it">antonio.valentino@tiscali.it</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Alex,<br><br>Il giorno Thu, 16 Jun 2011 11:51:48 -0300<br>
<div class="im">Alex Mantaut <<a href="mailto:alexmantaut@suremptec.com.ar">alexmantaut@suremptec.com.ar</a>> ha scritto:<br><br></div>
<div class="im">> Antonio,<br>> Ok, I understand the asociation between the raster band<br>> and the metadata, but if you have to explicitally ask for the raster<br>> band in order to get the metadata there is an inconsistency between<br>
> the interface to get metadata from hdf5dataset and<br>> hdf5imagedataset... In hdf5dataset GetMetadata() returns the metadata<br>> asociated to the all the subdatasets without need to explicitally ask<br>> for the raster band, but in hdf5imagedataset you have to explicitally<br>
> ask for the raster band in order to get the metadata...<br>> IMHO the interface should be the same in both cases, in<br>> that case hdf5imagedataset should retrieve the metadata asociated to<br>> the subdataset directly via GetMetadata()...<br>
<br><br></div>Umh, I don't know. I've always considered HDF5Dataset and<br>HDF5ImageDataset as quite different things: the index and the chapters.<br><br>But I have to admit that yours is a good point.<br>
<div>
<div></div>
<div class="h5"><br><br>> 2011/6/16 Antonio Valentino <<a href="mailto:antonio.valentino@tiscali.it">antonio.valentino@tiscali.it</a>><br>><br>> > Hi Alex,<br>> ><br>> > Il giorno Thu, 16 Jun 2011 10:05:42 -0300<br>
> > Alex Mantaut <<a href="mailto:alexmantaut@suremptec.com.ar">alexmantaut@suremptec.com.ar</a>> ha scritto:<br>> ><br>> > > Hi Antonio,<br>> > ><br>> > > For what I discussed with Frank it seemed that the expected<br>
> > > behavior was to get the only the data asociated to that<br>> > > subdataset (plus some aditional data from root and the other<br>> > > groups) I wasn't sure untill you confirmated...<br>
> > ><br>> > > Well, right now when I open a specific subdataset it gets only the<br>> > > raster band asociated to that dataset, but when I try to open the<br>> > > metadata (with GetMetadata() or GetMetadataItem()) from that<br>
> > > subdataset it opens the metadata from all the groups (as expected)<br>> > > but it doesn't get the metadata asociated to that subdataset...<br>> > > Did I do something incorrectly when opening the metadata from the<br>
> > > subdataset?<br>> > ><br>> > > The line suggested in the ticket:<br>> > > ReadGlobalAttributes( TRUE );<br>> > ><br>> > > Was a way to get around the problem, but now that I'm sure that<br>
> > > hdf5imagedataset doesn't need to read all the metadata, it's not a<br>> > > suitable solution to the defect...<br>> > ><br>> > > Right now I found another way to get the metadata from the<br>
> > > subdataset, by getting the rasterband first, and then asking for<br>> > > the metadata asociated to that raster band ( it seems a overly<br>> > > convoluted to get the metadata asociated to that subdataset...)<br>
> > > I'm guessing that the expected behavior is to get the information<br>> > > directly through GetMetadata() directly...<br>> > ><br>> > > regards<br>> > ><br>> ><br>
> > Well, IMHO it is not convoluted. Associating "HDF5 dataset" metadata<br>> > tho the GDAL raster band just reflects the original HDF5 structure.<br>> ><br>> > Even if HDF5 and GDAL data model are quite different we can assume,<br>
> > IMHO, the following correspondence:<br>> ><br>> > HDF5 file --> GDAL dataset (HDF5Dataset class)<br>> > HDF5 Group --> None (metadata are associated to GDAL dataset)<br>> > HDF5 Dataset --> GDAL Raster Band<br>
> ><br>> > HDF5 file can contain several datasets (with arbitrary shape) so the<br>> > GDAL subdataset mechanism is used to tell to the HDF5ImageDataset<br>> > class which is the "HDF5 dataset" the have to be mapped onto the<br>
> > GDAL raster band.<br>> ><br>> > I hope this is not too much confusing, with my poor english I'm not<br>> > able to explain it better :).<br>> ><br>> ><br>> > regards<br>> ><br>
> > ><br>> > > 2011/6/15 Antonio Valentino <<a href="mailto:antonio.valentino@tiscali.it">antonio.valentino@tiscali.it</a>><br>> > ><br>> > > > Hi Frank, hi Alex,<br>> > > ><br>
> > > > Il 15/06/2011 22:34, Frank Warmerdam ha scritto:<br>> > > > > On 11-06-15 03:50 PM, Alex Mantaut wrote:<br>> > > > >> Hi Frank:<br>> > > > >> Thanks for the swift reply.<br>
> > > > >> Right now it opens the metadata asociated to<br>> > > > >> the root, and also<br>> > > > >> the metadata asociated with all the other groups, but it<br>
> > > > >> doesn't open<br>> > > > the<br>> > > > >> metadata asociated to the specified element (bug?)<br>> > > > ><br>> > > > > Alex,<br>
> > > > ><br>> > > > > It sounds like a defect to me, yes.<br>> > > > ><br>> > > > > I would suggest filing a ticket that carefully documents the<br>> > > > > problem with a supporting example file.<br>
> > > > ><br>> > > > > Best regards,<br>> > > ><br>> > > > The current behavior looks fine to me.<br>> > > ><br>> > > > If one opens a specific subdataset then only one "HDF5 dataset<br>
> > > > object" can be accessed and it is mapped on GDAL raster bans n.<br>> > > > 1. All other "HDF5 dataset object" in the h5 file are ignored<br>> > > > by the HDF5ImageDataset so there is no reason IMHO to make<br>
> > > > their metadata available in some manner.<br>> > > ><br>> > > > Metadata associated to all HDF5 groups (including the root one)<br>> > > > are available in any case and accessible via GDAL dataset<br>
> > > > metadata.<br>> > > ><br>> > > > my two cents<br><br><br>--<br>Antonio Valentino<br></div></div>
<div>
<div></div>
<div class="h5">_______________________________________________<br>gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>--<br> Alex Mantaut<br>SUR Emprendimientos Tecnológicos<br><br>Perú 345 Piso 5to Oficina "B" (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>