|
#1
|
|||
|
|||
|
HDF-EOS files from major data producers almost always have detailed metadata inside them stored as ODL strings. However, there is no published way within the HDF-EOS API to access most of this data. The
HDF-EOS libraries store some of their own internal metadata in an ODL element (named StructMetadata.[0-9]), and the API gives you access to the data in that, but the metadata showing details like when, where and how the data was gathered is not accessible. Our group would like to have access to this metadata from within the HDF-EOS API, primarily because it would mean our various format conversion tools could then move *all* standard HDF-EOS metadata between formats. Currently the only way to read this metadata from an HDF-EOS file is to open it using HDF primitives and navigate to the internal location of the metadata. This is annoying, requires knowledge of HDF-EOS internals, and can be dangerous - the HDF-EOS libraries use HDF primitives internally, so using those primitives in addition to the API calls runs the risk of damaging a file's format internally. We suggest an addition to the HDF-EOS API for reading and writing this metadata, something like this: herr_t HE5_EHinquireODL(hid_t fileID, char *groupnames, long *groupbufsize) Queries the open HDF-EOS file associated with fileID, and writes a comma-separated list of its ODL group names into the groupnames buffer, and the length of the buffer into groupbufsize. herr_t HE5_EHreadODL(hid_t fileID, const char *metagroup, char *metabuffer, long *metasize) Fetches the ODL metadata in metagroup, writes it into metabuffer, and writes its length in bytes into metasize. herr_t HR5_EHwriteODL(hid_t fileID, const char *metagroup, const char *ODLout) Writes the ODL metadata in the ODLout buffer into the group named by metagroup. These should have the standard HDF-EOS API behavior (passing NULL as an output buffer parameter means don't send the output), and should probably treat the StructMetadata group as a special case (it should definitely not be writable, perhaps not readable or visible to inquiry either). |