QGIS API Documentation  2.99.0-Master (9caa722)
qgsgraphbuilder.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgraphbuilder.h
3  --------------------------------------
4  Date : 2010-10-25
5  Copyright : (C) 2010 by Yakushev Sergey
6  Email : [email protected]
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 QGSGRAPHBUILDER_H
17 #define QGSGRAPHBUILDER_H
18 
20 #include "qgis.h"
21 
22 #include "qgsspatialindex.h"
23 #include "qgis_analysis.h"
24 
25 class QgsDistanceArea;
27 class QgsGraph;
28 
35 class ANALYSIS_EXPORT QgsGraphBuilder : public QgsGraphBuilderInterface
36 {
37  public:
38 
42  QgsGraphBuilder( const QgsCoordinateReferenceSystem &crs, bool otfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
43 
44  ~QgsGraphBuilder();
45 
46  /*
47  * MANDATORY BUILDER PROPERTY DECLARATION
48  */
49  virtual void addVertex( int id, const QgsPointXY &pt ) override;
50 
51  virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &prop ) override;
52 
56  QgsGraph *graph() SIP_FACTORY;
57 
58  private:
59 
60  QgsGraph *mGraph = nullptr;
61 };
62 
63 #endif // QGSGRAPHBUILDER_H
A class to represent a 2D point.
Definition: qgspointxy.h:42
Determine interface for creating a graph.
virtual void addEdge(int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies)
Add edge to the graph.
#define SIP_FACTORY
Definition: qgis_sip.h:69
Mathematical graph representation.
Definition: qgsgraph.h:131
This class used for making the QgsGraph object.
A general purpose distance and area calculator, capable of performing ellipsoid based calculations...
virtual void addVertex(int id, const QgsPointXY &pt)
Add vertex to the graph.
This class represents a coordinate reference system (CRS).
Class for doing transforms between two map coordinate systems.