MeteoIODoc  MeteoIODoc-2.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ODKrigAlgorithm.h
Go to the documentation of this file.
1 /***********************************************************************************/
2 /* Copyright 2013 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
3 /***********************************************************************************/
4 /* This file is part of MeteoIO.
5  MeteoIO is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  MeteoIO is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef ORDINARYKRIGINGALGORITHM_H
19 #define ORDINARYKRIGINGALGORITHM_H
20 
23 
24 namespace mio {
25 
49  public:
51  const std::vector<std::string>& i_vecArgs,
52  const std::string& i_algo, TimeSeriesManager& i_tsmanager, GridsManager& i_gridsmanager)
53  : InterpolationAlgorithm(i_mi, i_vecArgs, i_algo, i_tsmanager, i_gridsmanager), variogram() {}
54  virtual double getQualityRating(const Date& i_date, const MeteoData::Parameters& in_param);
55  virtual void calculate(const DEMObject& dem, Grid2DObject& grid);
56  protected:
57  size_t getTimeSeries(const bool& detrend_data, std::vector< std::vector<double> > &vecVecData) const;
58  void getDataForEmpiricalVariogram(std::vector<double> &distData, std::vector<double> &variData) const;
59  void getDataForVariogram(std::vector<double> &distData, std::vector<double> &variData, const bool& detrend_data=false) const;
60  bool computeVariogram(const bool& detrend_data=false);
62 };
63 
64 } //end namespace mio
65 
66 #endif
size_t getTimeSeries(const bool &detrend_data, std::vector< std::vector< double > > &vecVecData) const
Definition: ODKrigAlgorithm.cc:55
void getDataForVariogram(std::vector< double > &distData, std::vector< double > &variData, const bool &detrend_data=false) const
Definition: ODKrigAlgorithm.cc:119
Ordinary kriging. This implements ordinary krigging (see https://secure.wikimedia.org/wikipedia/en/wiki/Kriging) with user-selectable variogram model (see https://secure.wikimedia.org/wikipedia/en/wiki/Variogram). More details about the specific computation steps of kriging are provided in Interpol2D::ODKriging.
Definition: ODKrigAlgorithm.h:48
Definition: GridsManager.h:28
Fit1D variogram
Definition: ODKrigAlgorithm.h:61
virtual void calculate(const DEMObject &dem, Grid2DObject &grid)
Definition: ODKrigAlgorithm.cc:191
Parameters
Definition: MeteoData.h:119
A class to perform 2D spatial interpolations. For more, see Spatial interpolations.
Definition: InterpolationAlgorithms.h:43
A class to represent DEMs and automatically compute some properties. This class stores elevation grid...
Definition: DEMObject.h:39
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition: Grid2DObject.h:37
A class to spatially interpolate meteo parameters. For more, see Spatial interpolations.
Definition: Meteo2DInterpolator.h:99
bool computeVariogram(const bool &detrend_data=false)
Definition: ODKrigAlgorithm.cc:156
A class to perform 1D regressions It works on a time serie and uses either ad-hoc methods or matrix a...
Definition: libfit1D.h:119
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:79
void getDataForEmpiricalVariogram(std::vector< double > &distData, std::vector< double > &variData) const
Definition: ODKrigAlgorithm.cc:26
OrdinaryKrigingAlgorithm(Meteo2DInterpolator &i_mi, const std::vector< std::string > &i_vecArgs, const std::string &i_algo, TimeSeriesManager &i_tsmanager, GridsManager &i_gridsmanager)
Definition: ODKrigAlgorithm.h:50
Definition: TimeSeriesManager.h:31
virtual double getQualityRating(const Date &i_date, const MeteoData::Parameters &in_param)
Definition: ODKrigAlgorithm.cc:180