Edit HDF5 file?


I have several HDF 5 files created by the USGS NEON Airborne Observation Program (https://www.neonscience.org/data-collection/airborne-remote-sensing). The data set contains remote sensing imagery collected from an aircraft using imaging spectroscopy. It contains a number of metadata files, some ancillary data, and a large subdataset that contains the actual hyperspectral image data. Using the HDF tool, I can open the file, look at all the data, and even see the raw reflectance values in tabular format. The problem is that I need to save the image as a GeoTIFF file. Normally, the GDAL function GDAL_Translate will handle this problem, but apparently it needs to dimension of the image to be expressed as bands x row x columns. This image is cols x rows x bands. When I open the image sub data set, I can see that it’s in this order. Is there any way to edit the metadata information in the image component to change this, so that GDAL_Translate will understand the input format?


I thought the hdfview tool permitted editing of existing objects. If, however, it permits only adding or deleting objects, then another option would be to create an object that is essentially a symlink (look at “new link dialog box” in the above reference) to the raw data but structured in the way your conversion tool needs it. Then, have the conversion tool operate on the symlink’d object instead of the original. Hope that helps