Can I convert HDF4 data to HDF5 and vice versa?

(Source: National Center for Supercomputing Applications (NCSA's) HDF5 FAQ web page (no date). Retrieved May 16, 2003, from http://hdf.ncsa.uiuc.edu/h5h4-diff.html)

HDF4 to HDF5

Almost all HDF4 objects can be conceptually mapped to equivalent HDF5 objects. See the H4 to H5 Mapping Specification (pdf). The h4toh5 utility converts all the objects in an HDF4 file to a default HDF5 file. The H4 to H5 library provides a conversion for individual objects.

It is important to realize, though, that a default conversion preserves the design of the HDF4 file, which may not be an optimal design for the resulting HDF5 file. The H4 to H5 library can help users convert HDF4 objects to create the HDF5 file they want.

HDF5 to HDF4

Some objects in an HDF5 file can be conceptually mapped to equivalent HDF4 objects. See the H4 to H5 Mapping Specification (pdf). However, HDF5 has many more possibilities than HDF4, so many HDF5 objects simply cannot be translated to HDF4. Also, some objects might be converted to more than one possible HDF4 object, depending on the intention of the creator.

The h5toh4 utility can convert some of the objects of an HDF5 file to a default HDF4 file.


For more information on converting between HDF4 and HDF5, please visit NCSA's Converting between HDF (4.x) and HDF5 web site..