QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
Interpolation in a triangular irregular network. More...
#include <qgstininterpolator.h>
Public Types | |
enum | TinInterpolation { Linear , CloughTocher } |
Indicates the type of interpolation to be performed. More... | |
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... | |
Public Member Functions | |
QgsTinInterpolator (const QList< QgsInterpolator::LayerData > &inputData, TinInterpolation interpolation=Linear, QgsFeedback *feedback=nullptr) | |
Constructor for QgsTinInterpolator. More... | |
~QgsTinInterpolator () override | |
int | interpolatePoint (double x, double y, double &result, QgsFeedback *feedback) override |
Calculates interpolation value for map coordinates x, y. More... | |
void | setTriangulationSink (QgsFeatureSink *sink) |
Sets the optional sink for saving the triangulation features. More... | |
Public Member Functions inherited from QgsInterpolator | |
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 |
Static Public Member Functions | |
static QgsFields | triangulationFields () |
Returns the fields output by features when saving the triangulation. More... | |
Additional Inherited Members | |
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... | |
Interpolation in a triangular irregular network.
Definition at line 37 of file qgstininterpolator.h.
Indicates the type of interpolation to be performed.
Enumerator | |
---|---|
Linear | Linear interpolation. |
CloughTocher | Clough-Tocher interpolation. |
Definition at line 42 of file qgstininterpolator.h.
QgsTinInterpolator::QgsTinInterpolator | ( | const QList< QgsInterpolator::LayerData > & | inputData, |
TinInterpolation | interpolation = Linear , |
||
QgsFeedback * | feedback = nullptr |
||
) |
Constructor for QgsTinInterpolator.
The feedback object specifies an optional QgsFeedback object for progress reports and cancellation support. Ownership of feedback is not transferred and callers must ensure that it exists for the lifetime of this object.
Definition at line 35 of file qgstininterpolator.cpp.
|
override |
Definition at line 43 of file qgstininterpolator.cpp.
|
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 49 of file qgstininterpolator.cpp.
void QgsTinInterpolator::setTriangulationSink | ( | QgsFeatureSink * | sink | ) |
Sets the optional sink for saving the triangulation features.
The sink must be setup to accept LineString features, with fields matching those returned by triangulationFields().
Definition at line 75 of file qgstininterpolator.cpp.
|
static |
Returns the fields output by features when saving the triangulation.
These fields should be used when creating a suitable feature sink for setTriangulationSink()
Definition at line 70 of file qgstininterpolator.cpp.