QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsgraphbuilderinterface.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgraphbuilderinterface.h
3  --------------------------------------
4  Date : 2010-10-22
5  Copyright : (C) 2010 by Yakushev Sergey
6  Email : YakushevS <at> list.ru
7 ****************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15 
16 #ifndef QGSGRAPHBUILDERINTERFACE_H
17 #define QGSGRAPHBUILDERINTERFACE_H
18 
19 #include <QVector>
20 #include <QVariant>
21 
23 #include "qgsdistancearea.h"
24 #include "qgis_analysis.h"
25 
26 class QgsPoint;
27 
28 #ifdef SIP_RUN
29 % ModuleHeaderCode
30 #include <qgsgraphbuilder.h>
31 % End
32 #endif
33 
40 class ANALYSIS_EXPORT QgsGraphBuilderInterface
41 {
42 
43 #ifdef SIP_RUN
45  if ( dynamic_cast< QgsGraphBuilder * >( sipCpp ) != NULL )
46  sipType = sipType_QgsGraphBuilder;
47  else
48  sipType = NULL;
49  SIP_END
50 #endif
51 
52  public:
53 
61  QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true,
62  double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
63 
64  virtual ~QgsGraphBuilderInterface() = default;
65 
68  {
69  return mCrs;
70  }
71 
74  {
75  return mCtfEnabled;
76  }
77 
80  {
81  return mTopologyTolerance;
82  }
83 
86  {
87  return &mDa;
88  }
89 
96  virtual void addVertex( int id, const QgsPointXY &pt );
97 
107  virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies );
108 
109  private:
111 
112  QgsDistanceArea mDa;
113 
114  bool mCtfEnabled;
115 
116  double mTopologyTolerance;
117 
118 };
119 
120 // clazy:excludeall=qstring-allocations
121 
122 #endif // QGSGRAPHBUILDERINTERFACE_H
QgsGraphBuilderInterface::topologyTolerance
double topologyTolerance()
Returns topology tolerance.
Definition: qgsgraphbuilderinterface.h:79
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:37
qgsgraphbuilder.h
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:105
QgsGraphBuilderInterface
Determine interface for creating a graph. Contains the settings of the graph. QgsGraphBuilder and Qgs...
Definition: qgsgraphbuilderinterface.h:40
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:172
QgsGraphBuilderInterface::destinationCrs
QgsCoordinateReferenceSystem destinationCrs() const
Returns destinaltion CRS.
Definition: qgsgraphbuilderinterface.h:67
QgsGraphBuilderInterface::distanceArea
QgsDistanceArea * distanceArea()
Returns measurement tool.
Definition: qgsgraphbuilderinterface.h:85
QgsCoordinateReferenceSystem
Definition: qgscoordinatereferencesystem.h:206
QgsGraphBuilderInterface::coordinateTransformationEnabled
bool coordinateTransformationEnabled()
Returns coordinate transformation enabled.
Definition: qgsgraphbuilderinterface.h:73
QgsPointXY
Definition: qgspointxy.h:43
QgsGraphBuilder
This class used for making the QgsGraph object.
Definition: qgsgraphbuilder.h:35
QgsDistanceArea
Definition: qgsdistancearea.h:49
qgsdistancearea.h
SIP_END
#define SIP_END
Definition: qgis_sip.h:189
qgscoordinatereferencesystem.h