19#ifndef INTERPOLATIONALGORITHMS_H
20#define INTERPOLATIONALGORITHMS_H
34class Meteo2DInterpolator;
38 Trend(
const std::vector< std::pair<std::string, std::string> >& vecArgs,
const std::string& algo,
const std::string& i_param);
40 void detrend(
const std::vector<StationData>& vecMeta, std::vector<double> &vecDat);
49 void initTrendModel(
const std::vector<double>& vecAltitudes,
const std::vector<double>& vecDat);
50 bool multilinearDetrend(
const std::vector<StationData>& vecMeta, std::vector<double> &vecDat);
52 static std::vector<double> getStationAltitudes(
const std::vector<StationData>& vecMeta);
56 const std::string param;
58 double trend_min_alt, trend_max_alt;
59 bool frac, soft, multilinear;
73 const std::string& i_algo,
const std::string& i_param,
TimeSeriesManager& i_tsm) :
86 std::vector<double>
getData(
const Date& i_date,
const std::string& i_param);
87 size_t getData(
const Date& i_date,
const std::string& i_param,
88 std::vector<double>& o_vecData, std::vector<StationData>& o_vecMeta);
Definition: InterpolationAlgorithms.h:100
static InterpolationAlgorithm * getAlgorithm(std::string algoname, Meteo2DInterpolator &mi, const std::vector< std::pair< std::string, std::string > > &vecArgs, TimeSeriesManager &tsm, GridsManager &gdm, const std::string ¶m)
Definition: InterpolationAlgorithms.cc:177
A class to represent DEMs and automatically compute some properties. This class stores elevation grid...
Definition: DEMObject.h:40
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
A class to perform 1D regressions.
Definition: libfit1D.h:159
A class to represent 2D Grids. Typical application as DEM or Landuse Model.
Definition: Grid2DObject.h:42
Definition: GridsManager.h:33
A class to perform 2D spatial interpolations. For more, see Spatial interpolations.
Definition: InterpolationAlgorithms.h:70
virtual ~InterpolationAlgorithm()
Definition: InterpolationAlgorithms.h:76
std::vector< double > vecData
store the measurement for the given parameter
Definition: InterpolationAlgorithms.h:93
Date date
Definition: InterpolationAlgorithms.h:91
virtual void calculate(const DEMObject &dem, Grid2DObject &grid)=0
std::ostringstream info
to store some extra information about the interplation process
Definition: InterpolationAlgorithms.h:95
size_t nrOfMeasurments
Number of stations that have been used, so this can be reported to the user.
Definition: InterpolationAlgorithms.h:97
const std::string algo
Definition: InterpolationAlgorithms.h:83
InterpolationAlgorithm(const std::vector< std::pair< std::string, std::string > > &, const std::string &i_algo, const std::string &i_param, TimeSeriesManager &i_tsm)
Definition: InterpolationAlgorithms.h:72
TimeSeriesManager & tsmanager
Definition: InterpolationAlgorithms.h:90
std::string getInfo() const
Return an information string about the interpolation process.
Definition: InterpolationAlgorithms.cc:274
std::vector< double > getData(const Date &i_date, const std::string &i_param)
Definition: InterpolationAlgorithms.cc:236
std::vector< StationData > vecMeta
store the station data for the given parameter
Definition: InterpolationAlgorithms.h:94
const std::string param
the parameter that we will interpolate
Definition: InterpolationAlgorithms.h:96
std::vector< MeteoData > vecMeteo
Definition: InterpolationAlgorithms.h:92
virtual double getQualityRating(const Date &i_date)=0
A class to spatially interpolate meteo parameters. For more, see Spatial interpolations.
Definition: Meteo2DInterpolator.h:97
Definition: TimeSeriesManager.h:31
Definition: InterpolationAlgorithms.h:36
std::string getInfo() const
Definition: InterpolationAlgorithms.cc:516
std::string toString() const
Definition: InterpolationAlgorithms.cc:524
void detrend(const std::vector< StationData > &vecMeta, std::vector< double > &vecDat)
Compute the trend according to the provided data and detrend vecDat.
Definition: InterpolationAlgorithms.cc:394
void retrend(const DEMObject &dem, Grid2DObject &grid) const
Re-apply the trend computed in a previous call to detrend() to the gridded results.
Definition: InterpolationAlgorithms.cc:448
Trend(const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &algo, const std::string &i_param)
Build a Trend object.
Definition: InterpolationAlgorithms.cc:306
bool is_soft() const
Definition: InterpolationAlgorithms.h:45
bool has_user_lapse() const
Definition: InterpolationAlgorithms.h:44
const double nodata
This is the internal nodata value.
Definition: IOUtils.h:75