1919#include < QVector>
2020#include < QVariant>
2121
22- #include " qgspoint.h"
23- #include " qgsproject.h"
2422#include " qgscoordinatereferencesystem.h"
2523#include " qgsdistancearea.h"
2624#include " qgis_analysis.h"
2725
26+ class QgsPoint ;
27+
2828#ifdef SIP_RUN
2929% ModuleHeaderCode
3030#include < qgsgraphbuilder.h>
@@ -58,14 +58,8 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
5858 * \param topologyTolerance sqrt distance between source point as one graph vertex
5959 * \param ellipsoidID ellipsoid for edge measurement
6060 */
61- QgsGraphBuilderInterface ( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true , double topologyTolerance = 0.0 , const QString &ellipsoidID = " WGS84" )
62- : mCrs ( crs )
63- , mCtfEnabled ( ctfEnabled )
64- , mTopologyTolerance ( topologyTolerance )
65- {
66- mDa .setSourceCrs ( mCrs , QgsProject::instance ()->transformContext () );
67- mDa .setEllipsoid ( ellipsoidID );
68- }
61+ QgsGraphBuilderInterface ( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true ,
62+ double topologyTolerance = 0.0 , const QString &ellipsoidID = " WGS84" );
6963
7064 virtual ~QgsGraphBuilderInterface () = default ;
7165
@@ -99,11 +93,7 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
9993 * \param pt vertex coordinates
10094 * \note id and pt are redundant. You can use pt or id to identify the vertex
10195 */
102- virtual void addVertex ( int id, const QgsPointXY &pt )
103- {
104- Q_UNUSED ( id );
105- Q_UNUSED ( pt );
106- }
96+ virtual void addVertex ( int id, const QgsPointXY &pt );
10797
10898 /* *
10999 * Add edge to the graph
@@ -114,14 +104,7 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
114104 * \param strategies optimization strategies
115105 * \note pt1id, pt1 and pt2id, pt2 is a redundant interface. You can use vertex coordinates or their identificators.
116106 */
117- virtual void addEdge ( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies )
118- {
119- Q_UNUSED ( pt1id );
120- Q_UNUSED ( pt1 );
121- Q_UNUSED ( pt2id );
122- Q_UNUSED ( pt2 );
123- Q_UNUSED ( strategies );
124- }
107+ virtual void addEdge ( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies );
125108
126109 private:
127110 QgsCoordinateReferenceSystem mCrs ;
0 commit comments