MI - Fimex
CDMMerger.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Fimex, CDMMerger.h
3  *
4  * (C) Copyright 2012-2013, met.no
5  *
6  * Project Info: https://wiki.met.no/fimex/start
7  *
8  * This library is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  * License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21  * USA.
22  *
23  * Created on: Aug 28, 2012
24  * Author: Alexander Bürger
25  */
26 
27 #ifndef fimex_CDMMerger_H
28 #define fimex_CDMMerger_H 1
29 
31 #include "fimex/CDMReader.h"
33 #include "fimex/Data.h"
34 
35 namespace MetNoFimex {
36 
37 struct CDMMergerPrivate;
38 
53 class CDMMerger : public CDMReader {
54 public:
58  CDMMerger(boost::shared_ptr<CDMReader> inner, boost::shared_ptr<CDMReader> outer);
59 
65 
69  void setUseOuterIfInnerUndefined(bool useOuter);
70 
75  void setKeepOuterVariables(bool keepOuterVariabes);
76 
81  void setGridInterpolationMethod(int method);
82 
85  void setTargetGrid(const std::string& proj, const std::string& tx_axis, const std::string& ty_axis,
86  const std::string& tx_unit, const std::string& ty_unit,
87  const std::string& tx_type, const std::string& ty_type);
88 
91  void setTargetGrid(const std::string& proj, const std::vector<double>& tx, const std::vector<double>& ty,
92  const std::string& tx_unit, const std::string& ty_unit,
93  const CDMDataType& tx_type, const CDMDataType& ty_type);
94 
100  void setTargetGridFromInner();
101 
103  virtual boost::shared_ptr<Data> getDataSlice(const std::string &varName, std::size_t unLimDimPos);
104 
105 private:
107 };
108 
109 typedef boost::shared_ptr<CDMMerger> CDMMergerPtr;
110 
111 } // namespace MetNoFimex
112 
113 #endif /* fimex_CDMMerger_H */
void setGridInterpolationMethod(int method)
basic_string< char > string
virtual boost::shared_ptr< Data > getDataSlice(const std::string &varName, std::size_t unLimDimPos)
void setTargetGrid(const std::string &proj, const std::string &tx_axis, const std::string &ty_axis, const std::string &tx_unit, const std::string &ty_unit, const std::string &tx_type, const std::string &ty_type)
virtual DataPtr getDataSlice(const std::string &varName, size_t unLimDimPos)=0
data-reading function to be called from the CDMWriter
boost::shared_ptr< CDMMerger > CDMMergerPtr
Definition: CDMMerger.h:109
Definition: CDMMerger.h:53
Definition: C_CDMReader.h:35
Basic interface for CDM reading and manipulation classes.
Definition: CDMReader.h:53
boost::shared_ptr< SmoothingFactory > SmoothingFactoryPtr
Definition: CDMBorderSmoothing.h:78
void setKeepOuterVariables(bool keepOuterVariabes)
void setUseOuterIfInnerUndefined(bool useOuter)
void setSmoothing(CDMBorderSmoothing::SmoothingFactoryPtr smoothingFactory)
CDMMerger(boost::shared_ptr< CDMReader > inner, boost::shared_ptr< CDMReader > outer)
CDMDataType
Definition: CDMDataType.h:35