#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 | MtkFieldAttrList (const char *filename, const char *fieldname, int *num_attrs, char **attrlist[]) |
| Get a list of field attributes. More...
|
|
MTKt_status | MtkFieldAttrListNC (const char *filename, const char *fieldname, int *num_attrs, char **attrlist[]) |
|
MTKt_status | MtkFieldAttrListHDF (const char *filename, const char *fieldname, int *num_attrs, char **attrlist[]) |
|
MTKt_status | MtkFieldAttrListFid (int32 fid, const char *fieldname, int *num_attrs, char **attrlist[]) |
| Version of MtkFieldAttrList that takes an HDF-EOS file identifier rather than a filename. More...
|
|
MTKt_status | MtkFieldAttrListNcid (int ncid, const char *fieldname, int *num_attrs, char **attrlist[]) |
|
◆ MtkFieldAttrList()
MTKt_status MtkFieldAttrList |
( |
const char * |
filename, |
|
|
const char * |
fieldname, |
|
|
int * |
num_attrs, |
|
|
char ** |
attrlist[] |
|
) |
| |
Get a list of field attributes.
- Returns
- MTK_SUCCESS if successful.
- Example:
- In this example, we get a list of field attributes in the
CloudTopHeight
field within the Stereo_1.1_km grid from the file MISR_AM1_TC_CLOUD_P110_O074017_F01_0001.hdf
status =
MtkFieldAttrList(
"MISR_AM1_TC_CLOUD_P110_O074017_F01_0001.hdf",
"Stereo_1.1_km",
"CloudTopHeight", &num_attrs, &attrlist);
- Note
- The caller is responsible for using MtkStringListFree() to free the memory used by attrlist
- Parameters
-
[in] | filename | File name |
[in] | fieldname | Field name |
[out] | num_attrs | Number of attributes |
[out] | attrlist | List of Attributes |
Definition at line 39 of file MtkFieldAttrList.c.
◆ MtkFieldAttrListFid()
MTKt_status MtkFieldAttrListFid |
( |
int32 |
fid, |
|
|
const char * |
fieldname, |
|
|
int * |
num_attrs, |
|
|
char ** |
attrlist[] |
|
) |
| |
Version of MtkFieldAttrList that takes an HDF-EOS file identifier rather than a filename.
- Returns
- MTK_SUCCESS if successful.
- Parameters
-
[in] | fid | HDF-EOS file identifier |
[in] | fieldname | Field name |
[out] | num_attrs | Number of attributes |
[out] | attrlist | List of Attributes |
Definition at line 133 of file MtkFieldAttrList.c.
◆ MtkFieldAttrListHDF()
MTKt_status MtkFieldAttrListHDF |
( |
const char * |
filename, |
|
|
const char * |
fieldname, |
|
|
int * |
num_attrs, |
|
|
char ** |
attrlist[] |
|
) |
| |
- Parameters
-
[in] | filename | File name |
[in] | fieldname | Field name |
[out] | num_attrs | Number of attributes |
[out] | attrlist | List of Attributes |
Definition at line 90 of file MtkFieldAttrList.c.
◆ MtkFieldAttrListNC()
MTKt_status MtkFieldAttrListNC |
( |
const char * |
filename, |
|
|
const char * |
fieldname, |
|
|
int * |
num_attrs, |
|
|
char ** |
attrlist[] |
|
) |
| |
- Parameters
-
[in] | filename | File name |
[in] | fieldname | Field name |
[out] | num_attrs | Number of attributes |
[out] | attrlist | List of Attributes |
Definition at line 53 of file MtkFieldAttrList.c.
◆ MtkFieldAttrListNcid()
MTKt_status MtkFieldAttrListNcid |
( |
int |
ncid, |
|
|
const char * |
fieldname, |
|
|
int * |
num_attrs, |
|
|
char ** |
attrlist[] |
|
) |
| |
- Parameters
-
[in] | ncid | netCDF File ID |
[in] | fieldname | Field name |
[out] | num_attrs | Number of attributes |
[out] | attrlist | List of Attributes |
Definition at line 199 of file MtkFieldAttrList.c.