QgsGraphBuilder class
This class used for making the QgsGraph object.
Contents
Base classes
- class QgsGraphBuilderInterface
- Determine interface for creating a graph.
Constructors, destructors, conversion operators
- QgsGraphBuilder(const QgsCoordinateReferenceSystem& crs, bool otfEnabled = true, double topologyTolerance = 0.0, const QString& ellipsoidID = "WGS84")
- Default constructor.
Public functions
- void addEdge(int pt1id, const QgsPointXY& pt1, int pt2id, const QgsPointXY& pt2, const QVector<QVariant>& strategies) override
- Add edge to the graph.
- void addVertex(int id, const QgsPointXY& pt) override
- Add vertex to the graph.
- auto graph() -> QgsGraph*
- Returns generated QgsGraph.
Function documentation
void QgsGraphBuilder:: addEdge(int pt1id,
const QgsPointXY& pt1,
int pt2id,
const QgsPointXY& pt2,
const QVector<QVariant>& strategies) override
Add edge to the graph.
| Parameters | |
|---|---|
| pt1id | first vertex identificator |
| pt1 | first vertex coordinates |
| pt2id | second vertex identificator |
| pt2 | second vertex coordinates |
| strategies | optimization strategies |
void QgsGraphBuilder:: addVertex(int id,
const QgsPointXY& pt) override
Add vertex to the graph.
| Parameters | |
|---|---|
| id | vertex identifier |
| pt | vertex coordinates |