98 if (hdf_status ==
FAIL)
106 hdf_status =
SDend(sds_id);
107 if (hdf_status ==
FAIL)
135 char *attr_buf = NULL;
137 if (coremeta == NULL)
141 hdf_status = attr_index =
SDfindattr(sds_id,
"coremetadata");
142 if (hdf_status ==
FAIL)
146 hdf_status =
SDattrinfo(sds_id, attr_index, attr_name, &data_type, &count);
147 if (hdf_status ==
FAIL)
151 attr_buf = (
char*)malloc((count + 1) *
sizeof(char));
152 if (attr_buf == NULL)
156 hdf_status =
SDreadattr(sds_id, attr_index, (VOIDP)attr_buf);
157 if (hdf_status ==
FAIL)
160 attr_buf[
count] =
'\0';
162 *coremeta = attr_buf;
167 if (attr_buf != NULL)
178 char *attr_buf = NULL;
180 if (coremeta == NULL) {
184 const char *group_name =
"HDFEOS INFORMATION";
185 const char *var_name =
"coremetadata";
189 int nc_status =
nc_inq_ncid(ncid, group_name, &group_id);
193 int status =
MtkNCVarId(group_id, var_name, &var);
213 attr_buf = (
char*)calloc((len + 1),
sizeof(char));
214 if (attr_buf == NULL)
221 *coremeta = attr_buf;
226 if (attr_buf != NULL)
HDFFCLIBAPI intf intf intf * count
EXTERNL int nc_inq_vardimid(int ncid, int varid, int *dimidsp)
#define MTK_ERR_CODE_JUMP(code)
HDFLIBAPI int32 SDstart(const char *name, int32 accs)
HDFLIBAPI intn SDreadattr(int32 id, int32 idx, void *buf)
EXTERNL int nc_inq_ncid(int ncid, const char *name, int *grp_ncid)
EXTERNL int nc_get_var_text(int ncid, int varid, char *ip)
EXTERNL int nc_inq_dimlen(int ncid, int dimid, size_t *lenp)
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)
#define MTK_ERR_COND_JUMP(code)
EXTERNL int nc_inq_varndims(int ncid, int varid, int *ndimsp)
EXTERNL int nc_close(int ncid)
MTKt_status MtkNCVarId(int Ncid, const char *Name, MTKt_ncvarid *Var)
EXTERNL int nc_open(const char *path, int mode, int *ncidp)