QGIS API Documentation  3.6.0-Noosa (5873452)
Public Types | Public Member Functions | Static Public Member Functions | List of all members
QgsTinInterpolator Class Reference

Interpolation in a triangular irregular network. More...

#include <qgstininterpolator.h>

Inheritance diagram for QgsTinInterpolator:
Inheritance graph
[legend]

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
 
QList< LayerDatalayerData () 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< QgsInterpolatorVertexDatamCachedBaseData
 Cached vertex data for input sources. More...
 
bool mDataIsCached = false
 Flag that tells if the cache already has been filled. More...
 
QList< LayerDatamLayerData
 Information about the input vector layers and the attributes (or z-values) that are used for interpolation. More...
 

Detailed Description

Interpolation in a triangular irregular network.

Since
QGIS 3.0

Definition at line 37 of file qgstininterpolator.h.

Member Enumeration Documentation

◆ TinInterpolation

Indicates the type of interpolation to be performed.

Enumerator
Linear 

Linear interpolation.

CloughTocher 

Clough-Tocher interpolation.

Definition at line 42 of file qgstininterpolator.h.

Constructor & Destructor Documentation

◆ QgsTinInterpolator()

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

◆ ~QgsTinInterpolator()

QgsTinInterpolator::~QgsTinInterpolator ( )
override

Definition at line 43 of file qgstininterpolator.cpp.

Member Function Documentation

◆ interpolatePoint()

int QgsTinInterpolator::interpolatePoint ( double  x,
double  y,
double &  result,
QgsFeedback feedback 
)
overridevirtual

Calculates interpolation value for map coordinates x, y.

Parameters
xx-coordinate (in map units)
yy-coordinate (in map units)
resultinterpolation result
feedbackoptional feedback object for progress and cancelation support
Returns
0 in case of success

Implements QgsInterpolator.

Definition at line 49 of file qgstininterpolator.cpp.

◆ setTriangulationSink()

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

See also
triangulationFields()
Since
QGIS 3.0

Definition at line 75 of file qgstininterpolator.cpp.

◆ triangulationFields()

QgsFields QgsTinInterpolator::triangulationFields ( )
static

Returns the fields output by features when saving the triangulation.

These fields should be used when creating a suitable feature sink for setTriangulationSink()

See also
setTriangulationSink()
Since
QGIS 3.0

Definition at line 70 of file qgstininterpolator.cpp.


The documentation for this class was generated from the following files: