QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
Inverse distance weight interpolator. More...
#include <qgsidwinterpolator.h>
Public Member Functions | |
QgsIDWInterpolator (const QList< QgsInterpolator::LayerData > &layerData) | |
Constructor for QgsIDWInterpolator, with the specified layerData sources. | |
double | distanceCoefficient () const |
Returns the distance coefficient, the parameter that sets how the values are weighted with distance. | |
int | interpolatePoint (double x, double y, double &result, QgsFeedback *feedback=nullptr) override |
Calculates interpolation value for map coordinates x, y. | |
void | setDistanceCoefficient (double coefficient) |
Sets the distance coefficient, the parameter that sets how the values are weighted with distance. | |
Public Member Functions inherited from QgsInterpolator | |
QgsInterpolator (const QList< QgsInterpolator::LayerData > &layerData) | |
virtual | ~QgsInterpolator ()=default |
QList< LayerData > | layerData () const |
Additional Inherited Members | |
Public Types inherited from QgsInterpolator | |
enum | Result { Success = 0 , Canceled , InvalidSource , FeatureGeometryError } |
Result of an interpolation operation. More... | |
enum | SourceType { SourcePoints , SourceStructureLines , SourceBreakLines } |
Describes the type of input data. More... | |
enum | ValueSource { ValueAttribute , ValueZ , ValueM } |
Source for interpolated values from features. More... | |
Protected Member Functions inherited from QgsInterpolator | |
Result | cacheBaseData (QgsFeedback *feedback=nullptr) |
Caches the vertex and value data from the provider. | |
Protected Attributes inherited from QgsInterpolator | |
QVector< QgsInterpolatorVertexData > | mCachedBaseData |
Cached vertex data for input sources. | |
bool | mDataIsCached = false |
Flag that tells if the cache already has been filled. | |
QList< LayerData > | mLayerData |
Information about the input vector layers and the attributes (or z-values) that are used for interpolation. | |
Inverse distance weight interpolator.
Definition at line 29 of file qgsidwinterpolator.h.
QgsIDWInterpolator::QgsIDWInterpolator | ( | const QList< QgsInterpolator::LayerData > & | layerData | ) |
Constructor for QgsIDWInterpolator, with the specified layerData sources.
Definition at line 24 of file qgsidwinterpolator.cpp.
|
inline |
Returns the distance coefficient, the parameter that sets how the values are weighted with distance.
Smaller values mean sharper peaks at the data points. The default is a coefficient of 2.
Point values are weighted by 1 / ( distance ^ coefficient ).
Definition at line 58 of file qgsidwinterpolator.h.
|
overridevirtual |
Calculates interpolation value for map coordinates x, y.
x | x-coordinate (in map units) |
y | y-coordinate (in map units) |
result | interpolation result |
feedback | optional feedback object for progress and cancellation support |
Implements QgsInterpolator.
Definition at line 28 of file qgsidwinterpolator.cpp.
|
inline |
Sets the distance coefficient, the parameter that sets how the values are weighted with distance.
Smaller values mean sharper peaks at the data points.
Point values are weighted by 1 / ( distance ^ coefficient ).
Definition at line 47 of file qgsidwinterpolator.h.