[Gdal-dev] How to find the count of subdatasets of a HDF file?
even.rouault at mines-paris.org
Wed Aug 5 14:40:16 EDT 2009
----- Original Message -----
To: gdal-dev at lists.osgeo.org
Sent: Wednesday, August 05, 2009 10:27 AM
Subject: [Gdal-dev] How to find the count of subdatasets of a HDF file?
>> How to find the count of subdatasets of a HDF file?
CSLCount(GDALGetMetadata(hDS, "SUBDATASETS")) / 2
The division by 2 is dueto each subdataset having 2 metadata items :
SUBDATASET_xxx_NAME and SUBDATASET_xxx_DESC
See http://gdal.org/gdal_datamodel.html at "SUBDATASETS Domain" section
>> and how to ascertain band counts of each subdataset?
GDALOpen() each SUBDATASET_xxx_NAME and call GDALGetRasterCount() on the
result dataset handle.
gdal-dev mailing list
gdal-dev at lists.osgeo.org
More information about the gdal-dev