#include "MisrFileQuery.h"
#include "MisrUtil.h"
#include "MisrError.h"
#include <mfhdf.h>
#include <HdfEosDef.h>
Go to the source code of this file.
|
MTKt_status | MtkFileAttrGet (const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf) |
| Get a file attribute. More...
|
|
MTKt_status | MtkFileAttrGetNC (const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf) |
|
MTKt_status | MtkFileAttrGetHDF (const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf) |
|
MTKt_status | MtkFileAttrGetFid (int32 sds_id, const char *attrname, MTKt_DataBuffer *attrbuf) |
| Version of MtkFileAttrGet that takes an HDF SD file identifier rather than a filename. More...
|
|
MTKt_status | MtkFileAttrGetNcid (int ncid, const char *attrname, MTKt_DataBuffer *attrbuf) |
|
◆ MtkFileAttrGet()
Get a file attribute.
- Returns
- MTK_SUCCESS if successful.
- Example:
- In this example, we get the
Camera
attribute from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status =
MtkFileAttrGet(
"MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf",
"Camera", &attrbuf);
- Note
- The caller is responsible for using MtkDataBufferFree() to free the memory used by
attrbuf
- Parameters
-
[in] | filename | File name |
[in] | attrname | Attribute name |
[out] | attrbuf | Attribute value |
Definition at line 38 of file MtkFileAttrGet.c.
◆ MtkFileAttrGetFid()
Version of MtkFileAttrGet that takes an HDF SD file identifier rather than a filename.
- Returns
- MTK_SUCCESS if successful.
- Parameters
-
[in] | sds_id | HDF SD file identifier |
[in] | attrname | Attribute name |
[out] | attrbuf | Attribute value |
Definition at line 127 of file MtkFileAttrGet.c.
◆ MtkFileAttrGetHDF()
- Parameters
-
[in] | filename | File name |
[in] | attrname | Attribute name |
[out] | attrbuf | Attribute value |
Definition at line 86 of file MtkFileAttrGet.c.
◆ MtkFileAttrGetNC()
- Parameters
-
[in] | filename | File name |
[in] | attrname | Attribute name |
[out] | attrbuf | Attribute value |
Definition at line 51 of file MtkFileAttrGet.c.
◆ MtkFileAttrGetNcid()
- Parameters
-
[in] | ncid | netCDF File ID |
[in] | attrname | Attribute name |
[out] | attrbuf | Attribute value |
Definition at line 181 of file MtkFileAttrGet.c.