I am reading an HDF-EOS swath file with HDFEOS2 built with HDF4, and I want to read the attributes of a data field such as the valid range, fill value, and scale factor. The file has this structure:
- Swath
- Data Field (e.g. Radiance)
- Valid Range
- Fill Value
- Scale Factor
- Data Field (e.g. Radiance)
I can read the data fields just fine, that is the radiance data in the example, using swattach
and swrdfld
. But I do not know how to proceed from there. I have also been reading this reference guide (https://ccplot.org/pub/resources/HDF/HDF-EOS%20Library%20User’s%20Guide,%20Volume%202:%20Function%20Reference%20Guide.pdf) but there doesn’t seem to be a direct function of retrieving the attributes. Although I can hard-code these values into my code, I want to give my code some flexibility in the event that the attributes change due updates/changes in the HDF-EOS file.
Is there a way to retrieve these information?