[Top] [Prev] [Next] [Bottom]

2.3 Data Objects

The term data object is used to describe the fundamental conglomerate structure use to encapsulate data.

Data objects contain a data descriptor and a data element. Data descriptors consist of information about the type, location, and size of a data element. Data elements contain the primary data itself.

2.3.1 Data Descriptors

All data descriptors are twelve bytes long and contain four fields. (See Figure 2b.)

FIGURE 2b The Contents of a Data Descriptor

Tags

Tags identify the type of data stored in its data element. For example, a raster image descriptor is identified by a DFTAG_RI tag and a palette descriptor a DFTAG_LUT tag. There are currently over 200 tags defined for general use. A complete list of tags and their descriptions can be found in Appendix A of this manual

Tag values ranging between 1 and 32,767 are reserved for commonly-used data types. These tags are assigned by the HDF development group. Tag values ranging between 32,768 and 64,999 are not regulated by NCSA and are available for private application. These tags are not documented by NCSA and may therefore conflict with tags assigned by someone else. Therefore, it is best to limit applications to the use of the commonly-used tags.

Reference Numbers

Reference numbers distinguish between different data elements with the same tag. For example, all raster image descriptors will have the same raster data tag. The pairing of a tag and a reference number provides a unique identifier for any HDF object within a file.

Although HDF assigns reference numbers in increasing order, it is the write operations that are counted, not the number or type of data objects added to the file. For example, writing a raster image set followed by a scientific data set uses a minimum of six data objects but only two write operations. Consequently, HDF will assign 1 as the reference number for the first raster image set and all its members and 2 as the reference number for the scientific data set and all its members.

While application programmers may find it convenient to impart some additional meaning to reference numbers, it should be noted that HDF will not internally recognize any such meaning.

Offsets and Lengths

The offset field points to the location of the data element in the file by storing the number of bytes from the beginning of the file to the beginning of the data element. The length field contains the total size of the data element in bytes.

Data Elements

The type of the data stored in a data element is identified by its tag, however, other interpretive information may be required before it can be processed properly.



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Guide - 06/04/97, NCSA HDF Development Group.