QGIS API Documentation  2.17.0-Master (0497e4a)
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 
24 class Triangulation;
26 class QgsFeature;
27 
30 class ANALYSIS_EXPORT QgsTINInterpolator: public QgsInterpolator
31 {
32  public:
33  //describes the type of interpolation
35  {
37  CloughTocher
38  };
39  QgsTINInterpolator( const QList<LayerData>& inputData, TIN_INTERPOLATION interpolation = Linear, bool showProgressDialog = false );
41 
47  int interpolatePoint( double x, double y, double& result ) override;
48 
49  void setExportTriangulationToFile( bool e ) {mExportTriangulationToFile = e;}
50  void setTriangulationFilePath( const QString& filepath ) {mTriangulationFilePath = filepath;}
51 
52  private:
53  Triangulation* mTriangulation;
54  TriangleInterpolator* mTriangleInterpolator;
55  bool mIsInitialized;
56  bool mShowProgressDialog;
58  bool mExportTriangulationToFile;
60  QString mTriangulationFilePath;
62  TIN_INTERPOLATION mInterpolation;
63 
65  void initialize();
72  int insertData( QgsFeature* f, bool zCoord, int attr, InputType type );
73 };
74 
75 #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:187
InputType
Describes the type of input data.
This is an interface for interpolator classes for triangulations.
Interface for Triangulation classes.
Definition: Triangulation.h:28
virtual int interpolatePoint(double x, double y, double &result)=0
Calculates interpolation value for map coordinates x, y.
void setExportTriangulationToFile(bool e)