The HDF Group

HDF User’s Guide

Version 4.2.6


[Top] [Prev][Next]


Table of Contents
Chapter 1
Introduction to HDF
1.1 Chapter Overview
1.2 What is HDF?
1.3 Why Was HDF Created?
1.4 High-Level HDF APIs
1.5 HDF Command-Line Utilities and Visualization Tools
1.6 Primary HDF Platforms
1.7 HDF4 versus HDF5
Chapter 2
HDF Fundamentals
2.1 Chapter Overview
2.2 HDF File Format
2.2.1 File Header
2.2.2 Data Object
2.2.2.1 Data Descriptor
2.2.2.2 Data Elements
2.2.3 Data Descriptor Block
2.2.4 Grouping Data Objects in an HDF File
2.3 Basic Operations on HDF Files Using the Multifile Interfaces
2.3.1 File Identifiers
2.3.2 Opening HDF Files: Hopen
2.3.3 Closing HDF Files: Hclose
2.3.4 Getting the HDF Library and File Versions: Hgetlibversion and Hgetfileversion
2.4 Determining whether a File Is an HDF File: Hishdf/hishdff
2.5 Programming Issues
2.5.1 Header File Information
2.5.2 HDF Definitions
2.5.2.1 Standard HDF Data Types
2.5.2.2 Native Format Data Types
2.5.2.3 Little-Endian Data Types
2.5.2.4 Tag Definitions
2.5.2.5 Limit Definitions
2.5.3 FORTRAN-77 and C Language Issues
Chapter 3
Scientific Data Sets (SD API)
3.1 Chapter Overview
3.2 The Scientific Data Set Data Model
3.2.1 Required SDS Components
3.2.2 Optional SDS Components
3.2.3 Annotations and the SD Data Model
3.3 The SD Interface
3.3.1 Header Files Required by the SD Interface
3.3.2 SD Interface Routines
3.3.3 Tags in the SD Interface
3.4 Programming Model for the SD Interface
3.4.1 Establishing Access to Files and Data Sets: SDstart, SDcreate, and SDselect
3.4.2 Terminating Access to Files and Data Sets: SDendaccess and SDend
3.5 Writing Data to an SDS
3.5.1 Writing Data to an SDS Array: SDwritedata
3.5.1.1 Filling an Entire Array
3.5.1.2 Writing Slabs to an SDS Array
3.5.1.3 Appending Data to an SDS Array along an Unlimited Dimension
3.5.1.4 Determining whether an SDS Array is Appendable: SDisrecord
3.5.1.5 Setting the Block Size: SDsetblocksize
3.5.1.6 Setting the I/O Access Type of an SDS: SDsetaccesstype
3.5.2 Compressing SDS Data: SDsetcompress
3.5.3 External File Operations
3.5.3.1 Specifying the Directory Search Path of an External File: HXsetdir
3.5.3.2 Specifying the Location of the Next External File to be Created: HXsetcreatedir
3.5.3.3 Creating a Data Set with Data Stored in an External File: SDsetexternalfile
3.5.3.4 Getting External File Information of a Data Set: SDgetexternalfile
3.5.3.5 Moving Existing Data to an External File
3.6 Reading Data from an SDS Array: SDreaddata
3.7 Obtaining Information about SD Data Sets
3.7.1 Obtaining Information about the Contents of a File: SDfileinfo
3.7.2 Obtaining Information about a Specific SDS: SDgetinfo
3.7.3 Obtaining Data Set Compression Information: SDgetcompinfo
3.7.4 Locating an SDS by Name: SDnametoindex
3.7.5 Locating More Than One SDS by the Same Name: SDnametoindices
3.7.6 Getting Number of Data Sets Given a Name: SDgetnumvars_byname
3.7.7 Locating an SDS by Reference Number: SDreftoindex
3.7.8 Obtaining the Reference Number Assigned to the Specified SDS: SDidtoref
3.7.9 Obtaining the Type of an HDF4 Object: SDidtype
3.7.10 Determining whether an SDS is empty: SDcheckempty
3.7.11 Creating SDS Arrays Containing Non-standard Length Data: SDsetnbitdataset
3.8 SDS Dimension and Dimension Scale Operations
3.8.1 Selecting a Dimension: SDgetdimid
3.8.2 Naming a Dimension: SDsetdimname
3.8.3 Old and New Dimension Implementations
3.8.3.1 Setting the Future Compatibility Mode of a Dimension: SDsetdimval_comp
3.8.3.2 Determining the Current Compatibility Mode of a Dimension: SDisdimval_bwcomp
3.8.4 Dimension Scales
3.8.4.1 Writing Dimension Scales: SDsetdimscale
3.8.4.2 Obtaining Dimension Scale and Other Dimension Information: SDdiminfo
3.8.4.3 Reading Dimension Scales: SDgetdimscale
3.8.4.4 Distinguishing SDS Arrays from Dimension Scales: SDiscoordvar
3.8.5 Related Data Sets
3.9 User-defined Attributes
3.9.1 Creating or Writing User-defined Attributes: SDsetattr
3.9.2 Querying User-defined Attributes: SDfindattr and SDattrinfo
3.9.3 Reading User-defined Attributes: SDreadattr
3.10 Predefined Attributes
3.10.1 Accessing Predefined Attributes
3.10.2 SDS String Attributes
3.10.2.1 Writing String Attributes of an SDS: SDsetdatastrs
3.10.2.2 Reading String Attributes of an SDS: SDgetdatastrs
3.10.3 String Attributes of Dimensions
3.10.3.1 Writing a String Attribute of a Dimension: SDsetdimstrs
3.10.3.2 Reading a String Attribute of a Dimension: SDgetdimstrs
3.10.4 Range Attributes
3.10.4.1 Writing a Range Attribute: SDsetrange
3.10.4.2 Reading a Range Attribute: SDgetrange
3.10.5 Fill Values and Fill Mode
3.10.5.1 Writing a Fill Value Attribute: SDsetfillvalue
3.10.5.2 Reading a Fill Value Attribute: SDgetfillvalue
3.10.5.3 Setting the Fill Mode for all SDSs in the Specified File: SDsetfillmode
3.10.6 Calibration Attributes
3.10.6.1 Setting Calibration Information: SDsetcal
3.10.6.2 Reading Calibrated Data: SDgetcal
3.11 Convenient Operations Related to File and Environment
3.11.1 Obtaining the Name of a File: SDgetfilename
3.11.2 Obtaining the Length of an HDF4 Object's Name: SDgetnamelen
3.11.3 Resetting the Allowed Number of Opened Files: SDreset_maxopenfiles
3.11.4 Obtaining Current Limits on Opened Files: SDget_maxopenfiles
3.11.5 Obtaining Number of Opened Files: SDget_numopenfiles
3.11.6 Creating SDS Arrays Containing Non-standard Length Data: SDsetnbitdataset
3.12 Chunked (or Tiled) Scientific Data Sets
3.12.1 Making an SDS a Chunked SDS: SDsetchunk
3.12.2 Setting the Maximum Number of Chunks in the Cache: SDsetchunkcache
3.12.3 Writing Data to Chunked SDSs: SDwritechunk and SDwritedata
3.12.4 Reading Data from Chunked SDSs: SDreadchunk and SDreaddata
3.12.5 Obtaining Information about a Chunked SDS: SDgetchunkinfo
3.13 Ghost Areas
3.14 netCDF
3.14.1 HDF Interface vs. netCDF Interface
3.14.2 ncdump and ncgen
3.14.2.1 Using ncdump on HDF Files
Chapter 4
Vdatas (VS API)
4.1 Chapter Overview
4.2 The Vdata Model
4.2.1 Records and Fields
4.3 The Vdata Interface
4.3.1 Header Files Used by the Vdata Interface
4.3.2 Vdata Library Routines
4.3.3 Identifying Vdatas in the Vdata Interface
4.3.4 Programming Model for the Vdata Interface
4.3.5 Accessing Files and Vdatas: Vstart and VSattach
4.3.6 Terminating Access to Vdatas and Files: VSdetach and Vend
4.4 Creating and Writing to Single-Field Vdatas: VHstoredata and VHstoredatam
4.5 Writing to Multi-Field Vdatas
4.5.1 Creating Vdatas
4.5.1.1 Assigning a Vdata Name and Class: VSsetname and VSsetclass
4.5.1.2 Defining a Field within a Vdata: VSfdefine
4.5.1.3 Initializing the Fields for Write Access: VSsetfields
4.5.1.4 Specifying the Interlace Mode: VSsetinterlace
4.5.2 Writing Data to Vdatas
4.5.2.1 Resetting the Current Position within Vdatas: VSseek
4.5.2.2 Writing to a Vdata: VSwrite
4.5.2.3 Setting Up Linked Block Vdatas: VSsetblocksize and VSsetnumblocks
4.5.2.4 Packing or Unpacking Field Data: VSfpack
4.6 Reading from Vdatas
4.6.1 Initializing the Fields for Read Access: VSsetfields
4.6.2 Reading from the Current Vdata: VSread
4.7 Searching for Vdatas in a File
4.7.1 Finding All Vdatas that are Not Members of a Vgroup: VSlone
4.7.2 Sequentially Searching for a Vdata: VSgetid
4.7.3 Retrieving Vdatas in a File or in a Vgroup: VSgetvdatas
4.7.4 Determining a Reference Number from a Vdata Name: VSfind
4.7.5 Searching for a Vdata by Field Name: VSfexist
4.7.6 Retrieving Vdatas in a File or in a Vgroup: VSgetvdatas
4.7.7 Retrieving Vdatas in a File or in a Vgroup: VSofclass
4.8 Vdata Attributes
4.8.1 Querying the Index of a Vdata Field Given the Field Name: VSfindex
4.8.2 Setting the Attribute of a Vdata or Vdata Field: VSsetattr
4.8.3 Querying the Values of a Vdata or Vdata Field Attribute: VSgetattr
4.8.4 Querying the Total Number of Vdata and Vdata Field Attributes: VSnattrs
4.8.5 Querying the Number of Attributes of a Vdata or a Vdata Field: VSfnattrs
4.8.6 Retrieving the Index of a Vdata or Vdata Field Attribute Given the Attribute Name: VSfindattr
4.8.7 Querying Information on a Vdata or Vdata Field Attribute: VSattrinfo
4.8.8 Determining whether a Vdata Is an Attribute: VSisattr
4.9 Obtaining Information about a Specific Vdata
4.9.1 Obtaining Vdata Information: VSinquire
4.9.2 Obtaining Linked Block Information: VSgetblockinfo
4.9.3 VSQuery Vdata Information Retrieval Routines
4.9.4 Other Vdata Information Retrieval Routines
4.9.5 VF Field Information Retrieval Routines
Chapter 5
Vgroups (V API)
5.1 Chapter Overview
5.2 The Vgroup Data Model
5.2.1 Vgroup Names and Classes
5.2.2 Vgroup Organization
5.2.3 An Example Using Vgroups
5.3 The Vgroup Interface
5.3.1 Vgroup Interface Routines
5.3.2 Identifying Vgroups in the Vgroup Interface
5.4 Programming Model for the Vgroup Interface
5.4.1 Accessing Files and Vgroups: Vstart and Vattach
5.4.2 Terminating Access to Vgroups and Files: Vdetach and Vend
5.5 Creating and Writing to a Vgroup
5.5.1 Assigning a Vgroup Name and Class: Vsetname and Vsetclass
5.5.2 Inserting Any HDF Data Object into a Vgroup: Vaddtagref
5.5.3 Inserting a Vdata or Vgroup Into a Vgroup: Vinsert
5.5.4 Building a Vgroup with or without Elements: VHmakegroup
5.6 Reading from Vgroups
5.6.1 Locating Vgroups and Obtaining Vgroup Information
5.6.1.1 Locating Lone Vgroups: Vlone
5.6.1.2 Sequentially Searching for a Vgroup: Vgetid
5.6.1.3 Retrieving vgroups in a file or in a vgroup: Vgetvgroups
5.6.1.4 Obtaining the Name of a Vgroup: Vgetname
5.6.1.5 Obtaining the Length of a Vgroup's Name: Vgetnamelen
5.6.1.6 Obtaining the Class Name of a Vgroup: Vgetclass
5.6.1.7 Obtaining the Length of a Vgroup's Class Name: Vgetclassnamelen
5.6.1.8 Locating a Vgroup Given Its Name: Vfind
5.6.1.9 Locating a Vgroup Given Its Class Name: Vfindclass
5.6.2 Obtaining Information about the Contents of a Vgroup
5.6.2.1 Obtaining the Number of Objects in a Vgroup: Vntagrefs
5.6.2.2 Obtaining the Tag/Reference Number Pair of a Data Object within a Vgroup : Vgettagref
5.6.2.3 Obtaining the Tag/Reference Number Pairs of Data Objects in a Vgroup: Vgettagrefs
5.6.2.4 Testing Whether a Data Object Belongs to a Vgroup: Vinqtagref
5.6.2.5 Testing Whether a Data Object within a Vgroup is a Vgroup: Visvg
5.6.2.6 Testing Whether an HDF Object within a Vgroup is a Vdata: Visvs
5.6.2.7 Locating a Vdata in a Vgroup Given Vdata Fields: Vflocate
5.6.2.8 Retrieving the Number of Tags of a Given Type in a Vgroup: Vnrefs
5.6.2.9 Retrieving the Reference Number of a Vgroup: VQueryref
5.6.2.10 Retrieving the Tag of a Vgroup: VQuerytag
5.7 Deleting Vgroups and Data Objects within a Vgroup
5.7.1 Deleting a Vgroup from a File: Vdelete
5.7.2 Deleting a Data Object from a Vgroup: Vdeletetagref
5.8 Vgroup Attributes
5.8.1 Obtaining the Vgroup Version Number of a Given Vgroup: Vgetversion
5.8.2 Setting the Attribute of a Vgroup: Vsetattr
5.8.3 Retrieving the Index of a Vgroup Attribute Given the Attribute Name: Vfindattr
5.8.4 Obtaining the Total Number of Vgroup Attributes: Vnattrs and Vnattrs2
5.8.5 Obtaining Information on a Given Vgroup Attribute: Vattrinfo
5.8.6 Obtaining Information on a Given Vgroup Attribute: Vattrinfo2
5.8.7 Retrieving the Values of a Given Vgroup Attribute: Vgetattr
5.8.8 Retrieving the Values of a Given Vgroup Attribute: Vgetattr2
5.9 Obsolete Vgroup Interface Routines
5.9.1 Determining the Next Vgroup or Vdata Identifier: Vgetnext
5.9.2 Determining the Number of Members and Vgroup Name: Vinquire
Chapter 6
8-Bit Raster Images (DFR8 API)
6.1 Chapter Overview
6.1.1 Required 8-Bit Raster Image Data Set Objects
6.1.1.1 8-Bit Raster Image Data Representation
6.1.1.2 8-Bit Raster Image Dimension
6.1.2 Optional 8-Bit Raster Image Data Set Objects
6.1.2.1 Palettes
6.1.3 Compression Method
6.2 The 8-Bit Raster Image Interface
6.2.1 8-Bit Raster Image Library Routines
6.3 Writing 8-Bit Raster Images
6.3.1 Storing a Raster Image: DFR8putimage and DFR8addimage
6.3.2 Adding a Palette to an RIS8 Object: DFR8setpalette
6.3.3 Compressing 8-Bit Raster Image Data: DFR8setcompress
6.3.4 Specifying the Reference Number of an RIS8: DFR8writeref
6.4 Reading 8-Bit Raster Images
6.4.1 Reading a Raster Image: DFR8getimage
6.4.2 Querying the Dimensions of an 8-Bit Raster Image: DFR8getdims
6.4.3 Reading an Image with a Given Reference Number: DFR8readref
6.4.4 Specifying the Next 8-Bit Raster Image to be Read: DFR8restart
6.5 8-Bit Raster Image Information Retrieval Routines
6.5.1 Querying the Total Number of 8-Bit Raster Images: DFR8nimages
6.5.2 Determining the Reference Number of the Most-Recently-Accessed
8-Bit Raster Image: DFR8lastref
6.5.3 Determining the Reference Number of the Palette of the
Most-Recently-Accessed 8-Bit Raster Image: DFR8getpalref
6.6 RIS8 Backward Compatibility Issues
6.6.1 Attribute "long_name" Included in HDF for netCDF Compatibility
6.6.2 Raster Image Group Implementation with New RIS8 Tags
Chapter 7
General Raster Images (GR API)
7.1 Chapter Overview
7.2 The GR Data Model
7.2.1 Required GR Data Set Components
7.2.2 Optional GR Data Set Components
7.3 The GR Interface
7.3.1 GR Interface Routines
7.4 Header Files Required by the GR Interface
7.5 Programming Model for the GR Interface
7.5.1 Accessing Images and Files: GRstart, GRselect, and GRcreate
7.5.2 Terminating Access to Images and Files: GRendaccess and GRend
7.6 Writing Raster Images
7.6.1 Writing Raster Images: GRwriteimage
7.6.2 Compressing Raster Images: GRsetcompress
7.6.3 Setting I/O Access Type for a Raster Image: GRsetaccesstype
7.6.4 External File Operations Using the GR Interface
7.6.4.1 Creating a Raster Image in an External File: GRsetexternalfile
7.6.4.2 Moving Raster Images to an External File
7.7 Reading Raster Images
7.7.1 Reading Data from an Image: GRreadimage
7.7.2 Setting the Interlace Mode for an Image Read: GRreqimageil
7.8 Difference between the SD and GR Interfaces
7.9 Obtaining Information about Files and Raster Images
7.9.1 Obtaining Information about the Contents of a File: GRfileinfo
7.9.2 Obtaining Information about an Image: GRgetiminfo
7.9.3 Obtaining the Reference Number of a Raster Image from Its Identifier: GRidtoref
7.9.4 Obtaining the Index of a Raster Image from Its Reference Number: GRreftoindex
7.9.5 Obtaining the Index of a Raster Image from Its Name: GRnametoindex
7.9.6 Obtaining Compression Information for a Raster Image: GRgetcompinfo
7.9.7 Checking Whether a Raster Image Is To Be Mapped: GR2bmapped
7.10 GR Data Set Attributes
7.10.1 Predefined GR Attributes
7.10.2 Setting User-defined Attributes: GRsetattr
7.10.3 Querying User-Defined Attributes: GRfindattr and GRattrinfo
7.10.4 Reading User-defined Attributes: GRgetattr
7.11 Reading and Writing Palette Data Using the GR Interface
7.11.1 Obtaining a Palette Identifier: GRgetlutid
7.11.2 Obtaining the Number of Palettes Associated with an Image: GRgetnluts
7.11.3 Obtaining the Reference Number of a Specified Palette: GRluttoref
7.11.4 Obtaining Palette Information: GRgetlutinfo
7.11.5 Writing Palette Data: GRwritelut
7.11.6 Setting the Interlace Mode for a Palette: GRreqlutil
7.11.7 Reading Palette Data: GRreadlut
7.12 Chunked Raster Images
7.12.1 Difference between a Chunked Raster Image and a Chunked SDS
7.12.2 Making a Raster Image a Chunked Raster Image: GRsetchunk
7.12.3 Writing a Chunked Raster Image: GRwritechunk
7.12.4 Reading a Chunked Raster Image: GRreadchunk
7.12.5 Obtaining Information about a Chunked Raster Image: GRgetchunkinfo
7.12.6 Setting the Maximum Number of Chunks in the Cache: GRsetchunkcache
Chapter 8
24-bit Raster Images (DF24 API)
8.1 Chapter Overview
8.2 The 24-Bit Raster Data Model
8.2.1 Required 24-Bit Raster Image Data Set Objects
8.2.1.1 24-Bit Raster Image Data Representation
8.2.1.2 24-Bit Raster Image Dimension
8.2.2 Optional 24-Bit Raster Image Data Set Objects
8.2.2.1 Compression Method
8.2.2.2 Interlace Modes
8.3 The 24-Bit Raster Interface
8.3.1 24-Bit Raster Image Library Routines
8.4 Writing 24-Bit Raster Images
8.4.1 Writing a 24-Bit Raster Image: DF24putimage and DF24addimage
8.4.2 Setting the Interlace Format: DF24setil
8.4.3 Compressing Image Data: DF24setcompress and d2sjpeg
8.5 Reading 24-Bit Raster Images
8.5.1 Reading a Raster Image: DF24getimage
8.5.2 Determining the Dimensions of an Image: DF24getdims
8.5.3 Modifying the Interlacing of an Image: DF24reqil
8.5.4 Reading a 24-Bit Raster Image with a Given Reference Number: DF24readref
8.5.5 Specifying that the Next Image Read to be the First 24-Bit Raster
Image in the File: DF24restart
8.6 24-Bit Raster Image Information Retrieval Routines
8.6.1 Querying the Total Number of Images in a File: DF24nimages
8.6.2 Querying the Reference Number of the Most Recently Accessed 24-Bit
Raster Image: DF24lastref
Chapter 9
Palettes (DFP API)
9.1 Chapter Overview
9.2 The Palette Data Model
9.3 The Palette API
9.3.1 Palette Library Routines
9.4 Writing Palettes
9.4.1 Writing a Palette: DFPaddpal and DFPputpal
9.4.2 Specifying the Reference Number of a Palette: DFPwriteref
9.5 Reading a Palette
9.5.1 Reading a Palette: DFPgetpal
9.5.2 Reading a Palette with a Given Reference Number: DFPreadref
9.5.3 Specifying the Next Palette to be Accessed to be the First Palette: DFPrestart
9.6 Other Palette Routines
9.6.1 Querying the Number of Palettes in a File: DFPnpals
9.6.2 Obtaining the Reference Number of the Most Recently Accessed Palette: DFPlastref
9.7 Backward Compatibility Issues
Chapter 10
Annotations (AN API)
10.1 Chapter Overview
10.2 The Annotation Data Model
10.2.1 Labels and Descriptions
10.2.2 File Annotations
10.2.3 Object Annotations
10.2.4 Terminology
10.3 The AN interface
10.3.1 AN Library Routines
10.3.2 Type and Tag Definitions Used in the AN Interface
10.3.3 Programming Model for the AN Interface
10.3.4 Accessing Files and Annotations: ANstart, ANcreatef, and ANcreate
10.3.5 Terminating Access to Annotations and Files: ANendaccess and ANend
10.4 Writing an Annotation: ANwriteann
10.5 Reading Annotations Using the AN Interface
10.5.1 Selecting an Annotation: ANselect
10.5.2 Reading an Annotation: ANreadann
10.6 Obtaining Annotation Information Using the AN Interface
10.6.1 Obtaining the Number of Annotations: ANfileinfo
10.6.2 Getting the Length of an Annotation: ANannlen
10.6.3 Obtaining the Number of Specifically-typed Annotations of a Data Object: ANnumann
10.6.4 Obtaining the List of Specifically-typed Annotation Identifiers of a Data Object: ANannlist
10.6.5 Obtaining the Tag/Reference Number Pair of the Specified
Annotation Index and Type: ANget_tagref
10.6.6 Obtaining the Tag/Reference Number Pair from a Specified Annotation Identifier: ANid2tagref
10.6.7 Obtaining the Annotation Identifier from a Specified Tag/Reference Number Pair: ANtagref2id
10.6.8 Obtaining an Annotation Tag from a Specified Annotation Type: ANatype2tag
10.6.9 Obtaining an Annotation Type from a Specified Object Tag: ANtag2atype
Chapter 11
Single-file Annotations (DFAN API)
11.1 Chapter Overview
11.2 The Single-file Annotation Interface
11.2.1 DFAN Library Routines
11.2.2 Tags in the Annotation Interface
11.3 Programming Model for the DFAN Interface
11.4 Writing Annotations
11.4.1 Assigning a File Label: DFANaddfid
11.4.2 Assigning a File Description: DFANaddfds
11.4.3 Assigning an Object Label: DFANputlabel
11.4.4 Assigning an Object Description: DFANputdesc
11.5 Reading Annotations
11.5.1 Reading a File Label: DFANgetfidlen and DFANgetfid
11.5.2 Reading a File Description: DFANgetfdslen and DFANgetfds
11.5.3 Reading an Object Label: DFANgetlablen and DFANgetlabel
11.5.4 Reading an Object Description: DFANgetdesclen and DFANgetdesc
11.6 Maintenance Routines
11.6.1 Clearing the DFAN Interface Internal Structures and Settings: DFANclear
11.7 Determining Reference Numbers
11.7.1 Determining a Reference Number for the Last Object Accessed: DF*lastref and DF*writeref
11.7.2 Querying a List of Reference Numbers for a Given Tag: DFANlablist
11.7.3 Locate an Object by Its Tag and Reference Number: Hfind
Chapter 12
Single-File Scientific Data Sets (DFSD API)
12.1 Chapter Overview
12.2 The DFSD Scientific Data Set Data Model
12.2.1 Required DFSD SDS Objects
12.2.1.1 Dimensions
12.2.2 Optional DFSD SDS Objects
12.2.2.1 Dimension Scales
12.2.2.2 Predefined Attributes
12.3 The Single-File Scientific Data Set Interface
12.3.1 DFSD Library Routines
12.3.2 File Identifiers in the DFSD Interface
12.4 Writing DFSD Scientific Data Sets
12.4.1 Creating a DFSD Scientific Data Set: DFSDadddata and DFSDputdata
12.4.2 Specifying the Data Type of a DFSD SDS: DFSDsetNT
12.4.3 Overwriting Data for a Given Reference Number: DFSDwriteref
12.4.4 Writing Several Data Sets: DFSDsetdims and DFSDclear
12.4.5 Preventing the Reassignment of DFSD Data Set Attributes: DFSDsetdims
12.4.6 Resetting the Default DFSD Interface Settings: DFSDclear
12.5 Reading DFSD Scientific Data Sets
12.5.1 Reading a DFSD SDS: DFSDgetdata
12.5.2 Specifying the Dimensions and Data Type of an SDS: DFSDgetdims and DFSDgetNT
12.5.3 Determining the Number of DFSD Data Sets: DFSDndatasets and DFSDrestart
12.5.4 Obtaining Reference Numbers of DFSD Data Sets: DFSDreadref and DFSDlastref
12.6 Slabs in the DFSD Interface
12.6.1 Accessing Slabs: DFSDstartslab and DFSDendslab
12.6.2 Writing Slabs: DFSDwriteslab
12.6.3 Reading Slabs: DFSDreadslab
12.7 Predefined Attributes and the DFSD Interface
12.7.1 Writing Data Set Attributes
12.7.1.1 Assigning String Attributes to a DFSD SDS: DFSDsetlengths and DFSDsetdatastrs
12.7.1.2 Assigning Value Attributes to a DFSD SDS: DFSDsetfillvalue, DFSDsetrange, and
DFSDsetcal
12.7.2 Reading DFSD Data Set Attributes
12.7.2.1 Reading Data Set Attributes: DFSDgetdatalen and DFSDgetdatastrs
12.7.2.2 Reading the Value Attributes of a DFSD Data Set: DFSDgetfillvalue and DFSDgetcal
12.7.3 Writing the Dimension Attributes of a DFSD SDS
12.7.3.1 Writing the String Attributes of a Dimension: DFSDsetlengths and DFSDsetdimstrs
12.7.3.2 Writing a Dimension Scale of a DFSD SDS: DFSDsetdimscale
12.7.4 Reading the Dimension Attributes of a DFSD SDS
Chapter 13
Error Reporting
13.1 Chapter Overview
13.2 The HDF Error Reporting API
13.3 Error Reporting in HDF
13.3.1 Writing Errors to a File: HEprint
13.3.2 Returning the Code of the Nth Most Recent Error: HEvalue
13.3.3 Returning the Description of an Error Code: HEstring/hestringf
13.3.4 Clearing the error stack: HEclear
Chapter 14
HDF Performance Issues
14.1 Chapter Overview and Introduction
14.2 Examples of HDF Performance Enhancement
14.2.1 One Large SDS versus Several Smaller SDSs
14.2.2 Sharing Dimensions between Scientific Data Sets
14.2.3 Setting the Fill Mode
14.2.4 Disabling Fake Dimension Scale Values in Large One-dimensional Scientific Data Sets
14.3 Data Chunking
14.3.1 What Is Data Chunking?
14.3.2 Writing Concerns and Reading Concerns in Chunking
14.3.3 Chunking without Compression
14.3.4 Chunking with Compression
14.3.5 Effect of Chunk Size on Performance
14.3.6 Insufficient Chunk Cache Space Can Impair Chunking Performance
14.4 Block Size Tuning Issues
14.4.1 Tuning Data Descriptor Block Size to Enhance Performance
14.4.2 Tuning Linked Block Size to Enhance Performance
14.4.3 Unlimited Dimension Data Sets (SDSs and Vdatas) and Performance
Chapter 15
HDF Command-line Utilities
15.1 Chapter Overview
15.2 Displaying the Contents of an HDF File: hdp (or HDF Dumper)
15.2.1 General Description
15.2.2 Command-line Syntax
15.3 Comparing two HDF Files: hdiff
15.3.1 General Description
15.3.2 Command-line Syntax
15.3.3 Examples
15.4 Displaying Vdata Information: vshow
15.4.1 General Description
15.4.2 Command-line Syntax
15.4.3 Examples
15.5 Converting Floating-point or Integer Data to SDS or RIS8: hdfimport
15.5.1 General Description
15.5.2 Command-line Syntax
15.5.3 Structure of Data in non-HDF Input Files
15.6 Converting 8-Bit Raster Images to the HDF Format: r8tohdf
15.6.1 General Description
15.6.2 Command-line Syntax
15.6.3 Examples
15.7 Converting 24-Bit Raw Raster Images to RIS8 Images: r24hdf8
15.7.1 General Description
15.7.2 Command-line Syntax
15.7.3 Examples
15.8 Converting Raw Palette Data to the HDF Palette Format: paltohdf
15.8.1 General Description
15.8.2 Command-line Syntax
15.9 Extracting 8-Bit Raster Images and Palettes from HDF Files: hdftor8
15.9.1 General Description
15.9.2 Command-line Syntax
15.9.3 Examples
15.10 Extracting Palette Data from an HDF File: hdftopal
15.10.1 General Description
15.10.2 Command-line Syntax
15.11 Converting Several RIS8 Images to One 3D SDS: ristosds
15.11.1 General Description
15.11.2 Command-line Syntax
15.11.3 Examples
15.12 Converting an HDF RIS24 Image to an HDF RIS8 Image: hdf24hdf8
15.12.1 General Description
15.12.2 Command-line Syntax
15.13 Compressing RIS8 Images in an HDF File: hdfcomp
15.13.1 General Description
15.13.2 Command-line Syntax
15.13.3 Examples
15.14 Compressing an HDF File: hdfpack
15.14.1 General Description
15.14.2 Command-line Syntax
15.14.3 Examples
15.15 Reformatting an HDF File: hrepack
15.15.1 General Description
15.15.2 Command-line Syntax
15.16 Creating Vgroups and Vdatas: vmake
15.16.1 General Description
15.16.2 Command-line Syntax
15.16.3 Examples
15.17 Listing Basic Information about Data Objects in an HDF File: hdfls
15.17.1 General Description
15.17.2 Command-line Syntax
15.17.3 Examples
15.18 Editing the Contents of an HDF File: hdfed
15.18.1 General Description
15.18.2 Command-line Syntax
15.19 Working with Both HDF4 and HDF5 File Formats
15.20 Converting an HDF File to a GIF File: hdf2gif
15.20.1 General Description
15.20.2 Command-line Syntax and Requirements:
15.20.3 Structure of the GIF File
15.20.4 Building the Utility
15.21 Converting a GIF File to an HDF File: gif2hdf
15.21.1 General Description
15.21.2 Command-line Syntax and Requirements
15.21.3 Structure of the GIF and HDF Files and the Mapping between Them
15.21.4 Building the Utility
15.22 Compiling C applications that Use HDF4: h4cc
15.22.1 General Description
15.22.2 Command-line Syntax
15.22.3 Examples
15.23 Compiling Fortran applications that Use HDF4: h4fc
15.23.1 General Description
15.23.2 Command-line Syntax
15.23.3 Example
15.24 Updating HDF4 Compiler Tools after an Installation in a New Location: h4redeploy
15.24.1 General Description
15.24.2 Command-line Syntax
Chapter 16
Raw Data Information
16.1 Chapter Overview
16.2 The Data Information Retrieval Routines
16.3 Addition to the AN Interface
16.3.1 Retrieving Data Information of an Annotation: ANgetdatainfo
16.4 Addition to the SD Interface
16.4.1 Retrieving Data Information of an SDS: SDgetdatainfo
16.4.2 Retrieving Data Information of an Attribute: SDgetattdatainfo
16.4.3 Retrieving Data Information of a DFSD API Attribute: SDgetoldattdatainfo
16.4.4 Retrieving Data Information of an SDS Annotation: SDgetanndatainfo
16.5 Addition to the GR Interface
16.5.1 Retrieving Data Information of a Raster Image: GRgetdatainfo
16.5.2 Retrieving Data Information of a GR API Attribute: GRgetattdatainfo
16.6 Addition to the V Interface
16.6.1 Retrieving Data Information of a V API Attribute: Vgetattdatainfo
16.7 Addition to the VS Interface
16.7.1 Retrieving Data Information of a Vdata: VSgetdatainfo
16.7.2 Retrieving Data Information of a VS API Attribute: VSgetattdatainfo
Appendices

HDF 4.2.6 - August 2011
Copyright
The HDF Group
www.hdfgroup.org
The HDF Group