HDF Scientific Dataset ID Numbers
 
 
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 
SD_ID
 and 
SDS_ID
 arguments.
 
The 
SD_ID
 is the Scientific Dataset interface ID. There is only one 
SD_ID
 per HDF file. For each actual dataset used, you will also need an 
SDS_ID
, which is the ID for the particular dataset.
 
Some routines, such as HDF_SD_ATTRFIND accept either an 
SD_ID
 or an 
SDS_ID
. In these cases, the documentation refers to the ID as an 
S_ID
, meaning that either type of ID is accepted.
 
A Cautionary Note about Tags
 
Both the old DFSD and the new MFSD HDF interfaces use the same tags. Therefore, you must be careful when reading or writing SDs. Use only the appropriate "HDF_SD_" or "HDF_DFSD_" routines. The wrong SD interface may seem to work, but may return bad results.
 
 
 IDL and HDF Data Types
 
 
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 
See Type Conversions when Writing IDL Data to an HDF File
:
- 
 
 
Type Conversions when Writing IDL Data to an HDF File
 
| 
 
 
IDL Data Type 
 | 
 
 
HDF Data Type 
 | 
| 
 
 
BYTE 
 | 
 
 
DFNT_UINT8 (IDL bytes are unsigned) 
 | 
| 
 
 
INT 
 | 
 
 
DFNT_INT16 
 | 
| 
 
 
LONG 
 | 
 
 
DFNT_INT32 
 | 
| 
 
 
FLOAT 
 | 
 
 
DFNT_FLOAT32 
 | 
| 
 
 
DOUBLE 
 | 
 
 
DFNT_DOUBLE 
 | 
| 
 
 
STRING 
 | 
 
 
DFNT_CHAR 
 | 
 
When reading data from an HDF file, HDF data types are converted to the IDL data types shown in 
See Type Conversions when Reading HDF Data into IDL
:  
- 
 
 
Type Conversions when Reading HDF Data into IDL
 
| 
 
 
HDF Data Type 
 | 
 
 
IDL Data Type 
 | 
| 
 
 
DFNT_CHAR or DFNT_UCHAR 
 | 
 
 
STRING 
 | 
| 
 
 
DFNT_INT8 or DFNT_UINT8 
 | 
 
 
BYTE 
 | 
| 
 
 
DFNT_INT16 or DFNT_UINT16 
 | 
 
 
INT 
 | 
| 
 
 
DFNT_INT32 or DFNT_UINT32 
 | 
 
 
LONG 
 | 
| 
 
 
DFNT_FLOAT32 or DFNT_NONE 
 | 
 
 
FLOAT 
 | 
| 
 
 
DFNT_DOUBLE 
 | 
 
 
DOUBLE 
 | 
 
HDF type codes for the supported HDF data types are shown in 
See HDF Data Type Codes
:
| 
 
 
HDF Data Type 
 | 
 
 
Type Code 
 | 
| 
 
 
DFNT_UCHAR 
 | 
 
 
3 
 | 
| 
 
 
DFNT_CHAR 
 | 
 
 
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 
 | 
 
 
Common HDF Tag Numbers
 
Common HDF Tag Numbers
 lists
 
 common HDF tag numbers and their meanings.
| 
 
 
Tag Number 
 | 
 
 
Meaning 
 | 
| 
 
 
030 
 | 
 
 
Version Identifier 
 | 
| 
 
 
100 
 | 
 
 
File Identifier 
 | 
| 
 
 
101 
 | 
 
 
File Description 
 | 
| 
 
 
102 
 | 
 
 
Tag Identifier 
 | 
| 
 
 
103 
 | 
 
 
Tag Description 
 | 
| 
 
 
104 
 | 
 
 
Data Identifier Label 
 | 
| 
 
 
105 
 | 
 
 
Data Identifier Annotation 
 | 
| 
 
 
106 
 | 
 
 
Number Type 
 | 
| 
 
 
107 
 | 
 
 
Machine Type 
 | 
| 
 
 
200 
 | 
 
 
Obsolete 
 | 
| 
 
 
201 
 | 
 
 
Obsolete 
 | 
| 
 
 
202 
 | 
 
 
Obsolete 
 | 
| 
 
 
203 
 | 
 
 
Obsolete 
 | 
| 
 
 
204 
 | 
 
 
Obsolete 
 | 
| 
 
 
300 
 | 
 
 
RIG Image Dimension 
 | 
| 
 
 
301 
 | 
 
 
Raster Image Look Up Table (LUT) 
 | 
| 
 
 
302 
 | 
 
 
Raster Image 
 | 
| 
 
 
303 
 | 
 
 
Compressed Raster Image 
 | 
| 
 
 
306 
 | 
 
 
Raster Image Group (RIG) 
 | 
| 
 
 
307 
 | 
 
 
RIG LUT Dimension  
 | 
| 
 
 
308 
 | 
 
 
RIG Matte Dimension 
 | 
| 
 
 
309 
 | 
 
 
Raster Image Matte Data 
 | 
| 
 
 
310 
 | 
 
 
Raster Image Color Correction 
 | 
| 
 
 
311 
 | 
 
 
Raster Image Color Format 
 | 
| 
 
 
312 
 | 
 
 
Raster Image Aspect Ratio 
 | 
| 
 
 
400 
 | 
 
 
Composite Image Descriptor 
 | 
| 
 
 
500 
 | 
 
 
XY Position 
 | 
| 
 
 
602 
 | 
 
 
Vector Image - Tek4014 Stream 
 | 
| 
 
 
603 
 | 
 
 
Vector Image - Tek4105 Stream 
 | 
| 
 
 
701 
 | 
 
 
SD Dimension Record 
 | 
| 
 
 
702 
 | 
 
 
SD Data 
 | 
| 
 
 
703 
 | 
 
 
SD Scales 
 | 
| 
 
 
704 
 | 
 
 
SD Labels 
 | 
| 
 
 
705 
 | 
 
 
SD Units 
 | 
| 
 
 
706 
 | 
 
 
SD Formats 
 | 
| 
 
 
707 
 | 
 
 
SD Max/Min 
 | 
| 
 
 
708 
 | 
 
 
SD Coordinates 
 | 
| 
 
 
710 
 | 
 
 
SD Link 
 | 
| 
 
 
720 
 | 
 
 
SD Descriptor (NDG) 
 | 
| 
 
 
731 
 | 
 
 
SD Calibration Information 
 | 
| 
 
 
732 
 | 
 
 
SD Fill Value 
 | 
| 
 
 
1962 
 | 
 
 
Vdata Description 
 | 
| 
 
 
1963 
 | 
 
 
Vdata 
 | 
| 
 
 
1965 
 | 
 
 
Vgroup 
 |