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

Functions

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...
 

Function Documentation

◆ 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]filenameFile name
[out]ngridsNumber of grids
[out]gridlistGrid 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]fidHDF-EOS file identifier
[out]ngridsNumber of grids
[out]gridlistGrid list

Definition at line 128 of file MtkFileToGridList.c.

◆ MtkFileToGridListHDF()

MTKt_status MtkFileToGridListHDF ( const char *  filename,
int *  ngrids,
char **  gridlist[] 
)
Parameters
[in]filenameFile name
[out]ngridsNumber of grids
[out]gridlistGrid list

Definition at line 89 of file MtkFileToGridList.c.

◆ MtkFileToGridListNC()

MTKt_status MtkFileToGridListNC ( const char *  filename,
int *  ngrids,
char **  gridlist[] 
)
Parameters
[in]filenameFile name
[out]ngridsNumber of grids
[out]gridlistGrid list

Definition at line 54 of file MtkFileToGridList.c.

◆ MtkFileToGridListNcid()

MTKt_status MtkFileToGridListNcid ( int  ncid,
int *  ngrids,
char **  gridlist[] 
)
Parameters
[in]ncidnetCDF File ID
[out]ngridsNumber of grids
[out]gridlistGrid list

Definition at line 200 of file MtkFileToGridList.c.


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