#include "MisrFileQuery.h"
#include "MisrError.h"
#include <mfhdf.h>
#include <HdfEosDef.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
|
MTKt_status | MtkGridAttrList (const char *filename, const char *gridname, int *num_attrs, char **attrlist[]) |
| Get a list of grid attributes. More...
|
|
MTKt_status | MtkGridAttrListNC (const char *filename, const char *gridname, int *num_attrs, char **attrlist[]) |
|
MTKt_status | MtkGridAttrListHDF (const char *filename, const char *gridname, int *num_attrs, char **attrlist[]) |
|
MTKt_status | MtkGridAttrListFid (int32 fid, const char *gridname, int *num_attrs, char **attrlist[]) |
| Version of MtkGridAttrList that takes an HDF-EOS file identifier rather than a filename. More...
|
|
MTKt_status | MtkGridAttrListNcid (int ncid, const char *gridname, int *num_attrs, char **attrlist[]) |
|
◆ MtkGridAttrList()
MTKt_status MtkGridAttrList |
( |
const char * |
filename, |
|
|
const char * |
gridname, |
|
|
int * |
num_attrs, |
|
|
char ** |
attrlist[] |
|
) |
| |
Get a list of grid attributes.
- Returns
- MTK_SUCCESS if successful.
- Example:
- In this example, we get a list of grid attributes in the
RedBand
grid from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status =
MtkGridAttrList(
"MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf",
"RedBand", &num_attrs, &attrlist);
- Note
- The caller is responsible for using MtkStringListFree() to free the memory used by attrlist
- Parameters
-
[in] | filename | File name |
[in] | gridname | Grid name |
[out] | num_attrs | Number of attributes |
[out] | attrlist | List of Attributes |
Definition at line 39 of file MtkGridAttrList.c.
◆ MtkGridAttrListFid()
MTKt_status MtkGridAttrListFid |
( |
int32 |
fid, |
|
|
const char * |
gridname, |
|
|
int * |
num_attrs, |
|
|
char ** |
attrlist[] |
|
) |
| |
Version of MtkGridAttrList that takes an HDF-EOS file identifier rather than a filename.
- Returns
- MTK_SUCCESS if successful.
- Parameters
-
[in] | fid | HDF-EOS file identifier |
[in] | gridname | Grid name |
[out] | num_attrs | Number of attributes |
[out] | attrlist | List of Attributes |
Definition at line 132 of file MtkGridAttrList.c.
◆ MtkGridAttrListHDF()
MTKt_status MtkGridAttrListHDF |
( |
const char * |
filename, |
|
|
const char * |
gridname, |
|
|
int * |
num_attrs, |
|
|
char ** |
attrlist[] |
|
) |
| |
- Parameters
-
[in] | filename | File name |
[in] | gridname | Grid name |
[out] | num_attrs | Number of attributes |
[out] | attrlist | List of Attributes |
Definition at line 89 of file MtkGridAttrList.c.
◆ MtkGridAttrListNC()
MTKt_status MtkGridAttrListNC |
( |
const char * |
filename, |
|
|
const char * |
gridname, |
|
|
int * |
num_attrs, |
|
|
char ** |
attrlist[] |
|
) |
| |
- Parameters
-
[in] | filename | File name |
[in] | gridname | Grid name |
[out] | num_attrs | Number of attributes |
[out] | attrlist | List of Attributes |
Definition at line 53 of file MtkGridAttrList.c.
◆ MtkGridAttrListNcid()
MTKt_status MtkGridAttrListNcid |
( |
int |
ncid, |
|
|
const char * |
gridname, |
|
|
int * |
num_attrs, |
|
|
char ** |
attrlist[] |
|
) |
| |
- Parameters
-
[in] | ncid | netCDF File ID |
[in] | gridname | Grid name |
[out] | num_attrs | Number of attributes |
[out] | attrlist | List of Attributes |
Definition at line 212 of file MtkGridAttrList.c.