Opened 11 years ago

Closed 11 years ago

#4902 closed enhancement (fixed)

[PATCH] add information on subdataset support to gdal driver metadata

Reported by: etourigny Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by etourigny)

The following patch implements the DMD_SUBDATASETS metadata item for any driver which supports subdatasets. This information is printed when gdalinfo --frmt <driver> is called.

Just submitting this for review - also would it make sense to apply to 1.9 ?

I have searched for drivers supporting subdatasets with the following command, and rapid inspection of each driver - it might not be 100% accurate.

I have also updated the docs to show that information on the formats list page.

example with hdf4:

$ gdalinfo --format hdf4
Format Details:
  Short Name: HDF4
  Long Name: Hierarchical Data Format Release 4
  Extension: hdf
  Help Topic: frmt_hdf4.html
  Supports: Subdatasets

Attachments (2)

patch-subdataset.txt (32.3 KB ) - added by etourigny 11 years ago.
patch-subdataset2.txt (15.6 KB ) - added by etourigny 11 years ago.
second patch with changes suggested be Even, removing changes to formats_list.html and adding output to --formats commandline option

Download all attachments as: .zip

Change History (7)

by etourigny, 11 years ago

Attachment: patch-subdataset.txt added

comment:1 by etourigny, 11 years ago

command used to search for subdataset support:

grep SUBDATASETS frmts/*/*.cpp

comment:2 by etourigny, 11 years ago

Description: modified (diff)

by etourigny, 11 years ago

Attachment: patch-subdataset2.txt added

second patch with changes suggested be Even, removing changes to formats_list.html and adding output to --formats commandline option

comment:3 by etourigny, 11 years ago

Attached a slightly modified patch, Even could you please review, I have made a few small changes to the docs and also the output of gdalinfo --formats

e.g.

$ gdalinfo --formats
Supported Formats:
  VRT (rw+v): Virtual Raster
  GTiff (rw+vs): GeoTIFF

comment:4 by Even Rouault, 11 years ago

2 remarks:

  • why do you mention "in read-only mode" regarding subdatasets ? While it is probably true for the majority of drivers, a few formats have support for update mode for subdatasets, for example NITF subdatasets (actually that's the only one I have in mind)
  • There's another place in swig/include/gdalconst.i where DMD_SUBDATASETS should be defined (there's a %ifdef depending on the SWIG language)

comment:5 by etourigny, 11 years ago

Resolution: fixed
Status: newclosed

ok, thanks. I wasn't able to test the bindings though.

Applied in r25494

Note: See TracTickets for help on using tickets.