[gdal-dev] HDF5 product handling

Alex Mantaut alexmantaut at suremptec.com.ar
Mon Jul 4 09:16:25 EDT 2011


Hi Frank,
     In that case all the handling for the CSK product should go on the
Open() method from hdf5imagedataset? Is there any way to avoid polluting the
hdf5imagedataset with all the subproduct's constants? Shall I define Product
specific private methods as: getCSKGeotransform() to get the information?
regards

2011/7/4 Frank Warmerdam <warmerdam at pobox.com>

> On Mon, Jul 4, 2011 at 8:52 AM, Alex Mantaut
> <alexmantaut at suremptec.com.ar> wrote:
> >         I would like to ask what would be the best way to implement a
> driver
> > that handles HDF5 subproducts, in a way that it doesn't interfere with
> the
> > behavior for hdf5 for files that ain't from any specific product type,
> and
> > allows to add new product types easly... (It's quite likely I will have
> to
> > add a new hdf5 product type soon)
> >
> >        Because hdf5 products are just hdf5 files with a special order in
> the
> > metadata, I think that the code to interpret them should go in the
> > hdf5dataset (or hdf5imagedataset) to reuse the code that opens the
> files...
> > Is this okay?
> >
> >        If the code for subproducts should go on the hdf5dataset (or
> > hdf5imagedataset)  I have a doubt about design...
>
> Alex,
>
> We have a similar issue in the HDF4 driver.  The approach there has
> roughly been to have one or some data items in the HDF4Dataset
> class (or perhaps HDF4ImageDataset) which enumerates what the
> product is, with a generic option for anything which isn't special
> product.
>
> The Open() method has special logic to identify products, and
> harvest extra metadata depending on the product type.  Rather
> than create subdriver's I'd suggest such using this approach,
> and perhaps having one 'metadata harvest" method on the
> driver for each subproduct.  In many cases that is sufficient.
>
> I look forward to seeing your patches!
>
> 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
>



-- 
--
     Alex Mantaut
SUR Emprendimientos Tecnológicos

Perú 345  Piso 5to Oficina "B" (C1067AAG)
Ciudad de Buenos Aires, Argentina
Tel. +54 (11) 4342-2976/84
alexmantaut at suremptec.com.ar
www.suremptec.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110704/18765002/attachment-0001.html


More information about the gdal-dev mailing list