QGIS API Documentation  2.99.0-Master (bdf46d7)
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 
21 #include <qgsspatialindex.h>
22 #include "qgis_analysis.h"
23 
24 class QgsDistanceArea;
26 class QgsGraph;
27 
34 class ANALYSIS_EXPORT QgsGraphBuilder : public QgsGraphBuilderInterface
35 {
36  public:
37 
41  QgsGraphBuilder( const QgsCoordinateReferenceSystem &crs, bool otfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
42 
43  ~QgsGraphBuilder();
44 
45  /*
46  * MANDATORY BUILDER PROPERTY DECLARATION
47  */
48  virtual void addVertex( int id, const QgsPoint &pt ) override;
49 
50  virtual void addEdge( int pt1id, const QgsPoint &pt1, int pt2id, const QgsPoint &pt2, const QVector< QVariant > &prop ) override;
51 
55  QgsGraph *graph();
56 
57  private:
58 
59  QgsGraph *mGraph = nullptr;
60 };
61 
62 #endif // QGSGRAPHBUILDER_H
virtual void addVertex(int id, const QgsPoint &pt)
Add vertex to the graph.
Determine interface for creating a graph.
virtual void addEdge(int pt1id, const QgsPoint &pt1, int pt2id, const QgsPoint &pt2, const QVector< QVariant > &strategies)
Add edge to the graph.
A class to represent a point.
Definition: qgspoint.h:37
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...
This class represents a coordinate reference system (CRS).
Class for doing transforms between two map coordinate systems.