bes  Updated for version 3.20.8
h5commoncfdap.h
Go to the documentation of this file.
1 // This file is part of hdf5_handler: an HDF5 file handler for the OPeNDAP
2 // data server.
3 
4 // Copyright (c) 2011-2016 The HDF Group, Inc. and OPeNDAP, Inc.
5 //
6 // This is free software; you can redistribute it and/or modify it under the
7 // terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 2.1 of the License, or (at your
9 // option) any later version.
10 //
11 // This software is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 // License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 //
20 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
21 // You can contact The HDF Group, Inc. at 1800 South Oak Street,
22 // Suite 203, Champaign, IL 61820
23 
32 
33 #ifndef _H5COMMONCFDAP_H
34 #define _H5COMMONCFDAP_H
35 
36 #include <string>
37 
38 #include <DMR.h>
39 #include <DDS.h>
40 #include <DAS.h>
41 //#include <D4Attributes.h>
42 #include "hdf5.h"
43 
44 #include "HDF5CF.h"
45 
46 
47 void gen_dap_onevar_dds(libdap::DDS &dds, const HDF5CF::Var*, const hid_t, const string &);
48 void gen_dap_oneobj_das(libdap::AttrTable*, const HDF5CF::Attribute*, const HDF5CF::Var*);
49 
50 void add_cf_grid_mapping_attr(libdap::DAS &das, const std::vector<HDF5CF::Var*>& vars, const std::string& cf_projection,
51  const std::string & dim0name, hsize_t dim0size, const std::string &dim1name, hsize_t dim1size);
52 #if 0
53 void add_cf_grid_cv_attrs(DAS & das, const vector<HDF5CF::Var*>& vars, EOS5GridPCType cv_proj_code,
54  float cv_point_lower, float cv_point_upper, float cv_point_left, float cv_point_right,
55  const vector<HDF5CF::Dimension*>& dims,const vector<double>& params,const unsigned short);
56 #endif
57 void add_cf_grid_cv_attrs(libdap::DAS & das, const std::vector<HDF5CF::Var*>& vars, EOS5GridPCType cv_proj_code,
58  const std::vector<HDF5CF::Dimension*>& dims,const std::vector<double>& params,const unsigned short);
59 
60 void add_cf_projection_attrs(libdap::DAS &,EOS5GridPCType ,const std::vector<double> &,const std::string&);
61 void add_cf_grid_cvs(libdap::DDS & dds, EOS5GridPCType cv_proj_code, float cv_point_lower, float cv_point_upper,
62  float cv_point_left, float cv_point_right, const std::vector<HDF5CF::Dimension*>& dims);
63 
64 void add_cf_grid_mapinfo_var(libdap::DDS &dds,const EOS5GridPCType,const unsigned short);
65 bool need_special_attribute_handling(const HDF5CF::Attribute*, const HDF5CF::Var*);
66 void gen_dap_special_oneobj_das(libdap::AttrTable*, const HDF5CF::Attribute*, const HDF5CF::Var*);
67 bool is_fvalue_valid(H5DataType, const HDF5CF::Attribute*);
68 void gen_dap_str_attr(libdap::AttrTable*, const HDF5CF::Attribute *);
69 void add_ll_valid_range(libdap::AttrTable*, bool is_lat);
70 void map_cfh5_attrs_to_dap4(const HDF5CF::Var*var,libdap::BaseType*new_var);
71 bool need_attr_values_for_dap4(const HDF5CF::Var*var);
72 void check_update_int64_attr(const std::string &, const HDF5CF::Attribute *);
73 void handle_coor_attr_for_int64_var(const HDF5CF::Attribute *, const std::string &,std::string&,bool);
74 std::string get_cf_string(std::string & s);
75 std::string get_cf_string_helper(std::string & s);
76 
77 #endif
This class specifies the core engineering of mapping HDF5 to DAP by following CF.
This class represents one attribute.
Definition: HDF5CF.h:189
This class represents one HDF5 dataset(CF variable)
Definition: HDF5CF.h:259