QGIS API Documentation 3.41.0-Master (3c143d501a8)
|
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. | |
~QgsTinInterpolator () override | |
int | interpolatePoint (double x, double y, double &result, QgsFeedback *feedback) override |
Calculates interpolation value for map coordinates x, y. | |
void | setTriangulationSink (QgsFeatureSink *sink) |
Sets the optional sink for saving the triangulation features. | |
Public Member Functions inherited from QgsInterpolator | |
QgsInterpolator (const QList< QgsInterpolator::LayerData > &layerData) | |
virtual | ~QgsInterpolator ()=default |
QList< LayerData > | layerData () const |
Static Public Member Functions | |
static QgsFields | triangulationFields () |
Returns the fields output by features when saving the triangulation. | |
Additional Inherited Members | |
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< 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. | |
Interpolation in a triangular irregular network.
Definition at line 36 of file qgstininterpolator.h.
Indicates the type of interpolation to be performed.
Enumerator | |
---|---|
Linear | Linear interpolation. |
CloughTocher | Clough-Tocher interpolation. |
Definition at line 41 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.