#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 | MtkGridAttrGet (const char *filename, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf) |
| Get a grid attribute. More...
|
|
MTKt_status | MtkGridAttrGetNC (const char *filename, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf) |
|
MTKt_status | MtkGridAttrGetHDF (const char *filename, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf) |
|
MTKt_status | MtkGridAttrGetFid (int32 fid, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf) |
| Version of MtkFileGridAttrGet that takes an HDF-EOS file ID rather than a filename. More...
|
|
MTKt_status | MtkGridAttrGetNcid (int ncid, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf) |
|
◆ MtkGridAttrGet()
Get a grid attribute.
- Returns
- MTK_SUCCESS if successful.
- Example:
- In this example, we get the
Block_size.resolution_x
attribute from the BlueBand
grid in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status =
MtkGridAttrGet(
"MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf",
"BlueBand",
"Block_size.resolution_x", &attrbuf);
- Note
- The caller is responsible for using MtkDataBufferFree() to free the memory used by attrbuf
- Parameters
-
[in] | filename | File name |
[in] | gridname | Grid name |
[in] | attrname | Attribute name |
[out] | attrbuf | Attribute value |
Definition at line 39 of file MtkGridAttrGet.c.
◆ MtkGridAttrGetFid()
Version of MtkFileGridAttrGet that takes an HDF-EOS file ID rather than a filename.
- Returns
- MTK_SUCCESS if successful.
- Parameters
-
[in] | fid | HDF-EOS File ID |
[in] | gridname | Grid name |
[in] | attrname | Attribute name |
[out] | attrbuf | Attribute value |
Definition at line 123 of file MtkGridAttrGet.c.
◆ MtkGridAttrGetHDF()
- Parameters
-
[in] | filename | File name |
[in] | gridname | Grid name |
[in] | attrname | Attribute name |
[out] | attrbuf | Attribute value |
Definition at line 89 of file MtkGridAttrGet.c.
◆ MtkGridAttrGetNC()
- Parameters
-
[in] | filename | File name |
[in] | gridname | Grid name |
[in] | attrname | Attribute name |
[out] | attrbuf | Attribute value |
Definition at line 53 of file MtkGridAttrGet.c.
◆ MtkGridAttrGetNcid()
- Parameters
-
[in] | ncid | netCDF File ID |
[in] | gridname | Grid name |
[in] | attrname | Attribute name |
[out] | attrbuf | Attribute value |
Definition at line 170 of file MtkGridAttrGet.c.