28 #include "../../../datatype/AbstractData.h"
29 #include "../../../datatype/SimpleData.h"
30 #include "../../../geometry/Point.h"
34 #include "../coverage/PointCoverage.h"
46 std::vector<double> di;
47 std::vector<double> vi;
54 double distance = point.
distance(&l);
57 d = 1/(distance * distance);
67 for(
unsigned int i = 0; i< di.size(); ++i)
69 double wi = di[i]/sumdi;
73 return std::auto_ptr<te::dt::AbstractData>(
new te::dt::Double(result));
A concrete class to represent a point coverage.
PointCoverageIterator end() const
It returns an iterator that points to the end of the time series.
This file contains an inverse distance weighted (IDW) interpolationan function for PointCoverage...
std::auto_ptr< te::dt::AbstractData > estimate(const PointCoverage &cv, unsigned int p, const te::gm::Point &l)
It estimates a value at a given non-observed location, in a PointCoverage.
IDWInterpolator()
Constructor.
A class to traverse the observations of a PointCoverage.
A point with x and y coordinate values.
virtual ~IDWInterpolator()
Virtual destructor.
double getDouble(int i) const
It returns the i-th attribute value as a double pointed by the internal cursor.
PointCoverageIterator begin() const
It returns an iterator that points to the first observation of the point coverage.
SimpleData< double, DOUBLE_TYPE > Double
te::gm::Point & getLocation() const
It returns the location pointed by the internal cursor.
virtual double distance(const Geometry *const rhs) const
It returns the shortest distance between any two points in the two geometry objects.