QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Interface class for interpolations. More...
#include <qgsinterpolator.h>
Classes | |
struct | LayerData |
A source together with the information about interpolation attribute / z-coordinate interpolation and the type (point, structure line, breakline) More... | |
Public Types | |
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... | |
Public Member Functions | |
QgsInterpolator (const QList< QgsInterpolator::LayerData > &layerData) | |
virtual | ~QgsInterpolator ()=default |
virtual int | interpolatePoint (double x, double y, double &result, QgsFeedback *feedback=nullptr)=0 |
Calculates interpolation value for map coordinates x, y. | |
QList< LayerData > | layerData () const |
Protected Member Functions | |
Result | cacheBaseData (QgsFeedback *feedback=nullptr) |
Caches the vertex and value data from the provider. | |
Protected Attributes | |
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. | |
Interface class for interpolations.
Interpolators take the vertices of a vector layer as base data. The z-Value can be an attribute or the z-coordinates in case of 3D types.
Definition at line 71 of file qgsinterpolator.h.
Result of an interpolation operation.
Definition at line 91 of file qgsinterpolator.h.
Describes the type of input data.
Enumerator | |
---|---|
SourcePoints | Point source. |
SourceStructureLines | Structure lines. |
SourceBreakLines | Break lines. |
Definition at line 75 of file qgsinterpolator.h.
Source for interpolated values from features.
Enumerator | |
---|---|
ValueAttribute | Take value from feature's attribute. |
ValueZ | Use feature's geometry Z values for interpolation. |
ValueM | Use feature's geometry M values for interpolation. |
Definition at line 83 of file qgsinterpolator.h.
QgsInterpolator::QgsInterpolator | ( | const QList< QgsInterpolator::LayerData > & | layerData | ) |
Definition at line 26 of file qgsinterpolator.cpp.
|
virtualdefault |
|
protected |
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.
Definition at line 31 of file qgsinterpolator.cpp.
|
pure virtual |
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 |
Implemented in QgsTinInterpolator, and QgsIDWInterpolator.
|
inline |
Definition at line 134 of file qgsinterpolator.h.
|
protected |
Cached vertex data for input sources.
Definition at line 149 of file qgsinterpolator.h.
|
protected |
Flag that tells if the cache already has been filled.
Definition at line 152 of file qgsinterpolator.h.
|
protected |
Information about the input vector layers and the attributes (or z-values) that are used for interpolation.
Definition at line 155 of file qgsinterpolator.h.