17 #ifndef MISRFILEQUERY_H 18 #define MISRFILEQUERY_H 47 #define MTKT_FILE_TYPE_DESC { "AGP", "GP_GMP", "GRP_RCCM", \ 48 "GRP_ELLIPSOID_GM", "GRP_TERRAIN_GM", \ 49 "GRP_ELLIPSOID_LM", "GRP_TERRAIN_LM", \ 50 "AS_AEROSOL", "AS_LAND", "TC_ALBEDO", \ 51 "TC_CLASSIFIERS", "TC_STEREO", \ 52 "PP", "CONVENTIONAL", "UNKNOWN","TC_CLOUD", \ 53 "MISR_HR_BRF", "MISR_HR_RPV", "MISR_HR_TIP", \ 72 #define MTK_CORE_METADATA_INIT { {NULL}, 0, MTKMETA_CHAR, NULL } 91 #define MTKT_TIME_METADATA_INIT { 0, 0, 0, {'\0'}, {0}, {{{'\0'}}}, {{0}}, {{0}}, \ 92 {{{0.0}}}, {{0.0}}, {{0.0}} } 145 const char *gridname,
149 const char *gridname,
153 const char *gridname,
157 const char *gridname,
161 const char *gridname,
165 const char *gridname,
166 const char *fieldname,
170 const char *gridname,
171 const char *fieldname,
175 const char *gridname,
176 const char *fieldname,
180 const char *gridname,
181 const char *fieldname,
185 const char *gridname,
186 const char *fieldname,
190 const char *gridname,
191 const char *fieldname,
195 const char *gridname,
196 const char *fieldname,
200 const char *gridname,
201 const char *fieldname,
205 const char *gridname,
206 const char *fieldname,
210 const char *gridname,
211 const char *fieldname,
234 GDinqgridfid(int32 fid,
char *objectlist, int32 * strbufsize);
238 const char *gridname,
240 char **fieldlist[] );
243 const char *gridname,
245 char **fieldlist[] );
248 const char *gridname,
250 char **fieldlist[] );
253 const char *gridname,
255 char **fieldlist[] );
258 const char *gridname,
260 char **fieldlist[] );
263 const char *gridname,
265 char **fieldlist[] );
268 const char *gridname,
270 char **fieldlist[] );
273 const char *gridname,
275 char **fieldlist[] );
278 const char *gridname,
280 char **fieldlist[] );
283 const char *gridname,
285 char **fieldlist[] );
302 char **filenames[] );
350 const char *gridname,
355 const char *gridname,
360 const char *gridname,
365 const char *gridname,
370 const char *gridname,
375 const char *gridname,
376 const char *fieldname,
382 const char *gridname,
383 const char *fieldname,
389 const char *gridname,
390 const char *fieldname,
396 const char *gridname,
397 const char *fieldname,
403 const char *gridname,
404 const char *fieldname,
483 const char *gridname,
484 const char *fieldname );
487 const char *gridname,
488 const char *fieldname );
491 const char *gridname,
492 const char *fieldname );
495 const char *gridname,
496 const char *fieldname );
499 const char *gridname,
500 const char *fieldname );
523 const char *gridname,
528 const char *gridname,
533 const char *gridname,
538 const char *gridname,
543 const char *gridname,
548 const char *fieldname,
553 const char *fieldname,
558 const char *fieldname,
563 const char *fieldname,
568 const char *fieldname,
573 const char *fieldname,
578 const char *fieldname,
583 const char *fieldname,
588 const char *fieldname,
593 const char *fieldname,
599 char ***blockmetalist );
603 char ***blockmetalist );
606 const char *blockmetaname,
608 char **fieldlist[] );
611 const char *blockmetaname,
613 char **fieldlist[] );
616 const char *blockmetaname,
617 const char *fieldname,
621 const char *blockmetaname,
622 const char *fieldname,
MTKt_status MtkFileToGridList(const char *filename, int *ngrids, char **gridlist[])
Read list of grids from a file.
MTKt_status MtkFileToOrbit(const char *filename, int *orbit)
Read orbit number from file.
struct MtkCoreMetaData MtkCoreMetaData
Core Metadata.
MTKt_status MtkFileVersionNC(const char *filename, char *fileversion)
MTKt_status MtkFillValueGetHDF(const char *filename, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
MTKt_status MtkFileCoreMetaDataQueryFid(int32 sd_id, int *nparam, char ***paramlist)
Version of MtkFileCoreMetaDataQuery that takes an HDF SD file identifier rather than a filename...
MTKt_status MtkFileToOrbitFid(int32 sd_id, int *orbit)
Version of MtkFileToOrbit that takes an HDF SD file identifier rather than a filename.
MTKt_status MtkFileGridToResolutionNcid(int ncid, const char *gridname, int *resolution)
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.
MTKt_status MtkFileCoreMetaDataGetFid(int32 sd_id, const char *param, MtkCoreMetaData *metadata)
Version of MtkFileCoreMetaDataGet that takes an HDF SD identifier rather than a filename.
MTKt_status MtkGridAttrGetNC(const char *filename, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf)
MTKt_status MtkFileTypeNC(const char *filename, MTKt_FileType *filetype)
MTKt_status MtkFileLGIDNcid(int ncid, char **lgid)
int32 GDinqgridfid(int32 fid, char *objectlist, int32 *strbufsize)
Replacement for HDF-EOS GDinqgrid that takes an HDF-EOS file id rather than a filename.
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.
MTKt_status MtkGridAttrList(const char *filename, const char *gridname, int *num_attrs, char **attrlist[])
Get a list of grid attributes.
MTKt_status MtkFileToPathNC(const char *filename, int *path)
MTKt_status MtkCoreMetaDataFree(MtkCoreMetaData *metadata)
Free core metadata.
MTKt_status MtkFileCoreMetaDataQueryHDF(const char *filename, int *nparam, char ***paramlist)
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.
MTKt_status MtkFileVersionNcid(int ncid, char *fileversion)
MTKt_status MtkFileGridFieldToDataTypeNC(const char *filename, const char *gridname, const char *fieldname, MTKt_DataType *datatype)
MTKt_status MtkFileGridToResolutionNC(const char *filename, const char *gridname, int *resolution)
MTKt_status MtkFileCoreMetaDataRawHDF(const char *filename, char **coremeta)
MTKt_status MtkFileTypeNcid(int ncid, MTKt_FileType *filetype)
MTKt_status MtkFileAttrGetNcid(int ncid, const char *attrname, MTKt_DataBuffer *attrbuf)
MTKt_status MtkFileToOrbitNC(const char *filename, int *orbit)
HDFFCLIBAPI intf * dimsize
MTKt_status MtkFieldAttrGetHDF(const char *filename, const char *fieldname, const char *attrname, MTKt_DataBuffer *attrbuf)
MTKt_status MtkFileGridFieldToDataTypeNcid(int ncid, const char *gridname, const char *fieldname, MTKt_DataType *datatype)
MTKt_status MtkFileGridFieldCheckHDF(const char *filename, const char *gridname, const char *fieldname)
MTKt_status MtkFileToBlockRangeNcid(int ncid, int *start_block, int *end_block)
MTKt_status MtkFileAttrGetHDF(const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf)
MTKt_status MtkFieldAttrList(const char *filename, const char *fieldname, int *num_attrs, char **attrlist[])
Get a list of field attributes.
2-dimensional Data Buffer
MTKt_status MtkFileAttrListHDF(const char *filename, int *num_attrs, char **attrlist[])
HDFFCLIBAPI intf intf _fcd attrname
MTKt_status MtkFileGridToFieldListNC(const char *filename, const char *gridname, int *nfields, char **fieldlist[])
MTKt_status MtkFileToBlockRangeNC(const char *filename, int *start_block, int *end_block)
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...
MTKt_status MtkFileLGIDNC(const char *filename, char **lgid)
MTKt_status MtkGridAttrListNcid(int ncid, const char *gridname, int *num_attrs, char **attrlist[])
MTKt_status MtkFileBlockMetaFieldRead(const char *filename, const char *blockmetaname, const char *fieldname, MTKt_DataBuffer *blockmetabuf)
Read a block metadata field.
MTKt_status MtkFileGridToNativeFieldListHDF(const char *filename, const char *gridname, int *nfields, char **fieldlist[])
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.
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.
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...
MTKt_status MtkFileAttrGet(const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf)
Get a file attribute.
MTKt_status MtkFileVersion(const char *filename, char *fileversion)
Determine MISR product file version.
MTKt_status MtkFileBlockMetaListFid(int32 file_id, int *nblockmeta, char ***blockmetalist)
Version of MtkFileBlockMetaList that takes an HDF file identifier rather than a filename.
MTKt_status MtkGridAttrGetHDF(const char *filename, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf)
MTKt_status MtkFileGridFieldToDataType(const char *filename, const char *gridname, const char *fieldname, MTKt_DataType *datatype)
Find data type for a particular field.
MTKt_status MtkFieldAttrListHDF(const char *filename, const char *fieldname, int *num_attrs, char **attrlist[])
MTKt_status MtkFileCoreMetaDataQueryNcid(int ncid, int *nparam, char ***paramlist)
MTKt_status MtkFileToGridListHDF(const char *filename, int *ngrids, char **gridlist[])
MTKt_status MtkFieldAttrListNC(const char *filename, const char *fieldname, int *num_attrs, char **attrlist[])
MTKt_status MtkFileGridToFieldListNcid(int ncid, const char *gridname, int *nfields, char **fieldlist[])
MTKt_status MtkFileGridToFieldListHDF(const char *filename, const char *gridname, int *nfields, char **fieldlist[])
MTKt_status MtkFileToOrbitNcid(int ncid, int *orbit)
MTKt_status MtkFillValueGetNC(const char *filename, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
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...
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.
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.
MTKt_status MtkFileToPathFid(int32 sid, int *path)
Version of MtkFileToPath that takes an HDF SD identifier rather than a filename.
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...
MTKt_status MtkFileGridFieldCheckNC(const char *filename, const char *gridname, const char *fieldname)
MTKt_status MtkFileType(const char *filename, MTKt_FileType *filetype)
Determine MISR product file type.
MTKt_status MtkFileAttrGetNC(const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf)
MTKt_status MtkFileToBlockRange(const char *filename, int *start_block, int *end_block)
Read start and end block numbers from file.
MTKt_status MtkFileGridFieldCheck(const char *filename, const char *gridname, const char *fieldname)
Check if file/grid/field/dimension are valid.
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.
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...
MTKt_status MtkFileLGID(const char *filename, char **lgid)
Determine local granual ID of MISR product file.
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...
MTKt_status MtkFileGridToFieldList(const char *filename, const char *gridname, int *nfields, char **fieldlist[])
Read list of fields from file.
MTKt_status MtkFileCoreMetaDataGetNC(const char *filename, const char *param, MtkCoreMetaData *metadata)
MTKt_status MtkFileCoreMetaDataRawFid(int32 sds_id, char **coremeta)
Version of MtkFileCoreMetaDataRaw that takes an HDF SD file identifier rather than a filename...
MTKt_status MtkFileGridFieldToDataTypeHDF(const char *filename, const char *gridname, const char *fieldname, MTKt_DataType *datatype)
MTKt_status MtkFileCoreMetaDataGet(const char *filename, const char *param, MtkCoreMetaData *metadata)
Get core metadata parameter.
MTKt_status MtkFillValueGetNcid(int ncid, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
MTKt_status MtkFileGridToNativeFieldListNcid(int ncid, const char *gridname, int *nfields, char **fieldlist[])
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.
MTKt_status MtkTimeMetaRead(const char *filename, MTKt_TimeMetaData *time_metadata)
Read time metadata from L1B2 Ellipsoid product file.
MTKt_status MtkFileGridToNativeFieldListNC(const char *filename, const char *gridname, int *nfields, char **fieldlist[])
MTKt_status MtkFileTypeHDF(const char *filename, MTKt_FileType *filetype)
MTKt_status MtkGridAttrGetNcid(int ncid, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf)
MTKt_status MtkFileGridFieldToDimListHDF(const char *filename, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize)
MTKt_status MtkFileToPathNcid(int ncid, int *path)
MTKt_status MtkFileCoreMetaDataRawNC(const char *filename, char **coremeta)
MTKt_status MtkFileLGIDFid(int32 sds_id, char **lgid)
Version of MtkFileLGID that takes an HDF SDS ID rather than a filename.
MTKt_status MtkFileToOrbitHDF(const char *filename, int *orbit)
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...
MTKt_status MtkFileCoreMetaDataRawNcid(int ncid, char **coremeta)
struct MTKt_TimeMetaData MTKt_TimeMetaData
Time Metadata.
MTKt_status MtkFileVersionFid(int32 sd_id, char *fileversion)
Version of MtkFileVersion that takes an HDF SD file identifier rather than a filename.
MTKt_status MtkFileAttrListNC(const char *filename, int *num_attrs, char **attrlist[])
MTKt_status MtkFileToGridListNcid(int ncid, int *ngrids, char **gridlist[])
MTKt_status MtkFileAttrListNcid(int ncid, int *num_attrs, char **attrlist[])
MTKt_status MtkGridAttrGet(const char *filename, const char *gridname, const char *attrname, MTKt_DataBuffer *attrbuf)
Get a grid attribute.
MTKt_status MtkGridAttrListNC(const char *filename, const char *gridname, int *num_attrs, char **attrlist[])
MTKt_status MtkFileVersionHDF(const char *filename, char *fileversion)
MTKt_status MtkFileGridFieldToDimListNC(const char *filename, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize)
MTKt_status MtkFileToBlockRangeHDF(const char *filename, int *start_block, int *end_block)
MTKt_status MtkFileLGIDHDF(const char *filename, char **lgid)
MTKt_status MtkFieldAttrGetNC(const char *filename, const char *fieldname, 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.
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...
MTKt_status MtkFillValueGet(const char *filename, const char *gridname, const char *fieldname, MTKt_DataBuffer *fillbuf)
Get fill value.
MTKt_status MtkFileCoreMetaDataRaw(const char *filename, char **coremeta)
Read core metadata from a MISR product file into a buffer.
MTKt_status MtkFileCoreMetaDataGetNcid(int ncid, const char *param, MtkCoreMetaData *metadata)
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.
MTKt_status MtkFileCoreMetaDataQueryNC(const char *filename, int *nparam, char ***paramlist)
MTKt_status MtkFieldAttrListNcid(int ncid, const char *fieldname, int *num_attrs, char **attrlist[])
MTKt_status MtkFileBlockMetaFieldList(const char *filename, const char *blockmetaname, int *nfields, char **fieldlist[])
Read list of fields in a block metadata structure.
MTKt_status MtkFileBlockMetaList(const char *filename, int *nblockmeta, char ***blockmetalist)
List block metadata structures.
MTKt_status MtkFileToGridListNC(const char *filename, int *ngrids, char **gridlist[])
MTKt_status MtkFileCoreMetaDataGetHDF(const char *filename, const char *param, MtkCoreMetaData *metadata)
MTKt_status MtkFileTypeFid(int32 Fid, MTKt_FileType *filetype)
Version of MtkFileType that takes an HDF-EOS file identifier rather than a filename.
MTKt_status MtkFileGridToResolutionHDF(const char *filename, const char *gridname, int *resolution)
MTKt_status MtkGridAttrListHDF(const char *filename, const char *gridname, int *num_attrs, char **attrlist[])
MTKt_status MtkFieldAttrGet(const char *filename, const char *fieldname, const char *attrname, MTKt_DataBuffer *attrbuf)
Get a file attribute.
MTKt_status MtkFileToGridListFid(int32 fid, int *ngrids, char **gridlist[])
Version of MtkFileToGridList that takes an HDF-EOS file identifier rather than a filename.
MTKt_status MtkFileCoreMetaDataQuery(const char *filename, int *nparam, char ***paramlist)
Query file for core metadata.
MTKt_status MtkFileGridToNativeFieldList(const char *filename, const char *gridname, int *nfields, char **fieldlist[])
Read list of native fields from file (excludes derived fields)
MTKt_status MtkFileGridToResolutionFid(int32 fid, const char *gridname, int *resolution)
Version of MtkFileGridToResolution that takes an HDF-EOS file id rather than a filename.
MTKt_status MtkFileToPath(const char *filename, int *path)
Read path number from file.
MTKt_status MtkFileToPathHDF(const char *filename, int *path)
#define MTKd_DATETIME_LEN
MTKt_status MtkFileGridFieldToDimListNcid(int ncid, const char *gridname, const char *fieldname, int *dimcnt, char **dimlist[], int **dimsize)
MTKt_status MtkFieldAttrGetNcid(int ncid, const char *fieldname, const char *attrname, MTKt_DataBuffer *attrbuf)
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.
MTKt_status MtkFileGridToResolution(const char *filename, const char *gridname, int *resolution)
Get resolution of a particular grid.