QGIS API Documentation 3.39.0-Master (e8f1b343c48)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsIDWInterpolator Class Reference

Inverse distance weight interpolator. More...

#include <qgsidwinterpolator.h>

Inheritance diagram for QgsIDWInterpolator:
Inheritance graph
[legend]

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< LayerDatalayerData () 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< QgsInterpolatorVertexDatamCachedBaseData
 Cached vertex data for input sources.
 
bool mDataIsCached = false
 Flag that tells if the cache already has been filled.
 
QList< LayerDatamLayerData
 Information about the input vector layers and the attributes (or z-values) that are used for interpolation.
 

Detailed Description

Inverse distance weight interpolator.

Definition at line 29 of file qgsidwinterpolator.h.

Constructor & Destructor Documentation

◆ QgsIDWInterpolator()

QgsIDWInterpolator::QgsIDWInterpolator ( const QList< QgsInterpolator::LayerData > &  layerData)

Constructor for QgsIDWInterpolator, with the specified layerData sources.

Definition at line 24 of file qgsidwinterpolator.cpp.

Member Function Documentation

◆ distanceCoefficient()

double QgsIDWInterpolator::distanceCoefficient ( ) const
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 ).

See also
setDistanceCoefficient()

Definition at line 59 of file qgsidwinterpolator.h.

◆ interpolatePoint()

int QgsIDWInterpolator::interpolatePoint ( double  x,
double  y,
double &  result,
QgsFeedback feedback = nullptr 
)
overridevirtual

Calculates interpolation value for map coordinates x, y.

Parameters
xx-coordinate (in map units)
yy-coordinate (in map units)
resultinterpolation result
feedbackoptional feedback object for progress and cancellation support
Returns
0 in case of success

Implements QgsInterpolator.

Definition at line 28 of file qgsidwinterpolator.cpp.

◆ setDistanceCoefficient()

void QgsIDWInterpolator::setDistanceCoefficient ( double  coefficient)
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 ).

See also
distanceCoefficient()

Definition at line 48 of file qgsidwinterpolator.h.


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