Class: QgsIDWInterpolator

class qgis.analysis.QgsIDWInterpolator

Bases: QgsInterpolator

Inverse distance weight interpolator.

QgsIDWInterpolator(layerData: Iterable[QgsInterpolator.LayerData]) Constructor for QgsIDWInterpolator, with the specified layerData sources.

QgsIDWInterpolator(QgsIDWInterpolator)

Methods

cacheBaseData

Caches the vertex and value data from the provider.

distanceCoefficient

Returns the distance coefficient, the parameter that sets how the values are weighted with distance.

interpolatePoint

param x:

setDistanceCoefficient

Sets the distance coefficient, the parameter that sets how the values are weighted with distance.

cacheBaseData(self, feedback: QgsFeedback = None) QgsInterpolator.Result

Caches the vertex and value data from the provider. All the vertex data will be held in virtual memory.

An optional feedback argument may be specified to allow cancellation and progress reports from the cache operation.

Returns:

Success in case of success

distanceCoefficient(self) float

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 ).

Return type:

float

interpolatePoint(self, x: float, y: float, feedback: QgsFeedback = None) Tuple[int, float]
Parameters:
  • x (float) –

  • y (float) –

  • feedback (QgsFeedback = None) –

Return type:

Tuple[int, float]

setDistanceCoefficient(self, coefficient: float)

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 ).

Parameters:

coefficient (float) –