QGIS API Documentation  2.99.0-Master (0a63d1f)
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 "qgsinterpolator.h"
22 #include <QString>
23 #include "qgis_analysis.h"
24 
25 class Triangulation;
27 class QgsFeature;
28 
31 class ANALYSIS_EXPORT QgsTINInterpolator: public QgsInterpolator
32 {
33  public:
34  //describes the type of interpolation
36  {
38  CloughTocher
39  };
40  QgsTINInterpolator( const QList<LayerData>& inputData, TINInterpolation interpolation = Linear, bool showProgressDialog = false );
42 
48  int interpolatePoint( double x, double y, double& result ) override;
49 
50  void setExportTriangulationToFile( bool e ) {mExportTriangulationToFile = e;}
51  void setTriangulationFilePath( const QString& filepath ) {mTriangulationFilePath = filepath;}
52 
53  private:
54  Triangulation* mTriangulation;
55  TriangleInterpolator* mTriangleInterpolator;
56  bool mIsInitialized;
57  bool mShowProgressDialog;
59  bool mExportTriangulationToFile;
61  QString mTriangulationFilePath;
63  TINInterpolation mInterpolation;
64 
66  void initialize();
67 
74  int insertData( QgsFeature* f, bool zCoord, int attr, InputType type );
75 };
76 
77 #endif
void setTriangulationFilePath(const QString &filepath)
Interface class for interpolations.
Interpolation in a triangular irregular network.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition: qgsfeature.h:136
InputType
Describes the type of input data.
This is an interface for interpolator classes for triangulations.
Interface for Triangulation classes.
Definition: Triangulation.h:29
virtual int interpolatePoint(double x, double y, double &result)=0
Calculates interpolation value for map coordinates x, y.
void setExportTriangulationToFile(bool e)