----- Original Message ----- From: kohain
To: [email protected]
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
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to