QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
29 class ANALYSIS_EXPORT QgsTINInterpolator: public QgsInterpolator
30 {
31  public:
32  //describes the type of interpolation
34  {
36  CloughTocher
37  };
38  QgsTINInterpolator( const QList<LayerData>& inputData, TIN_INTERPOLATION interpolation = Linear, bool showProgressDialog = false );
40 
46  int interpolatePoint( double x, double y, double& result );
47 
48  void setExportTriangulationToFile( bool e ) {mExportTriangulationToFile = e;}
49  void setTriangulationFilePath( const QString& filepath ) {mTriangulationFilePath = filepath;}
50 
51  private:
52  Triangulation* mTriangulation;
53  TriangleInterpolator* mTriangleInterpolator;
54  bool mIsInitialized;
55  bool mShowProgressDialog;
57  bool mExportTriangulationToFile;
59  QString mTriangulationFilePath;
61  TIN_INTERPOLATION mInterpolation;
62 
64  void initialize();
71  int insertData( QgsFeature* f, bool zCoord, int attr, InputType type );
72 };
73 
74 #endif
void setTriangulationFilePath(const QString &filepath)
Definition: qgstininterpolator.h:49
Interface class for interpolations.
Definition: qgsinterpolator.h:36
Interpolation in a triangular irregular network.
Definition: qgstininterpolator.h:29
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition: qgsfeature.h:113
Definition: qgstininterpolator.h:35
This is an interface for interpolator classes for triangulations.
Definition: TriangleInterpolator.h:24
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.
TIN_INTERPOLATION
Definition: qgstininterpolator.h:33
void setExportTriangulationToFile(bool e)
Definition: qgstininterpolator.h:48