[gdal-dev] which formats support subdatasets?

Ivan Lucena ivan.lucena at princeton-ma.us
Fri Jan 11 07:18:24 PST 2013


Hi Etienne,

It sounds like a good idea to add that information to the GDALDriver metata. I can see how one could take advantage of that feature when writing a generic solution to deal with all SUBDATASETS drivers at once.

But I am wondering if I should add that to the GeoRaster driver. This driver only reports SUBDATASETS if the result of the query is not an unique SDO_GEORASTER object.

So for example, if you use an WHERE clause that result in several objects, each object is reported as a SUBDATASET. That is how the QGIS Oracle Raster extension can browse into tables and columns to list existing images. See http://gdal.org/frmt_georaster.html "Browsing the database for GeoRasters".

In that case the SUBDATASET is not a property of the driver, but the GDALDataset. I believe that others SUBDATSET supporters driver also do some similar, or maybe is gdalinfo who does that. If there is just one SUBDATASET the report shows one Dataset, with Rows and Columns other than 512x512 and the info from the "first and only" SUBDATASET.

Anyway, I always thought that the SUBDATASET were kind of a abstraction leak into the GDAL data model. They showed up later in the game and what we have is just an adaptation to make it work. It might be something to re-think for GDAL 2.0. IMHO.

Regards,

Ivan







-------Original Message-------
  From: Etienne Tourigny
  To: Even Rouault
  Cc: gdal-dev
  Subject: Re: [gdal-dev] which formats support subdatasets?
  Sent: Jan 11 '13 08:23

  On Fri, Jan 11, 2013 at 11:03 AM, Even Rouault
  <[LINK: compose.php?to=even.rouault at mines-paris.org]
even.rouault at mines-paris.org> wrote:
  > Selon Etienne Tourigny <[LINK: compose.php?to=etourigny.dev at gmail.com]
etourigny.dev at gmail.com>:
  >
  >> Hi,
  >>
  >> I'd just like to point out a patch I have submitted to report which
  >> raster drivers support subdatasets, using the DMD_SUBDATASETS metadata
  >> item.
  >> I have also modified gdalinfo and format docs.
  >>
  >> [LINK: http://trac.osgeo.org/gdal/ticket/4902]
http://trac.osgeo.org/gdal/ticket/4902
  >>
  >> For example:
  >>
  >> $ gdalinfo --format hdf4
  >> Format Details:
  >>   Short Name: HDF4
  >>   Long Name: Hierarchical Data Format Release 4
  >>   Extension: hdf
  >>   Help Topic: frmt_hdf4.html
  >>   Supports: Subdatasets
  >>
  >
  > I've looked at the patch and it seems good. I'm not sure I would have
added a
  > new column in the table, but if you think it is usefull, keep it. It
would
  > perhaps be good to mention in gdal_datamodel.dox, in the SUBDATASETS
section,
  > that drivers that support them advertize the DMD_SUBDATASETS
capability. And I
  > think that swig/include/gdalconst.i should also be edited to add the
new
  > constant. After that please commit.

  I though adding the info to frmt_various.html was the most
  appropriate, but it is a bit intrusive. Should it be elsewhere, like
  the individual driver docs or in gdal_datamodel?

  I also though about adding an "s" key to the output of "--formats"
  format support string e.g. (rw+vs)

  I'll make the other changes you suggest.

  >
  > I'm not sure it is appropriate to backport in 1.9 however (new feature,
output
  > of gdalinfo --format modified). 1.10 should be out soon hopefully.

  I also don't think it's appropriate adding this to 1.9

  >
  >>
  >> Regards,
  >> Etienne
  >>
  >> On Tue, Nov 20, 2012 at 10:43 AM, Etienne Tourigny
  >> <[LINK: compose.php?to=etourigny.dev at gmail.com]
etourigny.dev at gmail.com> wrote:
  >> > Hi
  >> >
  >> > I'd like to be able to identify which raster and vector formats
  >> > support subdatasets (or multipl layers).
  >> >
  >> > A quick grep search (grep SUBDATASETS frmts/*/*.cpp) showed which
GDAL
  >> > drivers can report subdatasets.
  >> > Am I missing something?
  >> >
  >> > I think it would be nice to include this info in the driver summary
  >> > page - should I just edit the html or is there some other file to
  >> > edit?
  >> >
  >> > I was wondering how to find that out for OGR drivers - or do all
  >> > drivers support multiple layers in one datasource?
  >> >
  >> >
  >> > Regards,
  >> > Etienne
  >> _______________________________________________
  >> gdal-dev mailing list
  >> [LINK: compose.php?to=gdal-dev at lists.osgeo.org]
gdal-dev at lists.osgeo.org
  >> [LINK: http://lists.osgeo.org/mailman/listinfo/gdal-dev]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
  >>
  >
  >
  >
  >
  >
  >
  >
  >
  >
  >
  >
  >
  >
  >
  >
  >
  >
  >
  _______________________________________________
  gdal-dev mailing list
  [LINK: compose.php?to=gdal-dev at lists.osgeo.org] gdal-dev at lists.osgeo.org
  [LINK: http://lists.osgeo.org/mailman/listinfo/gdal-dev]
http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list