IDL's HDF_SD_ routines can accept two different types of ID numbers. Documentation for these routines in the IDL Reference Guide refers to these ID numbers as the SDinterface_id and SDdataset_id arguments.
The SDinterface_id is the Scientific Dataset interface ID. There is only one SDinterface_id per HDF file. For each actual dataset used, you will also need an SDdataset_id, which is the ID for the particular dataset.
Some routines, such as HDF_SD_ATTRFIND, accept either an SDinterface_id or an SDdataset_id. In these cases, the documentation refers to the ID as an SD_id, meaning that either type of ID is accepted.
HDF and IDL support many different data types. Many of the HDF routines allow you to perform a data type conversion "on the fly" by setting keywords such as FLOAT. When the data type desired is not explicitly specified, IDL uses the conversions shown in the following tables. Note that single-precision floating-point is the default data type and that the complex data type is not supported.
When writing IDL data to an HDF file, IDL data types are converted to the HDF data types shown in the following table:
|
IDL Data Type
|
HDF Data Type
|
|---|---|
|
BYTE
|
DFNT_UINT8 (IDL bytes are unsigned)
|
|
INT
|
DFNT_INT16
|
|
UINT
|
DFNT_UINT16
|
|
LONG
|
DFNT_INT32
|
|
ULONG
|
DFNT_UINT32
|
|
FLOAT
|
DFNT_FLOAT32
|
|
DOUBLE
|
DFNT_DOUBLE
|
|
STRING
|
DFNT_CHAR88
|
When reading data from an HDF file, HDF data types are converted to the IDL data types shown in the following table:
HDF type codes for the supported HDF data types are shown in the table below:
|
HDF Data Type
|
Type Code
|
|---|---|
|
DFNT_UCHAR88
|
3
|
|
DFNT_CHAR88
|
4
|
|
DFNT_FLOAT32
|
5
|
|
DFNT_DOUBLE
|
6
|
|
DFNT_INT8
|
20
|
|
DFNT_UINT8
|
21
|
|
DFNT_INT16
|
22
|
|
DFNT_UINT16
|
23
|
|
DFNT_INT32
|
24
|
|
DFNT_UINT32
|
25
|
The following table lists common HDF tag numbers and their meanings.