The HDF_SD_FILEINFO procedure retrieves the number of datasets and global attributes in an HDF file.
Examples
SDinterface_id = HDF_SD_START('demo.hdf', /CREATE)
HDF_SD_ATTRSET,SDinterface_id, 'TITLE', 'MYTITLE'
HDF_SD_ATTRSET,SDinterface_id, 'TITLE2', 'MYTITLE2'
SDdataset_id = HDF_SD_CREATE(SDinterface_id, 'var1', [10,3])
HDF_SD_FILEINFO, SDinterface_id, datasets, attributes
HELP, datasets, attributes
HDF_SD_ENDACCESS, SDdataset_id
HDF_SD_END, SDinterface_id
IDL Output
DATASETS LONG = 1
ATTRIBUTES LONG = 2
Syntax
HDF_SD_FILEINFO, SDinterface_id, Datasets, Attributes
Arguments
SDinterface_id
An SD interface ID as returned by HDF_SD_START.
Datasets
A named variable in which the total number of SD-type objects (i.e., the number of datasets + the number of dimensions) in the file is returned.
Attributes
A named variable in which the number of global attributes in the file is returned.
Keywords
None
Version History
See Also
HDF_SD_ATTRFIND, HDF_SD_ATTRINFO, HDF_SD_START