QGIS API Documentation
3.8.0-Zanzibar (11aff65)
|
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. More... | |
double | distanceCoefficient () const |
Returns the distance coefficient, the parameter that sets how the values are weighted with distance. More... | |
int | interpolatePoint (double x, double y, double &result, QgsFeedback *feedback=nullptr) override |
Calculates interpolation value for map coordinates x, y. More... | |
void | setDistanceCoefficient (double coefficient) |
Sets the distance coefficient, the parameter that sets how the values are weighted with distance. More... | |
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. More... | |
Protected Attributes inherited from QgsInterpolator | |
QVector< QgsInterpolatorVertexData > | mCachedBaseData |
Cached vertex data for input sources. More... | |
bool | mDataIsCached = false |
Flag that tells if the cache already has been filled. More... | |
QList< LayerData > | mLayerData |
Information about the input vector layers and the attributes (or z-values) that are used for interpolation. More... | |
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 23 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 61 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 27 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 49 of file qgsidwinterpolator.h.