QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 #ifndef QGSGRAPHBUILDERH
16 #define QGSGRAPHBUILDERH
17 
18 #include "qgsgraphbuilderintr.h"
19 
20 //QT4 includes
21 
22 //QGIS includes
23 #include <qgsspatialindex.h>
24 
25 //forward declarations
26 class QgsDistanceArea;
28 class QgsGraph;
29 
36 class ANALYSIS_EXPORT QgsGraphBuilder : public QgsGraphBuilderInterface
37 {
38  public:
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 QgsPoint& pt ) override;
50 
51  virtual void addArc( int pt1id, const QgsPoint& pt1, int pt2id, const QgsPoint& pt2, const QVector< QVariant >& prop ) override;
52 
56  QgsGraph* graph();
57 
58  private:
59 
60  QgsGraph *mGraph;
61 };
62 #endif //QGSGRAPHBUILDERH
virtual void addVertex(int id, const QgsPoint &pt)
add vertex
Determine interface for creating a graph.
virtual void addArc(int pt1id, const QgsPoint &pt1, int pt2id, const QgsPoint &pt2, const QVector< QVariant > &properties)
add arc
A class to represent a point.
Definition: qgspoint.h:117
Mathematics graph representation.
Definition: qgsgraph.h:131
This class making the QgsGraph object.
General purpose distance and area calculator.
Class for storing a coordinate reference system (CRS)
Class for doing transforms between two map coordinate systems.