QGIS API Documentation  2.99.0-Master (e077efd)
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 
23 class QgsDistanceArea;
25 class QgsGraph;
26 
33 class ANALYSIS_EXPORT QgsGraphBuilder : public QgsGraphBuilderInterface
34 {
35  public:
36 
40  QgsGraphBuilder( const QgsCoordinateReferenceSystem& crs, bool otfEnabled = true, double topologyTolerance = 0.0, const QString& ellipsoidID = "WGS84" );
41 
42  ~QgsGraphBuilder();
43 
44  /*
45  * MANDATORY BUILDER PROPERTY DECLARATION
46  */
47  virtual void addVertex( int id, const QgsPoint& pt ) override;
48 
49  virtual void addEdge( int pt1id, const QgsPoint& pt1, int pt2id, const QgsPoint& pt2, const QVector< QVariant >& prop ) override;
50 
54  QgsGraph* graph();
55 
56  private:
57 
58  QgsGraph *mGraph;
59 };
60 
61 #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:111
Mathematical graph representation.
Definition: qgsgraph.h:130
This class used for making the QgsGraph object.
General purpose distance and area calculator.
This class represents a coordinate reference system (CRS).
Class for doing transforms between two map coordinate systems.