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

Go to the source code of this file.

Functions

MTKt_status MtkFileAttrList (const char *filename, int *num_attrs, char **attrlist[])
 Get a list of file attributes. More...
 
MTKt_status MtkFileAttrListNC (const char *filename, int *num_attrs, char **attrlist[])
 
MTKt_status MtkFileAttrListHDF (const char *filename, int *num_attrs, char **attrlist[])
 
MTKt_status MtkFileAttrListFid (int32 sd_id, int *num_attrs, char **attrlist[])
 Version of MtkFileAttrList that takes an HDF SD file identifier rather than a filename. More...
 
MTKt_status MtkFileAttrListNcid (int ncid, int *num_attrs, char **attrlist[])
 

Function Documentation

◆ MtkFileAttrList()

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

Get a list of file attributes.

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

Definition at line 38 of file MtkFileAttrList.c.

◆ MtkFileAttrListFid()

MTKt_status MtkFileAttrListFid ( int32  sd_id,
int *  num_attrs,
char **  attrlist[] 
)

Version of MtkFileAttrList that takes an HDF SD file identifier rather than a filename.

Returns
MTK_SUCCESS if successful.
Parameters
[in]sd_idHDF SD file identifier
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 127 of file MtkFileAttrList.c.

◆ MtkFileAttrListHDF()

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

Definition at line 86 of file MtkFileAttrList.c.

◆ MtkFileAttrListNC()

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

Definition at line 51 of file MtkFileAttrList.c.

◆ MtkFileAttrListNcid()

MTKt_status MtkFileAttrListNcid ( int  ncid,
int *  num_attrs,
char **  attrlist[] 
)
Parameters
[in]ncidnetCDF File ID
[out]num_attrsNumber of attributes
[out]attrlistList of Attributes

Definition at line 181 of file MtkFileAttrList.c.


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