MeteoIODoc  2.10.0
mio::IDWAlgorithm Class Reference

Detailed Description

Inverse Distance Weighting interpolation algorithm.

Each cell receives the weighted average of the whole data set with weights being 1/r² (r being the distance of the current cell to the contributing station) and renormalized (so that the sum of the weights is equal to 1.0). It takes the following arguments:

  • SCALE: this is a scaling parameter to smooth the IDW distribution. In effect, this is added to the distance in order to move into the tail of the 1/d distribution (default: 1000m);
  • ALPHA: this is an exponent to the 1/d distribution (default: 1);
Note
If IDW is applied on wind speed (VW, VW_MAX or VW_DRIFT) or wind direction (DW), the algorithm internally applies the interpolation on the wind speed components individually, if both wind speed and direction are available at the same station.

#include <IDWAlgorithm.h>

Public Member Functions

 IDWAlgorithm (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &i_algo, const std::string &i_param, TimeSeriesManager &i_tsm)
 
virtual double getQualityRating (const Date &i_date)
 
virtual void calculate (const DEMObject &dem, Grid2DObject &grid)
 
- Public Member Functions inherited from mio::InterpolationAlgorithm
 InterpolationAlgorithm (const std::vector< std::pair< std::string, std::string > > &, const std::string &i_algo, const std::string &i_param, TimeSeriesManager &i_tsm)
 
virtual ~InterpolationAlgorithm ()
 
std::string getInfo () const
 Return an information string about the interpolation process. More...
 

Additional Inherited Members

- Public Attributes inherited from mio::InterpolationAlgorithm
const std::string algo
 
- Protected Member Functions inherited from mio::InterpolationAlgorithm
std::vector< double > getData (const Date &i_date, const std::string &i_param)
 
size_t getData (const Date &i_date, const std::string &i_param, std::vector< double > &o_vecData, std::vector< StationData > &o_vecMeta)
 
- Protected Attributes inherited from mio::InterpolationAlgorithm
TimeSeriesManagertsmanager
 
Date date
 
std::vector< MeteoDatavecMeteo
 
std::vector< double > vecData
 store the measurement for the given parameter More...
 
std::vector< StationDatavecMeta
 store the station data for the given parameter More...
 
std::ostringstream info
 to store some extra information about the interplation process More...
 
const std::string param
 the parameter that we will interpolate More...
 
size_t nrOfMeasurments
 Number of stations that have been used, so this can be reported to the user. More...
 

Constructor & Destructor Documentation

◆ IDWAlgorithm()

mio::IDWAlgorithm::IDWAlgorithm ( const std::vector< std::pair< std::string, std::string > > &  vecArgs,
const std::string &  i_algo,
const std::string &  i_param,
TimeSeriesManager i_tsm 
)

Member Function Documentation

◆ calculate()

void mio::IDWAlgorithm::calculate ( const DEMObject dem,
Grid2DObject grid 
)
virtual

◆ getQualityRating()

double mio::IDWAlgorithm::getQualityRating ( const Date i_date)
virtual

The documentation for this class was generated from the following files: