hdf images hdf images

Converting between HDF (4.x) and HDF5

Important Message

We will continue to maintain HDF4, as long as we are funded to do so. We do not plan to add any new features to HDF4, but we will fix bugs and build and test it on new operating system versions.

We recommend using HDF5, especially if you are a new user and are not constrained to using HDF 4.x (HDF4). We also recommend that you consider migrating from HDF4 to HDF5 to take advantage of the improved features and performance of HDF5.

Versions 1, 2, 3, and 4 of HDF were backward compatible, and HDF4 can access files from earlier versions.  HDF5 is a completely new format and library; conceptually related to but incompatible with HDF4 files and libraries.

This page provides pointers to information and software to help HDF4 users work with HDF5.


[ FAQ ] [ HDFView ]

Latest Official Release of H4 / H5 Conversion Library: 2.1
Tested with: HDF 4.2r4, HDF5-1.8.2

Conversion Library for HDF4/HDF5

A conversion library is available for converting between individual HDF4 and HDF5 objects. There are also h4toh5 and h5toh4 utilities available with the conversion library. These follow the HDF4 to HDF5 Mapping Specification listed under Related Information.
  • h4toh5 Utility:
      • Converts any HDF4 file to HDF5, using the default mappings. Can also convert an HDF-EOS2 file to an HDF5 file that can be accessed by netCDF-4.
  • h5toh4 Utility:
      • Converts an HDF5 file to HDF4.  (Not all objects can be converted, and it is NOT an inverse of h4toh5.)
  • H4 to H5 Conversion Library [ Description ] [ Documentation ]
      • Library to convert individual HDF4 objects into HDF5 objects.

Download Information:

Location of H4 to H5 software:  
http://hdfgroup.org/ftp/HDF5/h4toh5/

The software specified in the table below is under the location shown above.

Platform
Source Code
Binary Utilities
ALL Platforms h4h5tools-2.1.tar.gz ( README )  
Linux 2.6   h4toh5
h5toh4
verify ( README )
Linux 2.6 x86_64   h4toh5
h5toh4
verify ( README )
Solaris 10 (SunOS 5.10)   h4toh5
h5toh4
verify ( README )

Documentation:


Related Information

Differences between HDF4 and HDF5
  • HDF5 for HDF4 Users: A Short Guide (Dec. 2002)[pdf]
  • Table Comparing HDF4 and HDF5 Features
  • HDF4 and HDF5 Performance Preliminary Results (Slides)

  • HDF4 and HDF5 Compatibility and Transition

  • Transition from HDF5 for HDF4 Users: status and goals (Dec. 2002) [pdf]

  • Mapping HDF4 Objects to HDF5 Objects (Specification) (Oct. 2000) [pdf]
  • Transition from HDF4 to HDF5: Notes about Compatibility, Conversion, and Interoperability of HDF and HDF-EOS  (White paper) (Sep. 2000) [pdf]
  • Transition from HDF4 to HDF5: Issues   (Sep. 2000) (Slides)
  • Backward/Forward Compatibility

  • Technical Reports

  • Tests of the NCSA h4toh5 utility with NASA Datasets, August, 2001. [HTML]

  • This paper reports tests of the h4toh5 utility using real NASA data.  The utility converted files, usually in less than one second per file.  These results show that conversion of HDF4 files to HDF5 is feasible for large collections or on demand.

  • Conversion of from HDF4 to HDF5: "Hybrid" HDF-EOS Files, Feburary. 2002. [HTML]

  • In this experiment, the heconvert utility is augmented using the H4toH5 Library. In addition to the standard conversion of HDF-EOS objects, the experimental program identifies and converts non-EOS objects in an EOS dataset, creating a more complete HDFEOS5 file. In conclusion, this experiment shows that the H4toH5 Library provides a toolkit to more easily construct conversion utilities for NASA HDFEOS files.


    - - Last modified:May 10th 2009