41 #include "config_hdf5.h"
43 #include <libdap/InternalErr.h>
46 #include <libdap/mime_util.h>
95 bool depth_first(hid_t pid,
char *gname, D4Group* par_grp,
const char *fname)
98 ">depth_first() for dmr "
100 <<
" gname: " << gname
101 <<
" fname: " << fname
111 if(H5Gget_info(pid,&g_info) <0) {
113 "h5_dmr handler: counting hdf5 group elements error for ";
115 throw InternalErr(__FILE__, __LINE__, msg);
118 nelems = g_info.nlinks;
120 ssize_t oname_size = 0;
123 for (hsize_t i = 0; i < nelems; i++) {
129 H5Lget_name_by_idx(pid,
".",H5_INDEX_NAME,H5_ITER_NATIVE,i,NULL,
131 if (oname_size <= 0) {
132 string msg =
"h5_dmr handler: Error getting the size of the hdf5 object from the group: ";
134 throw InternalErr(__FILE__, __LINE__, msg);
138 oname.resize((
size_t) oname_size + 1);
140 if (H5Lget_name_by_idx(pid,
".",H5_INDEX_NAME,H5_ITER_NATIVE,i,&oname[0],
141 (
size_t)(oname_size+1), H5P_DEFAULT) < 0){
143 "h5_dmr handler: Error getting the hdf5 object name from the group: ";
145 throw InternalErr(__FILE__, __LINE__, msg);
150 if (H5Lget_info(pid,&oname[0],&linfo,H5P_DEFAULT)<0) {
151 string msg =
"hdf5 link name error from: ";
153 throw InternalErr(__FILE__, __LINE__, msg);
157 if(linfo.type == H5L_TYPE_SOFT) {
159 size_t val_size = linfo.u.val_size;
160 get_softlink(par_grp,pid,&oname[0],slinkindex,val_size);
166 if(linfo.type == H5L_TYPE_EXTERNAL)
172 if (H5OGET_INFO_BY_IDX(pid,
".", H5_INDEX_NAME, H5_ITER_NATIVE,
173 i, &oinfo, H5P_DEFAULT)<0) {
174 string msg =
"h5_dmr handler: Error obtaining the info for the object";
175 msg += string(oname.begin(),oname.end());
176 throw InternalErr(__FILE__, __LINE__, msg);
179 H5O_type_t obj_type = oinfo.type;
187 string full_path_name =
188 string(gname) + string(oname.begin(),oname.end()-1) +
"/";
190 BESDEBUG(
"h5",
"=depth_first dmr ():H5G_GROUP " << full_path_name
194 t_fpn.resize(full_path_name.length()+1);
195 copy(full_path_name.begin(),full_path_name.end(),t_fpn.begin());
196 t_fpn[full_path_name.length()] =
'\0';
198 hid_t cgroup = H5Gopen(pid, &t_fpn[0],H5P_DEFAULT);
200 throw InternalErr(__FILE__, __LINE__,
"h5_dmr handler: H5Gopen() failed.");
203 string grp_name = string(oname.begin(),oname.end()-1);
206 string oid = get_hardlink_dmr(cgroup, full_path_name.c_str());
209 D4Group* tem_d4_cgroup =
new D4Group(grp_name);
215 par_grp->add_group_nocopy(tem_d4_cgroup);
219 depth_first(cgroup, &t_fpn[0], tem_d4_cgroup,fname);
230 D4Group* tem_d4_cgroup =
new D4Group(
string(grp_name));
233 D4Attribute *d4_hlinfo =
new D4Attribute(
"HDF5_HARDLINK",attr_str_c);
236 tem_d4_cgroup->attributes()->add_attribute_nocopy(d4_hlinfo);
237 par_grp->add_group_nocopy(tem_d4_cgroup);
241 if (H5Gclose(cgroup) < 0){
242 throw InternalErr(__FILE__, __LINE__,
"Could not close the group.");
247 case H5O_TYPE_DATASET:
251 string full_path_name = string(gname) + string(oname.begin(),oname.end()-1);
264 if((dset_id = H5Dopen(pid,full_path_name.c_str(),H5P_DEFAULT)) <0) {
265 string msg =
"cannot open the HDF5 dataset ";
266 msg += full_path_name;
267 throw InternalErr(__FILE__, __LINE__, msg);
277 if(H5Dclose(dset_id)<0) {
278 string msg =
"cannot close the HDF5 dataset ";
279 msg += full_path_name;
280 throw InternalErr(__FILE__, __LINE__, msg);
285 case H5O_TYPE_NAMED_DATATYPE:
293 BESDEBUG(
"h5",
"<depth_first() for dmr" << endl);
321 bool breadth_first(
const hid_t file_id, hid_t pid,
char *gname, D4Group* par_grp,
const char *fname,
bool use_dimscale,vector<link_info_t> & hdf5_hls )
324 ">breadth_first() for dmr "
326 <<
" gname: " << gname
327 <<
" fname: " << fname
336 if(H5Gget_info(pid,&g_info) <0) {
338 "h5_dmr handler: counting hdf5 group elements error for ";
340 throw InternalErr(__FILE__, __LINE__, msg);
343 nelems = g_info.nlinks;
348 for (hsize_t i = 0; i < nelems; i++) {
354 H5Lget_name_by_idx(pid,
".",H5_INDEX_NAME,H5_ITER_NATIVE,i,NULL,
356 if (oname_size <= 0) {
357 string msg =
"h5_dmr handler: Error getting the size of the hdf5 object from the group: ";
359 throw InternalErr(__FILE__, __LINE__, msg);
363 oname.resize((
size_t) oname_size + 1);
365 if (H5Lget_name_by_idx(pid,
".",H5_INDEX_NAME,H5_ITER_NATIVE,i,&oname[0],
366 (
size_t)(oname_size+1), H5P_DEFAULT) < 0){
368 "h5_dmr handler: Error getting the hdf5 object name from the group: ";
370 throw InternalErr(__FILE__, __LINE__, msg);
375 if (H5Lget_info(pid,&oname[0],&linfo,H5P_DEFAULT)<0) {
376 string msg =
"hdf5 link name error from: ";
378 throw InternalErr(__FILE__, __LINE__, msg);
382 if(linfo.type == H5L_TYPE_SOFT) {
386 size_t val_size = linfo.u.val_size;
387 get_softlink(par_grp,pid,&oname[0],slinkindex,val_size);
392 if(linfo.type == H5L_TYPE_EXTERNAL)
398 if (H5OGET_INFO_BY_IDX(pid,
".", H5_INDEX_NAME, H5_ITER_NATIVE,
399 i, &oinfo, H5P_DEFAULT)<0) {
400 string msg =
"h5_dmr handler: Error obtaining the info for the object";
401 msg += string(oname.begin(),oname.end());
402 throw InternalErr(__FILE__, __LINE__, msg);
405 H5O_type_t obj_type = oinfo.type;
407 if(H5O_TYPE_DATASET == obj_type) {
410 string full_path_name = string(gname) + string(oname.begin(),oname.end()-1);
417 bool is_pure_dim =
false;
418 get_dataset_dmr(file_id, pid, full_path_name, &dt_inst,use_dimscale,is_pure_dim,hdf5_hls);
420 if(
false == is_pure_dim) {
422 if((dset_id = H5Dopen(pid,full_path_name.c_str(),H5P_DEFAULT)) <0) {
423 string msg =
"cannot open the HDF5 dataset ";
424 msg += full_path_name;
425 throw InternalErr(__FILE__, __LINE__, msg);
435 if(H5Dclose(dset_id)<0) {
436 string msg =
"cannot close the HDF5 dataset ";
437 msg += full_path_name;
438 throw InternalErr(__FILE__, __LINE__, msg);
443 D4Dimensions *d4_dims = par_grp->dims();
444 string d4dim_name = string(oname.begin(),oname.end()-1);
445 D4Dimension *d4_dim = d4_dims->find_dim(d4dim_name);
447 d4_dim =
new D4Dimension(d4dim_name,dt_inst.
nelmts);
448 d4_dims->add_dim_nocopy(d4_dim);
450 BESDEBUG(
"h5",
"<h5dmr.cc: pure dimension: dataset name." << d4dim_name << endl);
451 if(H5Tclose(dt_inst.
type)<0) {
452 throw InternalErr(__FILE__, __LINE__,
"Cannot close the HDF5 datatype.");
463 for (hsize_t i = 0; i < nelems; i++) {
469 H5Lget_name_by_idx(pid,
".",H5_INDEX_NAME,H5_ITER_NATIVE,i,NULL,
471 if (oname_size <= 0) {
472 string msg =
"h5_dmr handler: Error getting the size of the hdf5 object from the group: ";
474 throw InternalErr(__FILE__, __LINE__, msg);
478 oname.resize((
size_t) oname_size + 1);
480 if (H5Lget_name_by_idx(pid,
".",H5_INDEX_NAME,H5_ITER_NATIVE,i,&oname[0],
481 (
size_t)(oname_size+1), H5P_DEFAULT) < 0){
483 "h5_dmr handler: Error getting the hdf5 object name from the group: ";
485 throw InternalErr(__FILE__, __LINE__, msg);
490 if (H5Lget_info(pid,&oname[0],&linfo,H5P_DEFAULT)<0) {
491 string msg =
"hdf5 link name error from: ";
493 throw InternalErr(__FILE__, __LINE__, msg);
498 if(linfo.type == H5L_TYPE_SOFT) {
503 if(linfo.type == H5L_TYPE_EXTERNAL)
509 if (H5OGET_INFO_BY_IDX(pid,
".", H5_INDEX_NAME, H5_ITER_NATIVE,
510 i, &oinfo, H5P_DEFAULT)<0) {
511 string msg =
"h5_dmr handler: Error obtaining the info for the object in the breadth_first.";
512 throw InternalErr(__FILE__, __LINE__, msg);
515 H5O_type_t obj_type = oinfo.type;
518 if(obj_type == H5O_TYPE_GROUP) {
521 string full_path_name =
522 string(gname) + string(oname.begin(),oname.end()-1) +
"/";
524 BESDEBUG(
"h5",
"=breadth_first dmr ():H5G_GROUP " << full_path_name
528 t_fpn.resize(full_path_name.length()+1);
529 copy(full_path_name.begin(),full_path_name.end(),t_fpn.begin());
530 t_fpn[full_path_name.length()] =
'\0';
532 hid_t cgroup = H5Gopen(pid, &t_fpn[0],H5P_DEFAULT);
534 throw InternalErr(__FILE__, __LINE__,
"h5_dmr handler: H5Gopen() failed.");
537 string grp_name = string(oname.begin(),oname.end()-1);
540 string oid = get_hardlink_dmr(cgroup, full_path_name.c_str());
543 D4Group* tem_d4_cgroup =
new D4Group(grp_name);
546 par_grp->add_group_nocopy(tem_d4_cgroup);
549 breadth_first(file_id,cgroup, &t_fpn[0], tem_d4_cgroup,fname,use_dimscale,hdf5_hls);
560 D4Group* tem_d4_cgroup =
new D4Group(
string(grp_name));
563 D4Attribute *d4_hlinfo =
new D4Attribute(
"HDF5_HARDLINK",attr_str_c);
566 tem_d4_cgroup->attributes()->add_attribute_nocopy(d4_hlinfo);
567 par_grp->add_group_nocopy(tem_d4_cgroup);
570 if (H5Gclose(cgroup) < 0){
571 throw InternalErr(__FILE__, __LINE__,
"Could not close the group.");
576 BESDEBUG(
"h5",
"<breadth_first() " << endl);
597 read_objects( D4Group * d4_grp,
const string &varname,
const string &filename,
const hid_t dset_id)
600 switch (H5Tget_class(dt_inst.
type)) {
608 H5Tclose(dt_inst.
type);
609 throw InternalErr(__FILE__, __LINE__,
"Currently don't support accessing data of Array datatype when array datatype is not inside the compound.");
616 if(H5Tclose(dt_inst.
type)<0) {
617 throw InternalErr(__FILE__, __LINE__,
"Cannot close the HDF5 datatype.");
641 const string & filename,hid_t dset_id)
645 string newvarname = HDF5CFUtil::obtain_string_after_lastslash(varname);
649 BaseType *bt = Get_bt(newvarname, varname,filename, dt_inst.
type,
true);
652 InternalErr(__FILE__, __LINE__,
653 "Unable to convert hdf5 datatype to dods basetype");
657 if (dt_inst.
ndims == 0) {
659 bt->transform_to_dap4(d4_grp,d4_grp);
662 BaseType* new_var = d4_grp->var(bt->name());
667 map_h5_dset_hardlink_to_d4(dset_id,varname,new_var,NULL,1);
683 ar->set_varpath(varname);
687 int dimnames_size = 0;
688 if((
unsigned int)((
int)(dt_inst.dimnames.size())) != dt_inst.dimnames.size())
692 InternalErr(__FILE__, __LINE__,
693 "number of dimensions: overflow");
695 dimnames_size = (
int)(dt_inst.dimnames.size());
699 if(dimnames_size ==dt_inst.
ndims) {
701 for (
int dim_index = 0; dim_index < dt_inst.
ndims; dim_index++) {
702 if(dt_inst.dimnames[dim_index] !=
"")
703 ar->append_dim(dt_inst.
size[dim_index],dt_inst.dimnames[dim_index]);
705 ar->append_dim(dt_inst.
size[dim_index]);
708 dt_inst.dimnames.clear();
712 for (
int dim_index = 0; dim_index < dt_inst.
ndims; dim_index++)
713 ar->append_dim(dt_inst.
size[dim_index]);
717 BaseType* new_var = NULL;
719 new_var = ar->h5dims_transform_to_dap4(d4_grp,dt_inst.dimnames_path);
727 dt_inst.dimnames_path.clear();
733 map_h5_dset_hardlink_to_d4(dset_id,varname,new_var,NULL,1);
736 D4Attribute *test_attr =
new D4Attribute(
"DAP4_test",attr_str_c);
737 test_attr->add_value(
"test_grp_attr");
738 new_var->attributes()->add_attribute_nocopy(test_attr);
741 d4_grp->add_var_nocopy(new_var);
744 BESDEBUG(
"h5",
"<read_objects_base_type(dmr)" << endl);
763 const string & filename,hid_t dset_id)
766 string newvarname = HDF5CFUtil::obtain_string_after_lastslash(varname);
769 Structure *structure = Get_structure(newvarname, varname,filename, dt_inst.
type,
true);
772 BESDEBUG(
"h5",
"=read_objects_structure(): Dimension is "
773 << dt_inst.
ndims << endl);
775 if (dt_inst.
ndims != 0) {
776 BESDEBUG(
"h5",
"=read_objects_structure(): array of size " <<
778 BESDEBUG(
"h5",
"=read_objects_structure(): memory needed = " <<
779 dt_inst.
need << endl);
783 delete structure; structure = 0;
790 ar->set_length((
int) (dt_inst.
nelmts));
791 ar->set_varpath(varname);
794 int dimnames_size = 0;
795 if((
unsigned int)((
int)(dt_inst.dimnames.size())) != dt_inst.dimnames.size())
799 InternalErr(__FILE__, __LINE__,
800 "number of dimensions: overflow");
802 dimnames_size = (
int)(dt_inst.dimnames.size());
805 if(dimnames_size ==dt_inst.
ndims) {
806 for (
int dim_index = 0; dim_index < dt_inst.
ndims; dim_index++) {
807 if(dt_inst.dimnames[dim_index] !=
"")
808 ar->append_dim(dt_inst.
size[dim_index],dt_inst.dimnames[dim_index]);
810 ar->append_dim(dt_inst.
size[dim_index]);
812 dt_inst.dimnames.clear();
815 for (
int dim_index = 0; dim_index < dt_inst.
ndims; dim_index++)
816 ar->append_dim(dt_inst.
size[dim_index]);
821 BaseType* new_var = ar->h5dims_transform_to_dap4(d4_grp,dt_inst.dimnames_path);
822 dt_inst.dimnames_path.clear();
828 map_h5_dset_hardlink_to_d4(dset_id,varname,new_var,NULL,1);
832 d4_grp->add_var_nocopy(new_var);
837 structure->set_is_dap4(
true);
839 map_h5_dset_hardlink_to_d4(dset_id,varname,NULL,structure,2);
841 d4_grp->add_var_nocopy(structure);
870 if (H5OGET_INFO(h5_objid, &obj_info) <0) {
871 string msg =
"Fail to obtain the HDF5 object info. .";
872 throw InternalErr(__FILE__, __LINE__, msg);
876 int num_attr = obj_info.num_attrs;
878 string msg =
"Fail to get the number of attributes for the HDF5 object. ";
879 throw InternalErr(__FILE__, __LINE__,msg);
883 vector<char>temp_buf;
885 bool ignore_attr =
false;
887 for (
int j = 0; j < num_attr; j++) {
895 attr_id =
get_attr_info(h5_objid, j,
true,&attr_inst, &ignore_attr);
896 if (
true == ignore_attr) {
906 hid_t ty_id = H5Aget_type(attr_id);
909 throw InternalErr(__FILE__, __LINE__,
"Cannot retrieve HDF5 attribute datatype successfully.");
915 D4AttributeType dap4_attr_type = daptype_strrep_to_dap4_attrtype(dap_type);
918 if(attr_null_c == dap4_attr_type) {
921 throw InternalErr(__FILE__, __LINE__,
"unsupported DAP4 attribute type");
924 string attr_name = attr_inst.
name;
925 BESDEBUG(
"h5",
"arttr_name= " << attr_name << endl);
928 D4Attribute *d4_attr =
new D4Attribute(attr_name,dap4_attr_type);
931 if (H5Tis_variable_str(ty_id)) {
932 write_vlen_str_attrs(attr_id,ty_id,&attr_inst,d4_attr,NULL,
true);
937 value.resize(attr_inst.
need +
sizeof(
char));
939 BESDEBUG(
"h5",
"arttr_inst.need=" << attr_inst.
need << endl);
942 hid_t memtype = H5Tget_native_type(ty_id, H5T_DIR_ASCEND);
944 if (H5Aread(attr_id, memtype, (
void *) (&value[0])) < 0) {
946 throw InternalErr(__FILE__, __LINE__,
"unable to read HDF5 attribute data");
951 if (attr_inst.
ndims == 0) {
952 for (
int loc = 0; loc < (
int) attr_inst.
nelmts; loc++) {
953 print_rep =
print_attr(ty_id, loc, &value[0]);
954 if (print_rep.c_str() != NULL) {
955 d4_attr->add_value(print_rep);
963 int elesize = (
int) H5Tget_size(ty_id);
968 throw InternalErr(__FILE__, __LINE__,
"unable to get attibute size");
973 char *tempvalue = &value[0];
977 for( hsize_t temp_index = 0; temp_index < attr_inst.
nelmts; temp_index ++) {
980 if (print_rep.c_str() != NULL) {
982 BESDEBUG(
"h5",
"print_rep= " << print_rep << endl);
984 d4_attr->add_value(print_rep);
985 tempvalue = tempvalue + elesize;
987 "tempvalue= " << tempvalue
988 <<
"elesize=" << elesize
996 throw InternalErr(__FILE__, __LINE__,
"unable to convert attibute value to DAP");
1001 if(H5Tclose(ty_id) < 0) {
1004 throw InternalErr(__FILE__, __LINE__,
"unable to close HDF5 type id");
1006 if (H5Aclose(attr_id) < 0) {
1008 throw InternalErr(__FILE__, __LINE__,
"unable to close attibute id");
1012 d4g->attributes()->add_attribute_nocopy(d4_attr);
1014 d4b->attributes()->add_attribute_nocopy(d4_attr);
1015 else if ( 2 == flag)
1016 d4s->attributes()->add_attribute_nocopy(d4_attr);
1020 string msg =
"The add_dap4_attr flag has to be either 0,1 or 2.";
1021 msg+=
"The current flag is "+sflag.str();
1023 throw InternalErr(__FILE__, __LINE__, msg);
1045 void map_h5_dset_hardlink_to_d4(hid_t h5_dsetid,
const string & full_path, BaseType* d4b,Structure * d4s,
int flag) {
1048 string oid = get_hardlink_dmr(h5_dsetid, full_path);
1051 if(
false == oid.empty()) {
1053 D4Attribute *d4_hlinfo =
new D4Attribute(
"HDF5_HARDLINK",attr_str_c);
1057 d4b->attributes()->add_attribute_nocopy(d4_hlinfo);
1058 else if ( 2 == flag)
1059 d4s->attributes()->add_attribute_nocopy(d4_hlinfo);
1078 void get_softlink(D4Group* par_grp, hid_t h5obj_id,
const string & oname,
int index,
size_t val_size)
1080 BESDEBUG(
"h5",
"dap4 >get_softlink():" << oname << endl);
1083 oss << string(
"HDF5_SOFTLINK");
1086 string temp_varname = oss.str();
1089 BESDEBUG(
"h5",
"dap4->get_softlink():" << temp_varname << endl);
1090 D4Attribute *d4_slinfo =
new D4Attribute;
1091 d4_slinfo->set_name(temp_varname);
1094 d4_slinfo->set_type(attr_container_c);
1096 string softlink_name =
"linkname";
1098 D4Attribute *softlink_src =
new D4Attribute(softlink_name,attr_str_c);
1099 softlink_src->add_value(oname);
1101 d4_slinfo->attributes()->add_attribute_nocopy(softlink_src);
1102 string softlink_value_name =
"LINKTARGET";
1105 D4Attribute *softlink_tgt = 0;
1109 buf.resize(val_size + 1);
1112 if (H5Lget_val(h5obj_id, oname.c_str(), (
void*) &buf[0], val_size + 1, H5P_DEFAULT) < 0) {
1113 throw InternalErr(__FILE__, __LINE__,
"unable to get link value");
1115 softlink_tgt =
new D4Attribute(softlink_value_name, attr_str_c);
1116 string link_target_name = string(buf.begin(), buf.end());
1117 softlink_tgt->add_value(link_target_name);
1119 d4_slinfo->attributes()->add_attribute_nocopy(softlink_tgt);
1122 delete softlink_tgt;
1126 par_grp->attributes()->add_attribute_nocopy(d4_slinfo);
1142 string get_hardlink_dmr( hid_t h5obj_id,
const string & oname) {
1144 BESDEBUG(
"h5",
"dap4->get_hardlink_dmr():" << oname << endl);
1147 H5O_info_t obj_info;
1148 if (H5OGET_INFO(h5obj_id, &obj_info) <0) {
1149 throw InternalErr(__FILE__, __LINE__,
"H5OGET_INFO() failed.");
1156 if (obj_info.rc >1) {
1160 #if (H5_VERS_MAJOR == 1 && ((H5_VERS_MINOR == 12) || (H5_VERS_MINOR == 13)))
1161 char *obj_tok_str = NULL;
1162 if(H5Otoken_to_str(h5obj_id, &(obj_info.token), &obj_tok_str) <0) {
1163 throw InternalErr(__FILE__, __LINE__,
"H5Otoken_to_str failed.");
1165 objno.assign(obj_tok_str,obj_tok_str+strlen(obj_tok_str));
1166 H5free_memory(obj_tok_str);
1170 oss << hex << obj_info.addr;
1174 BESDEBUG(
"h5",
"dap4->get_hardlink_dmr() objno=" << objno << endl);
A class for handling all types of array in HDF5 for the default option.
This class provides a way to map HDF5 byte to DAP Byte for the default option.
This file includes several helper functions for translating HDF5 to CF-compliant.
A class for mapping HDF5 32-bit float to DAP for the default option.
A class for mapping HDF5 64-bit float to DAP for the default option.
A class for HDF5 signed 16 bit integer type.
This class provides a way to map HDF5 32 bit integer to DAP Int32 for the default option.
This class that translates HDF5 string into DAP string for the default option.
This class converts HDF5 compound type into DAP structure for the default option.
This class provides a way to map unsigned HDF5 16 bit integer to DAP UInt16 for the default option.
This class provides a way to map unsigned HDF5 32 bit integer to DAP UInt32.
This class generates DAP URL type for the default option.
void set_numdim(int ndims)
remembers number of dimensions of this array.
void set_numelm(int nelms)
remembers number of elements in this array.
void set_memneed(size_t need)
remembers memory size needed.
std::string get_name(std::string id)
bool add(std::string id, const std::string name)
void depth_first(hid_t pid, const char *gname, DAS &das)
void read_objects(DAS &das, const string &varname, hid_t oid, int num_attr)
void read_objects_base_type(DDS &dds_table, const string &varname, const string &filename)
void read_objects_structure(DDS &dds_table, const string &varname, const string &filename)
void map_h5_attrs_to_dap4(hid_t oid, D4Group *d4g, BaseType *d4b, Structure *d4s, int flag)
A function that map HDF5 attributes to DAP4.
HDF5PathFinder obj_paths
A variable for remembering visited paths to break cyclic HDF5 groups.
bool breadth_first(const hid_t file_id, hid_t pid, char *gname, D4Group *par_grp, const char *fname, bool use_dimscale, vector< link_info_t > &hdf5_hls)
void get_softlink(D4Group *par_grp, hid_t h5obj_id, const string &oname, int index, size_t val_size)
Data structure and retrieval processing header for the default option.
string print_attr(hid_t type, int loc, void *sm_buf)
string get_dap_type(hid_t type, bool is_dap4)
void get_dataset(hid_t pid, const string &dname, DS_t *dt_inst_ptr)
hid_t get_attr_info(hid_t dset, int index, bool is_dap4, DSattr_t *attr_inst_ptr, bool *ignore_attr_ptr)
The main header of the HDF5 OPeNDAP handler.
const int DODS_NAMELEN
Maximum length of variable or attribute name(default option only).
A structure for DDS generation.
hsize_t nelmts
Number of elements.
hsize_t need
Space needed.
hid_t type
HDF5 data set id.
int size[DODS_MAX_RANK]
Size of each dimension.
int ndims
HDF5 data space id.
A structure for DAS generation.
char name[DODS_NAMELEN]
Name of HDF5 group or dataset.
int ndims
Number of dimensions.
hsize_t nelmts
Number of elements.
hsize_t need
Memory space needed to hold nelmts type.