QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgstininterpolator.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstininterpolator.h
3 --------------------
4 begin : March 10, 2008
5 copyright : (C) 2008 by Marco Hugentobler
6 email : marco dot hugentobler at karto dot baug dot ethz dot ch
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSTININTERPOLATOR_H
19#define QGSTININTERPOLATOR_H
20
21#include "qgis_analysis.h"
22#include "qgsinterpolator.h"
23
24#include <QString>
25
26class QgsFeatureSink;
29class QgsFeature;
30class QgsFeedback;
31class QgsFields;
32
37class ANALYSIS_EXPORT QgsTinInterpolator : public QgsInterpolator
38{
39 public:
46
52 QgsTinInterpolator( const QList<QgsInterpolator::LayerData> &inputData, QgsTinInterpolator::TinInterpolation interpolation = QgsTinInterpolator::TinInterpolation::Linear, QgsFeedback *feedback = nullptr );
53 ~QgsTinInterpolator() override;
54
55 int interpolatePoint( double x, double y, double &result SIP_OUT, QgsFeedback *feedback ) override;
56
63 static QgsFields triangulationFields();
64
73 void setTriangulationSink( QgsFeatureSink *sink );
74
75 private:
76 QgsTriangulation *mTriangulation = nullptr;
77 TriangleInterpolator *mTriangleInterpolator = nullptr;
78 bool mIsInitialized = false;
79 QgsFeedback *mFeedback = nullptr;
80
82 QgsFeatureSink *mTriangulationSink = nullptr;
85
87 void initialize();
88
97 int insertData( const QgsFeature &f, QgsInterpolator::ValueSource source, int attr, QgsInterpolator::SourceType type );
98
99 int addPointsFromGeometry( const QgsGeometry &g, QgsInterpolator::ValueSource source, double attributeValue );
100};
101
102#endif
An interface for objects which accept features via addFeature(s) methods.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
Container of fields for a vector layer.
Definition qgsfields.h:46
A geometry is the spatial representation of a feature.
virtual int interpolatePoint(double x, double y, double &result, QgsFeedback *feedback=nullptr)=0
Calculates interpolation value for map coordinates x, y.
QgsInterpolator(const QList< QgsInterpolator::LayerData > &layerData)
ValueSource
Source for interpolated values from features.
SourceType
Describes the type of input data.
Interpolation in a triangular irregular network.
QgsTinInterpolator(const QList< QgsInterpolator::LayerData > &inputData, QgsTinInterpolator::TinInterpolation interpolation=QgsTinInterpolator::TinInterpolation::Linear, QgsFeedback *feedback=nullptr)
Constructor for QgsTinInterpolator.
TinInterpolation
Indicates the type of interpolation to be performed.
Interface for Triangulation classes.
An interface for interpolator classes for triangulations.
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
Definition qgis_sip.h:268
#define SIP_OUT
Definition qgis_sip.h:58