#include "MisrFileQuery.h"
#include "MisrUtil.h"
#include "MisrError.h"
#include <hdf.h>
#include <HdfEosDef.h>
#include <string.h>
Go to the source code of this file.
|
MTKt_status | MtkFileGridToFieldList (const char *filename, const char *gridname, int *nfields, char **fieldlist[]) |
| Read list of fields from file. More...
|
|
MTKt_status | MtkFileGridToFieldListNC (const char *filename, const char *gridname, int *nfields, char **fieldlist[]) |
|
MTKt_status | MtkFileGridToFieldListHDF (const char *filename, const char *gridname, int *nfields, char **fieldlist[]) |
|
MTKt_status | MtkFileGridToFieldListFid (int32 Fid, const char *gridname, int *nfields, char **fieldlist[]) |
| Version of MtkFileGridToFieldList that takes an HDF-EOS file identifier rather than a filename. More...
|
|
MTKt_status | MtkFileGridToFieldListNcid (int ncid, const char *gridname, int *nfields, char **fieldlist[]) |
|
◆ MtkFileGridToFieldList()
MTKt_status MtkFileGridToFieldList |
( |
const char * |
filename, |
|
|
const char * |
gridname, |
|
|
int * |
nfields, |
|
|
char ** |
fieldlist[] |
|
) |
| |
Read list of fields from file.
- Returns
- MTK_SUCCESS if successful.
- Example:
- In this example, we read the list of fields from the file
MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
and the grid BlueBand
status =
MtkFileGridToFieldList(
"MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf",
"BlueBand", &nfields, &fieldlist);
- Note
- The caller is responsible for using MtkStringListFree() to free the memory used by fieldlist
- Parameters
-
[in] | filename | Filename |
[in] | gridname | Gridname |
[out] | nfields | Number of Fields |
[out] | fieldlist | List of Fields |
Definition at line 40 of file MtkFileGridToFieldList.c.
◆ MtkFileGridToFieldListFid()
MTKt_status MtkFileGridToFieldListFid |
( |
int32 |
Fid, |
|
|
const char * |
gridname, |
|
|
int * |
nfields, |
|
|
char ** |
fieldlist[] |
|
) |
| |
Version of MtkFileGridToFieldList 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 | Gridname |
[out] | nfields | Number of Fields |
[out] | fieldlist | List of Fields |
Definition at line 132 of file MtkFileGridToFieldList.c.
◆ MtkFileGridToFieldListHDF()
MTKt_status MtkFileGridToFieldListHDF |
( |
const char * |
filename, |
|
|
const char * |
gridname, |
|
|
int * |
nfields, |
|
|
char ** |
fieldlist[] |
|
) |
| |
- Parameters
-
[in] | filename | Filename |
[in] | gridname | Gridname |
[out] | nfields | Number of Fields |
[out] | fieldlist | List of Fields |
Definition at line 90 of file MtkFileGridToFieldList.c.
◆ MtkFileGridToFieldListNC()
MTKt_status MtkFileGridToFieldListNC |
( |
const char * |
filename, |
|
|
const char * |
gridname, |
|
|
int * |
nfields, |
|
|
char ** |
fieldlist[] |
|
) |
| |
- Parameters
-
[in] | filename | Filename |
[in] | gridname | Gridname |
[out] | nfields | Number of Fields |
[out] | fieldlist | List of Fields |
Definition at line 54 of file MtkFileGridToFieldList.c.
◆ MtkFileGridToFieldListNcid()
MTKt_status MtkFileGridToFieldListNcid |
( |
int |
ncid, |
|
|
const char * |
gridname, |
|
|
int * |
nfields, |
|
|
char ** |
fieldlist[] |
|
) |
| |
- Parameters
-
[in] | ncid | netCDF file identifier |
[in] | gridname | Gridname |
[out] | nfields | Number of Fields |
[out] | fieldlist | List of Fields |
Definition at line 355 of file MtkFileGridToFieldList.c.