MISR Toolkit  1.5.1
Functions
MtkFileGridToFieldList.c File Reference
#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.

Functions

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[])
 

Function Documentation

◆ 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]filenameFilename
[in]gridnameGridname
[out]nfieldsNumber of Fields
[out]fieldlistList 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]FidHDF-EOS file identifier
[in]gridnameGridname
[out]nfieldsNumber of Fields
[out]fieldlistList 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]filenameFilename
[in]gridnameGridname
[out]nfieldsNumber of Fields
[out]fieldlistList 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]filenameFilename
[in]gridnameGridname
[out]nfieldsNumber of Fields
[out]fieldlistList 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]ncidnetCDF file identifier
[in]gridnameGridname
[out]nfieldsNumber of Fields
[out]fieldlistList of Fields

Definition at line 355 of file MtkFileGridToFieldList.c.


MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:53