#include "MisrFileQuery.h"
#include "MisrUtil.h"
#include "MisrError.h"
#include <hdf.h>
#include <HdfEosDef.h>
#include <string.h>
#include <stdio.h>
Go to the source code of this file.
|
MTKt_status | MtkFileToGridList (const char *filename, int *ngrids, char **gridlist[]) |
| Read list of grids from a file. More...
|
|
MTKt_status | MtkFileToGridListNC (const char *filename, int *ngrids, char **gridlist[]) |
|
MTKt_status | MtkFileToGridListHDF (const char *filename, int *ngrids, char **gridlist[]) |
|
MTKt_status | MtkFileToGridListFid (int32 fid, int *ngrids, char **gridlist[]) |
| Version of MtkFileToGridList that takes an HDF-EOS file identifier rather than a filename. More...
|
|
MTKt_status | MtkFileToGridListNcid (int ncid, int *ngrids, char **gridlist[]) |
|
int32 | GDinqgridfid (int32 fid, char *objectlist, int32 *strbufsize) |
| Replacement for HDF-EOS GDinqgrid that takes an HDF-EOS file id rather than a filename. More...
|
|
◆ GDinqgridfid()
int32 GDinqgridfid |
( |
int32 |
fid, |
|
|
char * |
objectlist, |
|
|
int32 * |
strbufsize |
|
) |
| |
Replacement for HDF-EOS GDinqgrid that takes an HDF-EOS file id rather than a filename.
- Note
- Code is copied from the HDF-EOS source file EHapi.c, function EHinquire.
- Returns
- MTK_SUCCESS if successful.
Definition at line 279 of file MtkFileToGridList.c.
◆ MtkFileToGridList()
MTKt_status MtkFileToGridList |
( |
const char * |
filename, |
|
|
int * |
ngrids, |
|
|
char ** |
gridlist[] |
|
) |
| |
Read list of grids from a file.
- Returns
- MTK_SUCCESS if successful.
- Example:
- In this example, we read the list of grids from the file
MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status =
MtkFileToGridList(
"MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", &ngrids, &gridlist);
- Note
- The caller is responsible for using MtkStringListFree() to free the memory used by
gridlist
- Parameters
-
[in] | filename | File name |
[out] | ngrids | Number of grids |
[out] | gridlist | Grid list |
Definition at line 41 of file MtkFileToGridList.c.
◆ MtkFileToGridListFid()
MTKt_status MtkFileToGridListFid |
( |
int32 |
fid, |
|
|
int * |
ngrids, |
|
|
char ** |
gridlist[] |
|
) |
| |
Version of MtkFileToGridList that takes an HDF-EOS file identifier rather than a filename.
- Returns
- MTK_SUCCESS if successful.
- Parameters
-
[in] | fid | HDF-EOS file identifier |
[out] | ngrids | Number of grids |
[out] | gridlist | Grid list |
Definition at line 128 of file MtkFileToGridList.c.
◆ MtkFileToGridListHDF()
MTKt_status MtkFileToGridListHDF |
( |
const char * |
filename, |
|
|
int * |
ngrids, |
|
|
char ** |
gridlist[] |
|
) |
| |
- Parameters
-
[in] | filename | File name |
[out] | ngrids | Number of grids |
[out] | gridlist | Grid list |
Definition at line 89 of file MtkFileToGridList.c.
◆ MtkFileToGridListNC()
MTKt_status MtkFileToGridListNC |
( |
const char * |
filename, |
|
|
int * |
ngrids, |
|
|
char ** |
gridlist[] |
|
) |
| |
- Parameters
-
[in] | filename | File name |
[out] | ngrids | Number of grids |
[out] | gridlist | Grid list |
Definition at line 54 of file MtkFileToGridList.c.
◆ MtkFileToGridListNcid()
MTKt_status MtkFileToGridListNcid |
( |
int |
ncid, |
|
|
int * |
ngrids, |
|
|
char ** |
gridlist[] |
|
) |
| |
- Parameters
-
[in] | ncid | netCDF File ID |
[out] | ngrids | Number of grids |
[out] | gridlist | Grid list |
Definition at line 200 of file MtkFileToGridList.c.