[Top] [Prev] [Next]

1.4 High-Level HDF APIs

HDF APIs are divided into two categories: multifile interfaces (new) and single-file interfaces (old). The multifile interfaces are those that provide simultaneous access to several HDF files from within an application, which is an important feature that the single-file interfaces do not support. It is recommended that the user explore the new interfaces and their features since they are an improvement over the old interfaces. The old interfaces remain simply because of the need for backward compatibility.

The HDF I/O library consists of C and FORTRAN-77 routines for accessing objects and associated information. Although there is some overlap among object types, in most cases an API operates on data of only one type. Therefore, you need only familiarize yourself with the APIs specific to your needs to access data in an HDF file.

The following lists include all of the currently available HDF interfaces and the data that each interface supports.

The new multifile interfaces are:

SD API

Stores, manages and retrieves multidimensional arrays of character or numeric data, along with their dimensions and attributes, in more than one file. It is described in Chapter 3, Scientific Data Sets (SD API).

VS API

Stores, manages and retrieves multivariate data stored as records in a table. It is described in Chapter 4, Vdatas (VS API).

V API

Creates groups of any primary HDF data structures. It is described in Chapter 5, Vgroups (V API).

GR API

Stores, manages and retrieves raster images, their dimensions and palettes in more than one file. It can also manipulate unattached palettes in more than one file. It is described in Chapter 8, General Raster Images (GR API).

AN API

Stores, manages and retrieves text used to describe a file or any of the data structures contained in the file. This interface can operate on several files at once. It is described in Chapter 10, Annotations (AN API).

The old single-file interfaces are:

DFR8 API

Stores, manages and retrieves 8-bit raster images, with their dimensions and palettes in one file. It is described in Chapter 6, 8-Bit Raster Images (DFR8 API).

DF24 API

Stores, manages and retrieves 24-bit images and their dimensions in one file. It is described in Chapter 7, 24-bit Raster Images (DF24 API).

DFP API

Stores and retrieves 8-bit palettes in one file. It is described in Chapter 9, Palettes (DFP API).

DFAN API

Stores, manages and retrieves text strings used to describe a file or any of the data structures contained in the file. This interface only operates on one file at a time. It is described in Chapter 11, Single-file Annotations (DFAN API).

DFSD API

Stores, manages and retrieves multidimensional arrays of integer or floating-point data, along with their dimensions and attributes, in one file. It is described in Chapter 12, Single-File Scientific Data Sets (DFSD API).

As these interfaces are the tools used to read and write HDF files, they are the primary focus of this manual.

In every interface, various programming examples are provided to illustrate the use of the interface routines. Both C and FORTRAN-77 versions are available. Their source code, in ASCII format, is located on the FTP servers mentioned in Section 1.2 on page 1 in the subdirectory samples/.

Note that the goal of these examples is to illustrate the use of the interface routines; thus, for simplicity, many assumptions have been made, such as the availability or the authentication of the data. Based on these assumptions, these examples skip the verification of the returned status of each function. In practice, it is strongly recommended that the user verify the returned value of every function to ensure the reliability of the user application.



[Top] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF User's Guide - 07/21/98, NCSA HDF Development Group.