21 #include <HdfEosDef.h> 101 if (hdf_status ==
FAIL)
109 hdf_status =
SDend(sds_id);
110 if (hdf_status ==
FAIL)
140 char attr_name_tmp[
MAXSTR];
142 if (attrname == NULL || attrbuf == NULL)
146 hdf_status = attr_index =
SDfindattr(sds_id, attrname);
147 if (hdf_status ==
FAIL)
151 hdf_status =
SDattrinfo(sds_id, attr_index, attr_name_tmp, &hdf_datatype, &count);
152 if (hdf_status ==
FAIL)
167 if (hdf_status ==
FAIL)
170 *attrbuf = attrbuf_tmp;
191 if (attrname == NULL || attrbuf == NULL)
210 *attrbuf = attrbuf_tmp;
HDFFCLIBAPI intf intf intf * count
MTKt_status MtkNcToMtkDataTypeConvert(nc_type nc_datatype, MTKt_DataType *datatype)
EXTERNL int nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep)
MTKt_status MtkDataBufferAllocate(int nline, int nsample, MTKt_DataType datatype, MTKt_DataBuffer *databuf)
Allocate Data Buffer.
HDFFCLIBAPI _fcd _fcd intf intf * datatype
EXTERNL int nc_get_att(int ncid, int varid, const char *name, void *ip)
MTKt_status MtkFileAttrGetHDF(const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf)
#define MTK_ERR_CODE_JUMP(code)
2-dimensional Data Buffer
HDFFCLIBAPI intf intf _fcd attrname
HDFLIBAPI int32 SDstart(const char *name, int32 accs)
MTKt_status MtkHdfToMtkDataTypeConvert(int32 hdf_datatype, MTKt_DataType *datatype)
Convert HDF data type to MISR Toolkit data type.
HDFLIBAPI intn SDreadattr(int32 id, int32 idx, void *buf)
#define MTKT_DATABUFFER_INIT
MTKt_status MtkDataBufferFree(MTKt_DataBuffer *databuf)
Free data buffer.
HDFLIBAPI intn SDend(int32 fid)
HDFLIBAPI int32 SDfindattr(int32 id, const char *attrname)
HDFLIBAPI intn SDattrinfo(int32 id, int32 idx, char *name, int32 *nt, int32 *count)
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.
#define MTK_ERR_COND_JUMP(code)
MTKt_status MtkFileAttrGet(const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf)
Get a file attribute.
EXTERNL int nc_close(int ncid)
EXTERNL int nc_open(const char *path, int mode, int *ncidp)
MTKt_status MtkFileAttrGetNcid(int ncid, const char *attrname, MTKt_DataBuffer *attrbuf)
MTKt_status MtkFileAttrGetNC(const char *filename, const char *attrname, MTKt_DataBuffer *attrbuf)