QGIS API Documentation  2.99.0-Master (9fdd060)
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 }
 
- Public Types inherited from QgsInterpolator
enum  InputType { POINTS, STRUCTURE_LINES, BREAK_LINES }
 Describes the type of input data. More...
 

Public Member Functions

 QgsTINInterpolator (const QList< QgsInterpolator::LayerData > &inputData, TINInterpolation interpolation=Linear, QgsFeedback *feedback=nullptr)
 Constructor for QgsTINInterpolator. More...
 
 ~QgsTINInterpolator ()
 
int interpolatePoint (double x, double y, double &result) 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
int cacheBaseData ()
 Caches the vertex and value data from the provider. More...
 
- Protected Attributes inherited from QgsInterpolator
QVector< vertexDatamCachedBaseData
 
bool mDataIsCached = false
 Flag that tells if the cache already has been filled. More...
 
QList< LayerDatamLayerData
 

Detailed Description

Interpolation in a triangular irregular network.

Definition at line 35 of file qgstininterpolator.h.

Member Enumeration Documentation

◆ TINInterpolation

Enumerator
Linear 
CloughTocher 

Definition at line 39 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 32 of file qgstininterpolator.cpp.

◆ ~QgsTINInterpolator()

QgsTINInterpolator::~QgsTINInterpolator ( )

Definition at line 40 of file qgstininterpolator.cpp.

Member Function Documentation

◆ interpolatePoint()

int QgsTINInterpolator::interpolatePoint ( double  x,
double  y,
double &  result 
)
overridevirtual

Calculates interpolation value for map coordinates x, y.

Parameters
xx-coordinate (in map units)
yy-coordinate (in map units)
resultout: interpolation result
Returns
0 in case of success

Implements QgsInterpolator.

Definition at line 46 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 72 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 67 of file qgstininterpolator.cpp.


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