MISR Toolkit  1.5.1
Data Structures | Macros | Typedefs | Enumerations | Functions
MisrFileQuery.h File Reference
#include "MisrError.h"
#include "MisrUtil.h"
#include "MisrProjParam.h"

Go to the source code of this file.

Data Structures

struct  MtkCoreMetaData
 Core Metadata. More...
 
struct  MTKt_TimeMetaData
 Time Metadata. More...
 

Macros

#define MTKT_FILE_TYPE_DESC
 
#define MTK_CORE_METADATA_INIT   { {NULL}, 0, MTKMETA_CHAR, NULL }
 
#define NGRIDCELL   2
 
#define MTKT_TIME_METADATA_INIT
 

Typedefs

typedef enum MTKt_FileType MTKt_FileType
 
typedef struct MtkCoreMetaData MtkCoreMetaData
 Core Metadata. More...
 
typedef struct MTKt_TimeMetaData MTKt_TimeMetaData
 Time Metadata. More...
 

Enumerations

enum  MTKt_FileType {
  MTK_AGP,
  MTK_GP_GMP,
  MTK_GRP_RCCM,
  MTK_GRP_ELLIPSOID_GM,
  MTK_GRP_TERRAIN_GM,
  MTK_GRP_ELLIPSOID_LM,
  MTK_GRP_TERRAIN_LM,
  MTK_AS_AEROSOL,
  MTK_AS_LAND,
  MTK_TC_ALBEDO,
  MTK_TC_CLASSIFIERS,
  MTK_TC_STEREO,
  MTK_PP,
  MTK_CONVENTIONAL,
  MTK_UNKNOWN,
  MTK_TC_CLOUD,
  MTK_HR_BRF,
  MTK_HR_RPV,
  MTK_HR_TIP,
  MTK_CMV_NRT
}
 

Functions

MTKt_status MtkFileToPath (const char *filename, int *path)
 Read path number from file. More...
 
MTKt_status MtkFileToPathNC (const char *filename, int *path)
 
MTKt_status MtkFileToPathHDF (const char *filename, int *path)
 
MTKt_status MtkFileToPathFid (int32 sid, int *path)
 Version of MtkFileToPath that takes an HDF SD identifier rather than a filename. More...
 
MTKt_status MtkFileToPathNcid (int ncid, int *path)
 
MTKt_status MtkFileToOrbit (const char *filename, int *orbit)
 Read orbit number from file. More...
 
MTKt_status MtkFileToOrbitNC (const char *filename, int *orbit)
 
MTKt_status MtkFileToOrbitHDF (const char *filename, int *orbit)
 
MTKt_status MtkFileToOrbitFid (int32 sd_id, int *orbit)
 Version of MtkFileToOrbit that takes an HDF SD file identifier rather than a filename. More...
 
MTKt_status MtkFileToOrbitNcid (int ncid, int *orbit)
 
MTKt_status MtkFileToBlockRange (const char *filename, int *start_block, int *end_block)
 Read start and end block numbers from file. More...
 
MTKt_status MtkFileToBlockRangeNC (const char *filename, int *start_block, int *end_block)
 
MTKt_status MtkFileToBlockRangeHDF (const char *filename, int *start_block, int *end_block)
 
MTKt_status MtkFileToBlockRangeFid (int32 sid, int *start_block, int *end_block)
 Version of MtkFileToBlockRange that takes an HDF SD file identifier rather than a filename. More...
 
MTKt_status MtkFileToBlockRangeNcid (int ncid, int *start_block, int *end_block)
 
MTKt_status MtkFileGridToResolution (const char *filename, const char *gridname, int *resolution)
 Get resolution of a particular grid. More...
 
MTKt_status MtkFileGridToResolutionNC (const char *filename, const char *gridname, int *resolution)
 
MTKt_status MtkFileGridToResolutionHDF (const char *filename, const char *gridname, int *resolution)
 
MTKt_status MtkFileGridToResolutionFid (int32 fid, const char *gridname, int *resolution)
 Version of MtkFileGridToResolution that takes an HDF-EOS file id rather than a filename. More...
 
MTKt_status MtkFileGridToResolutionNcid (int ncid, const char *gridname, int *resolution)
 
MTKt_status MtkFileGridFieldToDataType (const char *filename, const char *gridname, const char *fieldname, MTKt_DataType *datatype)
 Find data type for a particular field. More...
 
MTKt_status MtkFileGridFieldToDataTypeNC (const char *filename, const char *gridname, const char *fieldname, MTKt_DataType *datatype)
 
MTKt_status MtkFileGridFieldToDataTypeHDF (const char *filename, const char *gridname, const char *fieldname, MTKt_DataType *datatype)
 
MTKt_status MtkFileGridFieldToDataTypeFid (int32 fid, const char *gridname, const char *fieldname, MTKt_DataType *datatype)
 Version of MtkFileGridFieldToDataType that takes an HDF-EOS file id rather than a filename. More...
 
MTKt_status MtkFileGridFieldToDataTypeNcid (int ncid, const char *gridname, const char *fieldname, MTKt_DataType *datatype)
 
MTKt_status MtkFillValueGet (const char *filename, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
 Get fill value. More...
 
MTKt_status MtkFillValueGetNC (const char *filename, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
 
MTKt_status MtkFillValueGetHDF (const char *filename, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
 
MTKt_status MtkFillValueGetFid (int32 fid, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
 Version of MtkFillValueGet that takes an HDF-EOS file ID rather than a filename. More...
 
MTKt_status MtkFillValueGetNcid (int ncid, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
 
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...
 
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[])
 
MTKt_status MtkFileGridToNativeFieldList (const char *filename, const char *gridname, int *nfields, char **fieldlist[])
 Read list of native fields from file (excludes derived fields) More...
 
MTKt_status MtkFileGridToNativeFieldListNC (const char *filename, const char *gridname, int *nfields, char **fieldlist[])
 
MTKt_status MtkFileGridToNativeFieldListHDF (const char *filename, const char *gridname, int *nfields, char **fieldlist[])
 
MTKt_status MtkFileGridToNativeFieldListFid (int32 Fid, const char *gridname, int *nfields, char **fieldlist[])
 Version of MtkFileGridToNativeFieldList that takes an HDF-EOS file identifier rather than a filename. More...
 
MTKt_status MtkFileGridToNativeFieldListNcid (int ncid, const char *gridname, int *nfields, char **fieldlist[])
 
MTKt_status MtkMakeFilename (const char *basedir, const char *product, const char *camera, int path, int orbit, const char *version, char **filename)
 Given a base directory, product, camera, path, orbit, version. More...
 
MTKt_status MtkFindFileList (const char *searchdir, const char *product, const char *camera, const char *path, const char *orbit, const char *version, int *filecnt, char **filenames[])
 Find files in a directory tree, using regular expressions. More...
 
MTKt_status MtkFileLGID (const char *filename, char **lgid)
 Determine local granual ID of MISR product file. More...
 
MTKt_status MtkFileLGIDNC (const char *filename, char **lgid)
 
MTKt_status MtkFileLGIDHDF (const char *filename, char **lgid)
 
MTKt_status MtkFileLGIDFid (int32 sds_id, char **lgid)
 Version of MtkFileLGID that takes an HDF SDS ID rather than a filename. More...
 
MTKt_status MtkFileLGIDNcid (int ncid, char **lgid)
 
MTKt_status MtkFileType (const char *filename, MTKt_FileType *filetype)
 Determine MISR product file type. More...
 
MTKt_status MtkFileTypeNC (const char *filename, MTKt_FileType *filetype)
 
MTKt_status MtkFileTypeHDF (const char *filename, MTKt_FileType *filetype)
 
MTKt_status MtkFileTypeFid (int32 Fid, MTKt_FileType *filetype)
 Version of MtkFileType that takes an HDF-EOS file identifier rather than a filename. More...
 
MTKt_status MtkFileTypeNcid (int ncid, MTKt_FileType *filetype)
 
MTKt_status MtkFileVersion (const char *filename, char *fileversion)
 Determine MISR product file version. More...
 
MTKt_status MtkFileVersionNC (const char *filename, char *fileversion)
 
MTKt_status MtkFileVersionHDF (const char *filename, char *fileversion)
 
MTKt_status MtkFileVersionFid (int32 sd_id, char *fileversion)
 Version of MtkFileVersion that takes an HDF SD file identifier rather than a filename. More...
 
MTKt_status MtkFileVersionNcid (int ncid, char *fileversion)
 
MTKt_status MtkGridAttrGet (const char *filename, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf)
 Get a grid attribute. More...
 
MTKt_status MtkGridAttrGetNC (const char *filename, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf)
 
MTKt_status MtkGridAttrGetHDF (const char *filename, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf)
 
MTKt_status MtkGridAttrGetFid (int32 fid, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf)
 Version of MtkFileGridAttrGet that takes an HDF-EOS file ID rather than a filename. More...
 
MTKt_status MtkGridAttrGetNcid (int ncid, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf)
 
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)
 
MTKt_status MtkFileCoreMetaDataRaw (const char *filename, char **coremeta)
 Read core metadata from a MISR product file into a buffer. More...
 
MTKt_status MtkFileCoreMetaDataRawNC (const char *filename, char **coremeta)
 
MTKt_status MtkFileCoreMetaDataRawHDF (const char *filename, char **coremeta)
 
MTKt_status MtkFileCoreMetaDataRawFid (int32 sds_id, char **coremeta)
 Version of MtkFileCoreMetaDataRaw that takes an HDF SD file identifier rather than a filename. More...
 
MTKt_status MtkFileCoreMetaDataRawNcid (int ncid, char **coremeta)
 
MTKt_status MtkFileCoreMetaDataQuery (const char *filename, int *nparam, char ***paramlist)
 Query file for core metadata. More...
 
MTKt_status MtkFileCoreMetaDataQueryNC (const char *filename, int *nparam, char ***paramlist)
 
MTKt_status MtkFileCoreMetaDataQueryHDF (const char *filename, int *nparam, char ***paramlist)
 
MTKt_status MtkFileCoreMetaDataQueryFid (int32 sd_id, int *nparam, char ***paramlist)
 Version of MtkFileCoreMetaDataQuery that takes an HDF SD file identifier rather than a filename. More...
 
MTKt_status MtkFileCoreMetaDataQueryNcid (int ncid, int *nparam, char ***paramlist)
 
MTKt_status MtkFileCoreMetaDataGet (const char *filename, const char *param, MtkCoreMetaData *metadata)
 Get core metadata parameter. More...
 
MTKt_status MtkFileCoreMetaDataGetNC (const char *filename, const char *param, MtkCoreMetaData *metadata)
 
MTKt_status MtkFileCoreMetaDataGetHDF (const char *filename, const char *param, MtkCoreMetaData *metadata)
 
MTKt_status MtkFileCoreMetaDataGetFid (int32 sd_id, const char *param, MtkCoreMetaData *metadata)
 Version of MtkFileCoreMetaDataGet that takes an HDF SD identifier rather than a filename. More...
 
MTKt_status MtkFileCoreMetaDataGetNcid (int ncid, const char *param, MtkCoreMetaData *metadata)
 
MTKt_status MtkCoreMetaDataFree (MtkCoreMetaData *metadata)
 Free core metadata. More...
 
MTKt_status MtkFileAttrGet (const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf)
 Get a file attribute. More...
 
MTKt_status MtkFileAttrGetHDF (const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf)
 
MTKt_status MtkFileAttrGetNC (const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf)
 
MTKt_status MtkFileAttrGetFid (int32 sds_id, const char *attrname, MTKt_DataBuffer *attrbuf)
 Version of MtkFileAttrGet that takes an HDF SD file identifier rather than a filename. More...
 
MTKt_status MtkFileAttrGetNcid (int ncid, const char *attrname, MTKt_DataBuffer *attrbuf)
 
MTKt_status MtkFileGridFieldCheck (const char *filename, const char *gridname, const char *fieldname)
 Check if file/grid/field/dimension are valid. More...
 
MTKt_status MtkFileGridFieldCheckNC (const char *filename, const char *gridname, const char *fieldname)
 
MTKt_status MtkFileGridFieldCheckHDF (const char *filename, const char *gridname, const char *fieldname)
 
MTKt_status MtkFileGridFieldCheckFid (int32 Fid, const char *gridname, const char *fieldname)
 Version of MtkFileGridFieldCheck that takes an HDF-EOS file identifier rather than a filename. More...
 
MTKt_status MtkFileGridFieldCheckNcid (int ncid, const char *gridname, const char *fieldname)
 
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[])
 
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[])
 
MTKt_status MtkFieldAttrList (const char *filename, const char *fieldname, int *num_attrs, char **attrlist[])
 Get a list of field attributes. More...
 
MTKt_status MtkFieldAttrListNC (const char *filename, const char *fieldname, int *num_attrs, char **attrlist[])
 
MTKt_status MtkFieldAttrListHDF (const char *filename, const char *fieldname, int *num_attrs, char **attrlist[])
 
MTKt_status MtkFieldAttrListFid (int32 fid, const char *fieldname, int *num_attrs, char **attrlist[])
 Version of MtkFieldAttrList that takes an HDF-EOS file identifier rather than a filename. More...
 
MTKt_status MtkFieldAttrListNcid (int ncid, const char *fieldname, int *num_attrs, char **attrlist[])
 
MTKt_status MtkFieldAttrGet (const char *filename, const char *fieldname, const char *attrname, MTKt_DataBuffer *attrbuf)
 Get a file attribute. More...
 
MTKt_status MtkFieldAttrGetNC (const char *filename, const char *fieldname, const char *attrname, MTKt_DataBuffer *attrbuf)
 
MTKt_status MtkFieldAttrGetHDF (const char *filename, const char *fieldname, const char *attrname, MTKt_DataBuffer *attrbuf)
 
MTKt_status MtkFieldAttrGetFid (int32 sds_id, const char *fieldname, const char *attrname, MTKt_DataBuffer *attrbuf)
 Version of MtkFieldAttrGet that takes an HDF SD file identifier rather than a filename. More...
 
MTKt_status MtkFieldAttrGetNcid (int ncid, const char *fieldname, const char *attrname, MTKt_DataBuffer *attrbuf)
 
MTKt_status MtkFileBlockMetaList (const char *filename, int *nblockmeta, char ***blockmetalist)
 List block metadata structures. More...
 
MTKt_status MtkFileBlockMetaListFid (int32 file_id, int *nblockmeta, char ***blockmetalist)
 Version of MtkFileBlockMetaList that takes an HDF file identifier rather than a filename. More...
 
MTKt_status MtkFileBlockMetaFieldList (const char *filename, const char *blockmetaname, int *nfields, char **fieldlist[])
 Read list of fields in a block metadata structure. More...
 
MTKt_status MtkFileBlockMetaFieldListFid (int32 file_id, const char *blockmetaname, int *nfields, char **fieldlist[])
 Version of MtkFileBlockMetaFieldList that takes an HDF file identifier rather than a filename. More...
 
MTKt_status MtkFileBlockMetaFieldRead (const char *filename, const char *blockmetaname, const char *fieldname, MTKt_DataBuffer *blockmetabuf)
 Read a block metadata field. More...
 
MTKt_status MtkFileBlockMetaFieldReadFid (int32 file_id, const char *blockmetaname, const char *fieldname, MTKt_DataBuffer *blockmetabuf)
 Version of MtkFileBlockMetaFileRead that takes an HDF file identifier rather than a filename. More...
 
MTKt_status MtkTimeMetaRead (const char *filename, MTKt_TimeMetaData *time_metadata)
 Read time metadata from L1B2 Ellipsoid product file. More...
 
MTKt_status MtkTimeMetaReadFid (int32 hdf_id, int32 sd_id, MTKt_TimeMetaData *time_metadata)
 Version of MtkTimeMetaRead that takes an HDF SD file identifier and HDF file identifier rather than a filename. More...
 

Macro Definition Documentation

◆ MTK_CORE_METADATA_INIT

#define MTK_CORE_METADATA_INIT   { {NULL}, 0, MTKMETA_CHAR, NULL }

Definition at line 72 of file MisrFileQuery.h.

◆ MTKT_FILE_TYPE_DESC

#define MTKT_FILE_TYPE_DESC
Value:
{ "AGP", "GP_GMP", "GRP_RCCM", \
"GRP_ELLIPSOID_GM", "GRP_TERRAIN_GM", \
"GRP_ELLIPSOID_LM", "GRP_TERRAIN_LM", \
"AS_AEROSOL", "AS_LAND", "TC_ALBEDO", \
"TC_CLASSIFIERS", "TC_STEREO", \
"PP", "CONVENTIONAL", "UNKNOWN","TC_CLOUD", \
"MISR_HR_BRF", "MISR_HR_RPV", "MISR_HR_TIP", \
"MISR_CMV_NRT"}

Definition at line 47 of file MisrFileQuery.h.

◆ MTKT_TIME_METADATA_INIT

#define MTKT_TIME_METADATA_INIT
Value:
{ 0, 0, 0, {'\0'}, {0}, {{{'\0'}}}, {{0}}, {{0}}, \
{{{0.0}}}, {{0.0}}, {{0.0}} }

Definition at line 91 of file MisrFileQuery.h.

◆ NGRIDCELL

#define NGRIDCELL   2

Definition at line 74 of file MisrFileQuery.h.

Typedef Documentation

◆ MtkCoreMetaData

Core Metadata.

◆ MTKt_FileType

◆ MTKt_TimeMetaData

Time Metadata.

Enumeration Type Documentation

◆ MTKt_FileType

Enumerator
MTK_AGP 
MTK_GP_GMP 
MTK_GRP_RCCM 
MTK_GRP_ELLIPSOID_GM 
MTK_GRP_TERRAIN_GM 
MTK_GRP_ELLIPSOID_LM 
MTK_GRP_TERRAIN_LM 
MTK_AS_AEROSOL 
MTK_AS_LAND 
MTK_TC_ALBEDO 
MTK_TC_CLASSIFIERS 
MTK_TC_STEREO 
MTK_PP 
MTK_CONVENTIONAL 
MTK_UNKNOWN 
MTK_TC_CLOUD 
MTK_HR_BRF 
MTK_HR_RPV 
MTK_HR_TIP 
MTK_CMV_NRT 

Definition at line 24 of file MisrFileQuery.h.

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.

◆ MtkCoreMetaDataFree()

MTKt_status MtkCoreMetaDataFree ( MtkCoreMetaData metadata)

Free core metadata.

Returns
MTK_SUCCESS
Example:
In this example, we have a MtkCoreMetaData structure that was previously allocated and we wish to free it.
status = MtkCoreMetaDataFree(&metadata);
Parameters
[in,out]metadataCore metadata

Definition at line 33 of file MtkCoreMetaDataFree.c.

◆ MtkFieldAttrGet()

MTKt_status MtkFieldAttrGet ( const char *  filename,
const char *  fieldname,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)

Get a file attribute.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get the _FillValue attribute from the CloudMotionCrossTrack field in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFieldAttrGet("MISR_AM1_TC_CLOUD_P110_O074017_F01_0001.hdf", "CloudMotionCrossTrack", "_FillValue", &attrbuf);
Note
The caller is responsible for using MtkDataBufferFree() to free the memory used by attrbuf
Parameters
[in]filenameFile name
[in]fieldnameField name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 38 of file MtkFieldAttrGet.c.

◆ MtkFieldAttrGetFid()

MTKt_status MtkFieldAttrGetFid ( int32  fid,
const char *  fieldname,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]fidHDF-EOS File ID
[in]fieldnameField name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 123 of file MtkFieldAttrGet.c.

◆ MtkFieldAttrGetHDF()

MTKt_status MtkFieldAttrGetHDF ( const char *  filename,
const char *  fieldname,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)
Parameters
[in]filenameFile name
[in]fieldnameField name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 88 of file MtkFieldAttrGet.c.

◆ MtkFieldAttrGetNC()

MTKt_status MtkFieldAttrGetNC ( const char *  filename,
const char *  fieldname,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)
Parameters
[in]filenameFile name
[in]fieldnameField name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 52 of file MtkFieldAttrGet.c.

◆ MtkFieldAttrGetNcid()

MTKt_status MtkFieldAttrGetNcid ( int  ncid,
const char *  fieldname,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)
Parameters
[in]ncidnetCDF File ID
[in]fieldnameField name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 188 of file MtkFieldAttrGet.c.

◆ MtkFieldAttrList()

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

Get a list of field attributes.

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

Definition at line 39 of file MtkFieldAttrList.c.

◆ MtkFieldAttrListFid()

MTKt_status MtkFieldAttrListFid ( int32  fid,
const char *  fieldname,
int *  num_attrs,
char **  attrlist[] 
)

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

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

Definition at line 133 of file MtkFieldAttrList.c.

◆ MtkFieldAttrListHDF()

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

Definition at line 90 of file MtkFieldAttrList.c.

◆ MtkFieldAttrListNC()

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

Definition at line 53 of file MtkFieldAttrList.c.

◆ MtkFieldAttrListNcid()

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

Definition at line 199 of file MtkFieldAttrList.c.

◆ MtkFileAttrGet()

MTKt_status MtkFileAttrGet ( const char *  filename,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)

Get a file attribute.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get the Camera attribute from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileAttrGet("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", "Camera", &attrbuf);
Note
The caller is responsible for using MtkDataBufferFree() to free the memory used by attrbuf
Parameters
[in]filenameFile name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 38 of file MtkFileAttrGet.c.

◆ MtkFileAttrGetFid()

MTKt_status MtkFileAttrGetFid ( int32  sds_id,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]sds_idHDF SD file identifier
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 127 of file MtkFileAttrGet.c.

◆ MtkFileAttrGetHDF()

MTKt_status MtkFileAttrGetHDF ( const char *  filename,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)
Parameters
[in]filenameFile name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 86 of file MtkFileAttrGet.c.

◆ MtkFileAttrGetNC()

MTKt_status MtkFileAttrGetNC ( const char *  filename,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)
Parameters
[in]filenameFile name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 51 of file MtkFileAttrGet.c.

◆ MtkFileAttrGetNcid()

MTKt_status MtkFileAttrGetNcid ( int  ncid,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)
Parameters
[in]ncidnetCDF File ID
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 181 of file MtkFileAttrGet.c.

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

◆ MtkFileBlockMetaFieldList()

MTKt_status MtkFileBlockMetaFieldList ( const char *  filename,
const char *  blockmetaname,
int *  nfields,
char **  fieldlist[] 
)

Read list of fields in a block metadata structure.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the list of fields in the PerBlockMetadataCommon structure in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileBlockMetaFieldList("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", "PerBlockMetadataCommon", &nfields, &fieldlist);
Note
The caller is responsible for using MtkStringListFree() to free the memory used by fieldlist
Parameters
[in]filenameFilename
[in]blockmetanameBlock metadata structure name
[out]nfieldsNumber of Fields
[out]fieldlistList of Fields

Definition at line 39 of file MtkFileBlockMetaFieldList.c.

◆ MtkFileBlockMetaFieldListFid()

MTKt_status MtkFileBlockMetaFieldListFid ( int32  file_id,
const char *  blockmetaname,
int *  nfields,
char **  fieldlist[] 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]file_idHDF file identifier
[in]blockmetanameBlock metadata structure name
[out]nfieldsNumber of Fields
[out]fieldlistList of Fields

Definition at line 84 of file MtkFileBlockMetaFieldList.c.

◆ MtkFileBlockMetaFieldRead()

MTKt_status MtkFileBlockMetaFieldRead ( const char *  filename,
const char *  blockmetaname,
const char *  fieldname,
MTKt_DataBuffer blockmetabuf 
)

Read a block metadata field.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the field lock_coor_ulc_som_meter.x from the PerBlockMetadataCommon block metadata structure in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileBlockMetaFieldRead("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", "PerBlockMetadataCommon", "lock_coor_ulc_som_meter.x", &blockmetabuf);
Note
The caller is responsible for using MtkDataBufferFree() to free the memory used by blockmetabuf
When reading the transform.ref_time field in the PerBlockMetadataRad structure the two strings are concatenated, and there is no terminating NULL.
Parameters
[in]filenameFilename
[in]blockmetanameBlock metadata structure name
[in]fieldnameField name
[out]blockmetabufBlock metadata values

Definition at line 40 of file MtkFileBlockMetaFieldRead.c.

◆ MtkFileBlockMetaFieldReadFid()

MTKt_status MtkFileBlockMetaFieldReadFid ( int32  file_id,
const char *  blockmetaname,
const char *  fieldname,
MTKt_DataBuffer blockmetabuf 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]file_idHDF file identifier
[in]blockmetanameBlock metadata structure name
[in]fieldnameField name
[out]blockmetabufBlock metadata values

Definition at line 84 of file MtkFileBlockMetaFieldRead.c.

◆ MtkFileBlockMetaList()

MTKt_status MtkFileBlockMetaList ( const char *  filename,
int *  nblockmeta,
char ***  blockmetalist 
)

List block metadata structures.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get a list of the block metadata structures in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileBlockMetaList("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", &nblockmeta, &blockmetalist);
Note
The caller is responsible for using MtkStringListFree() to free the memory used by blockmetalist
Parameters
[in]filenameFile name
[out]nblockmetaNumber of Block Metadata
[out]blockmetalistBlock Metadata List

Definition at line 40 of file MtkFileBlockMetaList.c.

◆ MtkFileBlockMetaListFid()

MTKt_status MtkFileBlockMetaListFid ( int32  file_id,
int *  nblockmeta,
char ***  blockmetalist 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]file_idHDF file identifier
[out]nblockmetaNumber of Block Metadata
[out]blockmetalistBlock Metadata List

Definition at line 82 of file MtkFileBlockMetaList.c.

◆ MtkFileCoreMetaDataGet()

MTKt_status MtkFileCoreMetaDataGet ( const char *  filename,
const char *  param,
MtkCoreMetaData metadata 
)

Get core metadata parameter.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get the value for LOCALGRANULEID from the core metadata in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileCoreMetaDataGet("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", "LOCALGRANULEID", &metadata);
Note
The caller is responsible for using MtkCoreMetaDataFree() to free the memory used by metadata
Parameters
[in]filenameFile name
[in]paramParameter
[out]metadataCore metadata

Definition at line 40 of file MtkFileCoreMetaDataGet.c.

◆ MtkFileCoreMetaDataGetFid()

MTKt_status MtkFileCoreMetaDataGetFid ( int32  sd_id,
const char *  param,
MtkCoreMetaData metadata 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]sd_idHDF SD file identifier
[in]paramParameter
[out]metadataCore metadata

Definition at line 130 of file MtkFileCoreMetaDataGet.c.

◆ MtkFileCoreMetaDataGetHDF()

MTKt_status MtkFileCoreMetaDataGetHDF ( const char *  filename,
const char *  param,
MtkCoreMetaData metadata 
)
Parameters
[in]filenameFile name
[in]paramParameter
[out]metadataCore metadata

Definition at line 88 of file MtkFileCoreMetaDataGet.c.

◆ MtkFileCoreMetaDataGetNC()

MTKt_status MtkFileCoreMetaDataGetNC ( const char *  filename,
const char *  param,
MtkCoreMetaData metadata 
)
Parameters
[in]filenameFile name
[in]paramParameter
[out]metadataCore metadata

Definition at line 53 of file MtkFileCoreMetaDataGet.c.

◆ MtkFileCoreMetaDataGetNcid()

MTKt_status MtkFileCoreMetaDataGetNcid ( int  ncid,
const char *  param,
MtkCoreMetaData metadata 
)
Parameters
[in]ncidnetCDF File ID
[in]paramParameter
[out]metadataCore metadata

Definition at line 307 of file MtkFileCoreMetaDataGet.c.

◆ MtkFileCoreMetaDataQuery()

MTKt_status MtkFileCoreMetaDataQuery ( const char *  filename,
int *  nparam,
char ***  paramlist 
)

Query file for core metadata.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we query the core metadata in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileCoreMetaDataQuery("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", &nparam, &paramlist);
Note
The caller is responsible for using MtkStringListFree() to free the memory used by paramlist
Parameters
[in]filenameFile name
[out]nparamNumber of parameters
[out]paramlistParameter list

Definition at line 39 of file MtkFileCoreMetaDataQuery.c.

◆ MtkFileCoreMetaDataQueryFid()

MTKt_status MtkFileCoreMetaDataQueryFid ( int32  sd_id,
int *  nparam,
char ***  paramlist 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]sd_idHDF SD file identifier
[out]nparamNumber of parameters
[out]paramlistParameter list

Definition at line 129 of file MtkFileCoreMetaDataQuery.c.

◆ MtkFileCoreMetaDataQueryHDF()

MTKt_status MtkFileCoreMetaDataQueryHDF ( const char *  filename,
int *  nparam,
char ***  paramlist 
)
Parameters
[in]filenameFile name
[out]nparamNumber of parameters
[out]paramlistParameter list

Definition at line 87 of file MtkFileCoreMetaDataQuery.c.

◆ MtkFileCoreMetaDataQueryNC()

MTKt_status MtkFileCoreMetaDataQueryNC ( const char *  filename,
int *  nparam,
char ***  paramlist 
)
Parameters
[in]filenameFile name
[out]nparamNumber of parameters
[out]paramlistParameter list

Definition at line 52 of file MtkFileCoreMetaDataQuery.c.

◆ MtkFileCoreMetaDataQueryNcid()

MTKt_status MtkFileCoreMetaDataQueryNcid ( int  ncid,
int *  nparam,
char ***  paramlist 
)
Parameters
[in]ncidnetCDF File ID
[out]nparamNumber of parameters
[out]paramlistParameter list

Definition at line 277 of file MtkFileCoreMetaDataQuery.c.

◆ MtkFileCoreMetaDataRaw()

MTKt_status MtkFileCoreMetaDataRaw ( const char *  filename,
char **  coremeta 
)

Read core metadata from a MISR product file into a buffer.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the core metadata from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileCoreMetaDataRaw("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", &coremeta);
Note
The caller is responsible for using free() to free the memory used by coremeta
Parameters
[in]filenameFile name
[out]coremetaCore metadata

Definition at line 38 of file MtkFileCoreMetaDataRaw.c.

◆ MtkFileCoreMetaDataRawFid()

MTKt_status MtkFileCoreMetaDataRawFid ( int32  sds_id,
char **  coremeta 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]sds_idHDF SD file identifier
[out]coremetaCore metadata

Definition at line 125 of file MtkFileCoreMetaDataRaw.c.

◆ MtkFileCoreMetaDataRawHDF()

MTKt_status MtkFileCoreMetaDataRawHDF ( const char *  filename,
char **  coremeta 
)
Parameters
[in]filenameFile name
[out]coremetaCore metadata

Definition at line 84 of file MtkFileCoreMetaDataRaw.c.

◆ MtkFileCoreMetaDataRawNC()

MTKt_status MtkFileCoreMetaDataRawNC ( const char *  filename,
char **  coremeta 
)
Parameters
[in]filenameFile name
[out]coremetaCore metadata

Definition at line 50 of file MtkFileCoreMetaDataRaw.c.

◆ MtkFileCoreMetaDataRawNcid()

MTKt_status MtkFileCoreMetaDataRawNcid ( int  ncid,
char **  coremeta 
)
Parameters
[in]ncidnetCDF File ID
[out]coremetaCore metadata

Definition at line 173 of file MtkFileCoreMetaDataRaw.c.

◆ MtkFileGridFieldCheck()

MTKt_status MtkFileGridFieldCheck ( const char *  filename,
const char *  gridname,
const char *  fieldname 
)

Check if file/grid/field/dimension are valid.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we check the validity of MISR_AM1_AS_LAND_P037_O029058_F06_0017.hdf the grid SubregParamsLnd the field LandBRF and the dimensions [1][0] where [1] is the Band and [0] is Camera
char *error_mesg[] = MTK_ERR_DESC;
status = MtkFileGridFieldCheck("MISR_AM1_AS_LAND_P037_O029058_F06_0017.hdf",
"SubregParamsLnd", "LandBrf[1][0]");
if (status != MTK_SUCCESS) {
printf("%s\n",error_mesg[status]);
}
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name

Definition at line 42 of file MtkFileGridFieldCheck.c.

◆ MtkFileGridFieldCheckFid()

MTKt_status MtkFileGridFieldCheckFid ( int32  Fid,
const char *  gridname,
const char *  fieldname 
)

Version of MtkFileGridFieldCheck 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
[in]fieldnameField name

Definition at line 131 of file MtkFileGridFieldCheck.c.

◆ MtkFileGridFieldCheckHDF()

MTKt_status MtkFileGridFieldCheckHDF ( const char *  filename,
const char *  gridname,
const char *  fieldname 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name

Definition at line 90 of file MtkFileGridFieldCheck.c.

◆ MtkFileGridFieldCheckNC()

MTKt_status MtkFileGridFieldCheckNC ( const char *  filename,
const char *  gridname,
const char *  fieldname 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name

Definition at line 55 of file MtkFileGridFieldCheck.c.

◆ MtkFileGridFieldCheckNcid()

MTKt_status MtkFileGridFieldCheckNcid ( int  ncid,
const char *  gridname,
const char *  fieldname 
)
Parameters
[in]ncidnetCDF file identifier
[in]gridnameGrid name
[in]fieldnameField name

Definition at line 217 of file MtkFileGridFieldCheck.c.

◆ MtkFileGridFieldToDataType()

MTKt_status MtkFileGridFieldToDataType ( const char *  filename,
const char *  gridname,
const char *  fieldname,
MTKt_DataType datatype 
)

Find data type for a particular field.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the data type from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf the grid BlueBand and the field Blue Radiance/RDQI
status = MtkFileGridFieldToDataType("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf",
"BlueBand", "Blue Radiance/RDQI", &datatype);
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]datatypeData type

Definition at line 37 of file MtkFileGridFieldToDataType.c.

◆ MtkFileGridFieldToDataTypeFid()

MTKt_status MtkFileGridFieldToDataTypeFid ( int32  fid,
const char *  gridname,
const char *  fieldname,
MTKt_DataType datatype 
)

Version of MtkFileGridFieldToDataType that takes an HDF-EOS file id rather than a filename.

Returns
MTK_SUCCESS if successful.
Parameters
[in]fidHDF-EOS file identifier
[in]gridnameGrid name
[in]fieldnameField name
[out]datatypeData type

Definition at line 122 of file MtkFileGridFieldToDataType.c.

◆ MtkFileGridFieldToDataTypeHDF()

MTKt_status MtkFileGridFieldToDataTypeHDF ( const char *  filename,
const char *  gridname,
const char *  fieldname,
MTKt_DataType datatype 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]datatypeData type

Definition at line 87 of file MtkFileGridFieldToDataType.c.

◆ MtkFileGridFieldToDataTypeNC()

MTKt_status MtkFileGridFieldToDataTypeNC ( const char *  filename,
const char *  gridname,
const char *  fieldname,
MTKt_DataType datatype 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]datatypeData type

Definition at line 51 of file MtkFileGridFieldToDataType.c.

◆ MtkFileGridFieldToDataTypeNcid()

MTKt_status MtkFileGridFieldToDataTypeNcid ( int  ncid,
const char *  gridname,
const char *  fieldname,
MTKt_DataType datatype 
)
Parameters
[in]ncidnetCDF file identifier
[in]gridnameGrid name
[in]fieldnameField name
[out]datatypeData type

Definition at line 169 of file MtkFileGridFieldToDataType.c.

◆ 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
status = MtkFileGridFieldToDimList("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", "BlueBand",
"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]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]dimcntDimension count
[out]dimlistDimension list
[out]dimsizeDimension 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]FidHDF-EOS File ID
[in]gridnameGrid name
[in]fieldnameField name
[out]dimcntDimension count
[out]dimlistDimension list
[out]dimsizeDimension 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]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]dimcntDimension count
[out]dimlistDimension list
[out]dimsizeDimension 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]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]dimcntDimension count
[out]dimlistDimension list
[out]dimsizeDimension 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]ncidnetCDF file identifier
[in]gridnameGrid name
[in]fieldnameField name
[out]dimcntDimension count
[out]dimlistDimension list
[out]dimsizeDimension size

Definition at line 268 of file MtkFileGridFieldToDimList.c.

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

◆ MtkFileGridToNativeFieldList()

MTKt_status MtkFileGridToNativeFieldList ( const char *  filename,
const char *  gridname,
int *  nfields,
char **  fieldlist[] 
)

Read list of native fields from file (excludes derived fields)

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the list of native fields (excludes derived fields) from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf and the grid BlueBand
status = MtkFileGridToNativeFieldList("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 MtkFileGridToNativeFieldList.c.

◆ MtkFileGridToNativeFieldListFid()

MTKt_status MtkFileGridToNativeFieldListFid ( int32  Fid,
const char *  gridname,
int *  nfields,
char **  fieldlist[] 
)

Version of MtkFileGridToNativeFieldList 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 MtkFileGridToNativeFieldList.c.

◆ MtkFileGridToNativeFieldListHDF()

MTKt_status MtkFileGridToNativeFieldListHDF ( 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 MtkFileGridToNativeFieldList.c.

◆ MtkFileGridToNativeFieldListNC()

MTKt_status MtkFileGridToNativeFieldListNC ( 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 MtkFileGridToNativeFieldList.c.

◆ MtkFileGridToNativeFieldListNcid()

MTKt_status MtkFileGridToNativeFieldListNcid ( int  ncid,
const char *  gridname,
int *  nfields,
char **  fieldlist[] 
)
Parameters
[in]ncidnetCDF File ID
[in]gridnameGridname
[out]nfieldsNumber of Fields
[out]fieldlistList of Fields

Definition at line 217 of file MtkFileGridToNativeFieldList.c.

◆ MtkFileGridToResolution()

MTKt_status MtkFileGridToResolution ( const char *  filename,
const char *  gridname,
int *  resolution 
)

Get resolution of a particular grid.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get the resolution of the grid BlueBand from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileGridToResolution("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", "BlueBand", &resolution);
Parameters
[in]filenameFile name
[in]gridnameGrid name
[out]resolutionResolution

Definition at line 35 of file MtkFileGridToResolution.c.

◆ MtkFileGridToResolutionFid()

MTKt_status MtkFileGridToResolutionFid ( int32  fid,
const char *  gridname,
int *  resolution 
)

Version of MtkFileGridToResolution that takes an HDF-EOS file id rather than a filename.

Returns
MTK_SUCCESS if successful.
Parameters
[in]fidHDF-EOS file identifier
[in]gridnameGrid name
[out]resolutionResolution

Definition at line 118 of file MtkFileGridToResolution.c.

◆ MtkFileGridToResolutionHDF()

MTKt_status MtkFileGridToResolutionHDF ( const char *  filename,
const char *  gridname,
int *  resolution 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[out]resolutionResolution

Definition at line 83 of file MtkFileGridToResolution.c.

◆ MtkFileGridToResolutionNC()

MTKt_status MtkFileGridToResolutionNC ( const char *  filename,
const char *  gridname,
int *  resolution 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[out]resolutionResolution

Definition at line 48 of file MtkFileGridToResolution.c.

◆ MtkFileGridToResolutionNcid()

MTKt_status MtkFileGridToResolutionNcid ( int  ncid,
const char *  gridname,
int *  resolution 
)
Parameters
[in]ncidnetCDF file identifier
[in]gridnameGrid name
[out]resolutionResolution

Definition at line 154 of file MtkFileGridToResolution.c.

◆ MtkFileLGID()

MTKt_status MtkFileLGID ( const char *  filename,
char **  lgid 
)

Determine local granual ID of MISR product file.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the local granual ID from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileLGID("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", &lgid);
Note
The caller is responsible for using free() to free the memory used by lgid
Parameters
[in]filenameFile name
[out]lgidLocal Granual ID

Definition at line 37 of file MtkFileLGID.c.

◆ MtkFileLGIDFid()

MTKt_status MtkFileLGIDFid ( int32  sds_id,
char **  lgid 
)

Version of MtkFileLGID that takes an HDF SDS ID rather than a filename.

Returns
MTK_SUCCESS if successful.
Parameters
[in]sds_idHDF SDS ID
[out]lgidLocal Granual ID

Definition at line 129 of file MtkFileLGID.c.

◆ MtkFileLGIDHDF()

MTKt_status MtkFileLGIDHDF ( const char *  filename,
char **  lgid 
)
Parameters
[in]filenameFile name
[out]lgidLocal Granual ID

Definition at line 83 of file MtkFileLGID.c.

◆ MtkFileLGIDNC()

MTKt_status MtkFileLGIDNC ( const char *  filename,
char **  lgid 
)
Parameters
[in]filenameFile name
[out]lgidLocal Granual ID

Definition at line 49 of file MtkFileLGID.c.

◆ MtkFileLGIDNcid()

MTKt_status MtkFileLGIDNcid ( int  ncid,
char **  lgid 
)
Parameters
[in]ncidnetCDF file identifier
[out]lgidLocal Granual ID

Definition at line 195 of file MtkFileLGID.c.

◆ MtkFileToBlockRange()

MTKt_status MtkFileToBlockRange ( const char *  filename,
int *  start_block,
int *  end_block 
)

Read start and end block numbers from file.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the start and end block numbers from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileToBlockRange("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", &start_block, &end_block);
Parameters
[in]filenameFile name
[out]start_blockStart block
[out]end_blockEnd Block

Definition at line 35 of file MtkFileToBlockRange.c.

◆ MtkFileToBlockRangeFid()

MTKt_status MtkFileToBlockRangeFid ( int32  sid,
int *  start_block,
int *  end_block 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]sidHDF SD file identifier
[out]start_blockStart block
[out]end_blockEnd Block

Definition at line 123 of file MtkFileToBlockRange.c.

◆ MtkFileToBlockRangeHDF()

MTKt_status MtkFileToBlockRangeHDF ( const char *  filename,
int *  start_block,
int *  end_block 
)
Parameters
[in]filenameFile name
[out]start_blockStart block
[out]end_blockEnd Block

Definition at line 83 of file MtkFileToBlockRange.c.

◆ MtkFileToBlockRangeNC()

MTKt_status MtkFileToBlockRangeNC ( const char *  filename,
int *  start_block,
int *  end_block 
)
Parameters
[in]filenameFile name
[out]start_blockStart block
[out]end_blockEnd Block

Definition at line 48 of file MtkFileToBlockRange.c.

◆ MtkFileToBlockRangeNcid()

MTKt_status MtkFileToBlockRangeNcid ( int  ncid,
int *  start_block,
int *  end_block 
)
Parameters
[in]ncidnetCDF File ID
[out]start_blockStart block
[out]end_blockEnd Block

Definition at line 162 of file MtkFileToBlockRange.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.

◆ MtkFileToOrbit()

MTKt_status MtkFileToOrbit ( const char *  filename,
int *  orbit 
)

Read orbit number from file.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the orbit number from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileToOrbit("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", &orbit);
Parameters
[in]filenameFile name
[out]orbitOrbit number

Definition at line 35 of file MtkFileToOrbit.c.

◆ MtkFileToOrbitFid()

MTKt_status MtkFileToOrbitFid ( int32  sd_id,
int *  orbit 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]sd_idHDF SD file identifier
[out]orbitOrbit number

Definition at line 119 of file MtkFileToOrbit.c.

◆ MtkFileToOrbitHDF()

MTKt_status MtkFileToOrbitHDF ( const char *  filename,
int *  orbit 
)
Parameters
[in]filenameFile name
[out]orbitOrbit number

Definition at line 79 of file MtkFileToOrbit.c.

◆ MtkFileToOrbitNC()

MTKt_status MtkFileToOrbitNC ( const char *  filename,
int *  orbit 
)
Parameters
[in]filenameFile name
[out]orbitOrbit number

Definition at line 46 of file MtkFileToOrbit.c.

◆ MtkFileToOrbitNcid()

MTKt_status MtkFileToOrbitNcid ( int  ncid,
int *  orbit 
)
Parameters
[in]ncidnetCDF File ID
[out]orbitOrbit number

Definition at line 143 of file MtkFileToOrbit.c.

◆ MtkFileToPath()

MTKt_status MtkFileToPath ( const char *  filename,
int *  path 
)

Read path number from file.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the path number from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileToPath("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", &path);
Parameters
[in]filenameFile name
[out]pathPath number

Definition at line 35 of file MtkFileToPath.c.

◆ MtkFileToPathFid()

MTKt_status MtkFileToPathFid ( int32  sid,
int *  path 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]sidHDF SD file identifier
[out]pathPath number

Definition at line 117 of file MtkFileToPath.c.

◆ MtkFileToPathHDF()

MTKt_status MtkFileToPathHDF ( const char *  filename,
int *  path 
)
Parameters
[in]filenameFile name
[out]pathPath number

Definition at line 79 of file MtkFileToPath.c.

◆ MtkFileToPathNC()

MTKt_status MtkFileToPathNC ( const char *  filename,
int *  path 
)
Parameters
[in]filenameFile name
[out]pathPath number

Definition at line 46 of file MtkFileToPath.c.

◆ MtkFileToPathNcid()

MTKt_status MtkFileToPathNcid ( int  ncid,
int *  path 
)
Parameters
[in]ncidHDF SD file identifier
[out]pathPath number

Definition at line 144 of file MtkFileToPath.c.

◆ MtkFileType()

MTKt_status MtkFileType ( const char *  filename,
MTKt_FileType filetype 
)

Determine MISR product file type.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we determine the file type of the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileType("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", &filetype);
Parameters
[in]filenameFile name
[out]filetypeFile type

Definition at line 37 of file MtkFileType.c.

◆ MtkFileTypeFid()

MTKt_status MtkFileTypeFid ( int32  Fid,
MTKt_FileType filetype 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]FidHDF-EOS file identifier
[out]filetypeFile type

Definition at line 119 of file MtkFileType.c.

◆ MtkFileTypeHDF()

MTKt_status MtkFileTypeHDF ( const char *  filename,
MTKt_FileType filetype 
)
Parameters
[in]filenameFile name
[out]filetypeFile type

Definition at line 83 of file MtkFileType.c.

◆ MtkFileTypeNC()

MTKt_status MtkFileTypeNC ( const char *  filename,
MTKt_FileType filetype 
)
Parameters
[in]filenameFile name
[out]filetypeFile type

Definition at line 49 of file MtkFileType.c.

◆ MtkFileTypeNcid()

MTKt_status MtkFileTypeNcid ( int  ncid,
MTKt_FileType filetype 
)
Parameters
[in]ncidnetCDF file identifier
[out]filetypeFile type

Definition at line 266 of file MtkFileType.c.

◆ MtkFileVersion()

MTKt_status MtkFileVersion ( const char *  filename,
char *  fileversion 
)

Determine MISR product file version.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we read the file version from the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFileVersion("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", fileversion);
Parameters
[in]filenameFile name
[out]fileversionFile version

Definition at line 35 of file MtkFileVersion.c.

◆ MtkFileVersionFid()

MTKt_status MtkFileVersionFid ( int32  sd_id,
char *  fileversion 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]sd_idHDF SD file identifier
[out]fileversionFile version

Definition at line 122 of file MtkFileVersion.c.

◆ MtkFileVersionHDF()

MTKt_status MtkFileVersionHDF ( const char *  filename,
char *  fileversion 
)
Parameters
[in]filenameFile name
[out]fileversionFile version

Definition at line 81 of file MtkFileVersion.c.

◆ MtkFileVersionNC()

MTKt_status MtkFileVersionNC ( const char *  filename,
char *  fileversion 
)
Parameters
[in]filenameFile name
[out]fileversionFile version

Definition at line 47 of file MtkFileVersion.c.

◆ MtkFileVersionNcid()

MTKt_status MtkFileVersionNcid ( int  ncid,
char *  fileversion 
)
Parameters
[in]ncidnetCDF File ID
[out]fileversionFile version

Definition at line 162 of file MtkFileVersion.c.

◆ MtkFillValueGet()

MTKt_status MtkFillValueGet ( const char *  filename,
const char *  gridname,
const char *  fieldname,
MTKt_DataBuffer fillbuf 
)

Get fill value.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get the fill value from the Blue Radiance/RDQI field in the BlueBand grid in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkFillValueGet("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", "BlueBand",
"Blue Radiance/RDQI", &fillbuf);
Note
The caller is responsible for using MtkDataBufferFree() to free the memory used by fillbuf
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]fillbufFill value

Definition at line 40 of file MtkFillValueGet.c.

◆ MtkFillValueGetFid()

MTKt_status MtkFillValueGetFid ( int32  fid,
const char *  gridname,
const char *  fieldname,
MTKt_DataBuffer fillbuf 
)

Version of MtkFillValueGet that takes an HDF-EOS file ID rather than a filename.

Returns
MTK_SUCCESS if successful.
Parameters
[in]fidHDF-EOS File id
[in]gridnameGrid name
[in]fieldnameField name
[out]fillbufFill value

Definition at line 126 of file MtkFillValueGet.c.

◆ MtkFillValueGetHDF()

MTKt_status MtkFillValueGetHDF ( const char *  filename,
const char *  gridname,
const char *  fieldname,
MTKt_DataBuffer fillbuf 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]fillbufFill value

Definition at line 90 of file MtkFillValueGet.c.

◆ MtkFillValueGetNC()

MTKt_status MtkFillValueGetNC ( const char *  filename,
const char *  gridname,
const char *  fieldname,
MTKt_DataBuffer fillbuf 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]fieldnameField name
[out]fillbufFill value

Definition at line 54 of file MtkFillValueGet.c.

◆ MtkFillValueGetNcid()

MTKt_status MtkFillValueGetNcid ( int  ncid,
const char *  gridname,
const char *  fieldname,
MTKt_DataBuffer fillbuf 
)
Parameters
[in]ncidnetCDF id
[in]gridnameGrid name
[in]fieldnameField name
[out]fillbufFill value

Definition at line 191 of file MtkFillValueGet.c.

◆ MtkFindFileList()

MTKt_status MtkFindFileList ( const char *  searchdir,
const char *  product,
const char *  camera,
const char *  path,
const char *  orbit,
const char *  version,
int *  filecnt,
char **  filenames[] 
)

Find files in a directory tree, using regular expressions.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we search the directory misr_products for all GRP files related to the DF camera.
status = MtkFindFileList("misr_products", "GRP.*", "DF", ".*", ".*", ".*", &filecnt, &filenames);
Note
The caller is responsible for using MtkStringListFree() to free the memory used by filenames
Parameters
[in]searchdirSearch Directory
[in]productProduct
[in]cameraCamera
[in]pathPath
[in]orbitOrbit
[in]versionVersion
[out]filecntFile count
[out]filenamesFilenames

Definition at line 68 of file MtkFindFileList.c.

◆ MtkGridAttrGet()

MTKt_status MtkGridAttrGet ( const char *  filename,
const char *  gridname,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)

Get a grid attribute.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get the Block_size.resolution_x attribute from the BlueBand grid in the file MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkGridAttrGet("MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf", "BlueBand",
"Block_size.resolution_x", &attrbuf);
Note
The caller is responsible for using MtkDataBufferFree() to free the memory used by attrbuf
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 39 of file MtkGridAttrGet.c.

◆ MtkGridAttrGetFid()

MTKt_status MtkGridAttrGetFid ( int32  fid,
const char *  gridname,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)

Version of MtkFileGridAttrGet that takes an HDF-EOS file ID rather than a filename.

Returns
MTK_SUCCESS if successful.
Parameters
[in]fidHDF-EOS File ID
[in]gridnameGrid name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 123 of file MtkGridAttrGet.c.

◆ MtkGridAttrGetHDF()

MTKt_status MtkGridAttrGetHDF ( const char *  filename,
const char *  gridname,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 89 of file MtkGridAttrGet.c.

◆ MtkGridAttrGetNC()

MTKt_status MtkGridAttrGetNC ( const char *  filename,
const char *  gridname,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)
Parameters
[in]filenameFile name
[in]gridnameGrid name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 53 of file MtkGridAttrGet.c.

◆ MtkGridAttrGetNcid()

MTKt_status MtkGridAttrGetNcid ( int  ncid,
const char *  gridname,
const char *  attrname,
MTKt_DataBuffer attrbuf 
)
Parameters
[in]ncidnetCDF File ID
[in]gridnameGrid name
[in]attrnameAttribute name
[out]attrbufAttribute value

Definition at line 170 of file MtkGridAttrGet.c.

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

◆ MtkMakeFilename()

MTKt_status MtkMakeFilename ( const char *  basedir,
const char *  product,
const char *  camera,
int  path,
int  orbit,
const char *  version,
char **  filename 
)

Given a base directory, product, camera, path, orbit, version.

Returns
MTK_SUCCESS if successful.

The camera parameter can be set to NULL if product is not by camera. The orbit parameter can be set to 0 if product is not by orbit. The basedir parameter can be set to "." for current or no directory specified.

Example:
In this example, we create the filename misr_products/MISR_AM1_GRP_TERRAIN_GM_P161_O012115_DF_F03_0021.hdf
status = MtkMakeFilename("misr_products", "GRP_TERRAIN_GM", "DF", 161, 12115, "F03_0021", &filename);
In this example, we create the filename misr_products/MISR_AM1_GP_GMP_P037_O014845_F02_0009.hdf
status = MtkMakeFilename("misr_products", "GP_GMP", NULL, 37, 14845, "F02_0009", &filename);
Note
The caller is responsible for using free() to free the memory used by filename
Parameters
[in]basedirBase Directory
[in]productProduct
[in]cameraCamera
[in]pathPath
[in]orbitOrbit
[in]versionVersion
[out]filenameFilename

Definition at line 49 of file MtkMakeFilename.c.

◆ MtkTimeMetaRead()

MTKt_status MtkTimeMetaRead ( const char *  filename,
MTKt_TimeMetaData time_metadata 
)

Read time metadata from L1B2 Ellipsoid product file.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we get the time metadata from the file MISR_AM1_GRP_ELLIPSOID_GM_P037_O029058_AA_F03_0024.hdf
status = MtkTimeMetaRead("MISR_AM1_GRP_ELLIPSOID_GM_P037_O029058_AA_F03_0024.hdf", &time_metadata);
Note
To compute pixel time use MtkPixelTime().
Parameters
[in]filenameL1B2 product file
[out]time_metadataTime metadata

Definition at line 39 of file MtkTimeMetaRead.c.

◆ MtkTimeMetaReadFid()

MTKt_status MtkTimeMetaReadFid ( int32  hdf_id,
int32  sd_id,
MTKt_TimeMetaData time_metadata 
)

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

Returns
MTK_SUCCESS if successful.
Parameters
[in]hdf_idHDF file identifier
[in]sd_idHDF SD file identifier
[out]time_metadataTime metadata

Definition at line 95 of file MtkTimeMetaRead.c.


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