MISR Toolkit  1.5.1
Functions
MtkGridAttrList.c File Reference
#include "MisrFileQuery.h"
#include "MisrError.h"
#include <mfhdf.h>
#include <HdfEosDef.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

MTKt_status MtkGridAttrList (const char *filename, const char *gridname, int *num_attrs, char **attrlist[])
 Get a list of grid attributes. More...
 
MTKt_status MtkGridAttrListNC (const char *filename, const char *gridname, int *num_attrs, char **attrlist[])
 
MTKt_status MtkGridAttrListHDF (const char *filename, const char *gridname, int *num_attrs, char **attrlist[])
 
MTKt_status MtkGridAttrListFid (int32 fid, const char *gridname, int *num_attrs, char **attrlist[])
 Version of MtkGridAttrList that takes an HDF-EOS file identifier rather than a filename. More...
 
MTKt_status MtkGridAttrListNcid (int ncid, const char *gridname, int *num_attrs, char **attrlist[])
 

Function Documentation

◆ MtkGridAttrList()

MTKt_status MtkGridAttrList ( const char *  filename,
const char *  gridname,
int *  num_attrs,
char **  attrlist[] 
)

Get a list of grid attributes.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get a list of grid attributes in the RedBand grid from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkGridAttrList("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", "RedBand", &num_attrs, &attrlist);
Note
The caller is responsible for using MtkStringListFree() to free the memory used by attrlist
Parameters
[in]filenameFile name
[in]gridnameGrid name
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 39 of file MtkGridAttrList.c.

◆ MtkGridAttrListFid()

MTKt_status MtkGridAttrListFid ( int32  fid,
const char *  gridname,
int *  num_attrs,
char **  attrlist[] 
)

Version of MtkGridAttrList that takes an HDF-EOS file identifier rather than a filename.

Returns
MTK_SUCCESS if successful.
Parameters
[in]fidHDF-EOS file identifier
[in]gridnameGrid name
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 132 of file MtkGridAttrList.c.

◆ MtkGridAttrListHDF()

MTKt_status MtkGridAttrListHDF ( const char *  filename,
const char *  gridname,
int *  num_attrs,
char **  attrlist[] 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 89 of file MtkGridAttrList.c.

◆ MtkGridAttrListNC()

MTKt_status MtkGridAttrListNC ( const char *  filename,
const char *  gridname,
int *  num_attrs,
char **  attrlist[] 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 53 of file MtkGridAttrList.c.

◆ MtkGridAttrListNcid()

MTKt_status MtkGridAttrListNcid ( int  ncid,
const char *  gridname,
int *  num_attrs,
char **  attrlist[] 
)
Parameters
[in]ncidnetCDF File ID
[in]gridnameGrid name
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 212 of file MtkGridAttrList.c.


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