#include "MisrFileQuery.h"
#include "MisrUtil.h"
#include "MisrError.h"
#include <hdf.h>
#include <HdfEosDef.h>
#include <string.h>
#include <stdlib.h>
Go to the source code of this file.
|
MTKt_status | MtkFileGridFieldToDimList (const char *filename, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize) |
| Read dimension list of a particular field. More...
|
|
MTKt_status | MtkFileGridFieldToDimListNC (const char *filename, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize) |
|
MTKt_status | MtkFileGridFieldToDimListHDF (const char *filename, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize) |
|
MTKt_status | MtkFileGridFieldToDimListFid (int32 Fid, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize) |
| Version of MtkFileGridFieldToDimList that takes an HDF-EOS file ID rather than a filename. More...
|
|
MTKt_status | MtkFileGridFieldToDimListNcid (int ncid, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize) |
|
◆ MtkFileGridFieldToDimList()
MTKt_status MtkFileGridFieldToDimList |
( |
const char * |
filename, |
|
|
const char * |
gridname, |
|
|
const char * |
fieldname, |
|
|
int * |
dimcnt, |
|
|
char ** |
dimlist[], |
|
|
int ** |
dimsize |
|
) |
| |
Read dimension list of a particular field.
- Returns
- MTK_SUCCESS if successful.
- Example:
- In this example, we read the list of dimensions for the field
Blue Radiance/RDQI
in the grid BlueBand
in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
"Blue Radiance/RDQI", &dimcnt, &dimlist, &
dimsize);
- Note
- The caller is responsible for using MtkStringListFree() to free the memory used by
dimlist
and free() to free the memory used by dimsize
- Parameters
-
[in] | filename | File name |
[in] | gridname | Grid name |
[in] | fieldname | Field name |
[out] | dimcnt | Dimension count |
[out] | dimlist | Dimension list |
[out] | dimsize | Dimension size |
Definition at line 42 of file MtkFileGridFieldToDimList.c.
◆ MtkFileGridFieldToDimListFid()
MTKt_status MtkFileGridFieldToDimListFid |
( |
int32 |
Fid, |
|
|
const char * |
gridname, |
|
|
const char * |
fieldname, |
|
|
int * |
dimcnt, |
|
|
char ** |
dimlist[], |
|
|
int ** |
dimsize |
|
) |
| |
Version of MtkFileGridFieldToDimList 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] | fieldname | Field name |
[out] | dimcnt | Dimension count |
[out] | dimlist | Dimension list |
[out] | dimsize | Dimension size |
Definition at line 139 of file MtkFileGridFieldToDimList.c.
◆ MtkFileGridFieldToDimListHDF()
MTKt_status MtkFileGridFieldToDimListHDF |
( |
const char * |
filename, |
|
|
const char * |
gridname, |
|
|
const char * |
fieldname, |
|
|
int * |
dimcnt, |
|
|
char ** |
dimlist[], |
|
|
int ** |
dimsize |
|
) |
| |
- Parameters
-
[in] | filename | File name |
[in] | gridname | Grid name |
[in] | fieldname | Field name |
[out] | dimcnt | Dimension count |
[out] | dimlist | Dimension list |
[out] | dimsize | Dimension size |
Definition at line 96 of file MtkFileGridFieldToDimList.c.
◆ MtkFileGridFieldToDimListNC()
MTKt_status MtkFileGridFieldToDimListNC |
( |
const char * |
filename, |
|
|
const char * |
gridname, |
|
|
const char * |
fieldname, |
|
|
int * |
dimcnt, |
|
|
char ** |
dimlist[], |
|
|
int ** |
dimsize |
|
) |
| |
- Parameters
-
[in] | filename | File name |
[in] | gridname | Grid name |
[in] | fieldname | Field name |
[out] | dimcnt | Dimension count |
[out] | dimlist | Dimension list |
[out] | dimsize | Dimension size |
Definition at line 58 of file MtkFileGridFieldToDimList.c.
◆ MtkFileGridFieldToDimListNcid()
MTKt_status MtkFileGridFieldToDimListNcid |
( |
int |
ncid, |
|
|
const char * |
gridname, |
|
|
const char * |
fieldname, |
|
|
int * |
dimcnt, |
|
|
char ** |
dimlist[], |
|
|
int ** |
dimsize |
|
) |
| |
- Parameters
-
[in] | ncid | netCDF file identifier |
[in] | gridname | Grid name |
[in] | fieldname | Field name |
[out] | dimcnt | Dimension count |
[out] | dimlist | Dimension list |
[out] | dimsize | Dimension size |
Definition at line 268 of file MtkFileGridFieldToDimList.c.