QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
|
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. More... | |
QList< LayerData > | layerData () const |
Protected Member Functions | |
Result | cacheBaseData (QgsFeedback *feedback=nullptr) |
Caches the vertex and value data from the provider. More... | |
Protected Attributes | |
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... | |
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 64 of file qgsinterpolator.h.
Result of an interpolation operation.
Definition at line 85 of file qgsinterpolator.h.
Describes the type of input data.
Enumerator | |
---|---|
SourcePoints | Point source. |
SourceStructureLines | Structure lines. |
SourceBreakLines | Break lines. |
Definition at line 69 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 77 of file qgsinterpolator.h.
QgsInterpolator::QgsInterpolator | ( | const QList< QgsInterpolator::LayerData > & | layerData | ) |
Definition at line 25 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 121 of file qgsinterpolator.h.
|
protected |
Cached vertex data for input sources.
Definition at line 137 of file qgsinterpolator.h.
|
protected |
Flag that tells if the cache already has been filled.
Definition at line 140 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 143 of file qgsinterpolator.h.