47 double sumCounter = 0;
48 double sumDenominator = 0;
54 distance = sqrt(( vertex_it->x - x ) * ( vertex_it->x - x ) + ( vertex_it->y - y ) * ( vertex_it->y - y ) );
57 result = vertex_it->z;
61 sumCounter += ( currentWeight * vertex_it->z );
62 sumDenominator += currentWeight;
65 if ( sumDenominator == 0.0 )
70 result = sumCounter / sumDenominator;
QVector< vertexData > mCachedBaseData
Interface class for interpolations.
bool mDataIsCached
Flag that tells if the cache already has been filled.
double mDistanceCoefficient
The parameter that sets how the values are weighted with distance.
A layer together with the information about interpolation attribute / z-coordinate interpolation and ...
double ANALYSIS_EXPORT min(double x, double y)
returns the minimum of two doubles or the first argument if both are equal
int interpolatePoint(double x, double y, double &result)
Calculates interpolation value for map coordinates x, y.
int cacheBaseData()
Caches the vertex and value data from the provider.