QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
This class used for making the QgsGraph object. More...
#include <qgsgraphbuilder.h>
Public Member Functions | |
QgsGraphBuilder (const QgsCoordinateReferenceSystem &crs, bool otfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84") | |
Default constructor. | |
~QgsGraphBuilder () override | |
void | addEdge (int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &prop) override |
Add edge to the graph. | |
void | addVertex (int id, const QgsPointXY &pt) override |
Add vertex to the graph. | |
QgsGraph | graph () const |
Returns the generated QgsGraph. | |
QgsGraph * | takeGraph () |
Takes the generated graph from the builder, resetting the builder back to its initial state ready for additional graph construction. | |
Public Member Functions inherited from QgsGraphBuilderInterface | |
QgsGraphBuilderInterface (const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84") | |
Default constructor. | |
virtual | ~QgsGraphBuilderInterface ()=default |
bool | coordinateTransformationEnabled () const |
Returns coordinate transformation enabled. | |
QgsCoordinateReferenceSystem | destinationCrs () const |
Returns destinaltion CRS. | |
QgsDistanceArea * | distanceArea () |
Returns measurement tool. | |
double | topologyTolerance () const |
Returns topology tolerance. | |
This class used for making the QgsGraph object.
Definition at line 35 of file qgsgraphbuilder.h.
QgsGraphBuilder::QgsGraphBuilder | ( | const QgsCoordinateReferenceSystem & | crs, |
bool | otfEnabled = true , |
||
double | topologyTolerance = 0.0 , |
||
const QString & | ellipsoidID = "WGS84" |
||
) |
Default constructor.
Definition at line 26 of file qgsgraphbuilder.cpp.
|
overridedefault |
|
overridevirtual |
Add edge to the graph.
pt1id | first vertex identificator |
pt1 | first vertex coordinates |
pt2id | second vertex identificator |
pt2 | second vertex coordinates |
strategies | optimization strategies |
Reimplemented from QgsGraphBuilderInterface.
Definition at line 39 of file qgsgraphbuilder.cpp.
|
overridevirtual |
Add vertex to the graph.
id | vertex identifier |
pt | vertex coordinates |
Reimplemented from QgsGraphBuilderInterface.
Definition at line 34 of file qgsgraphbuilder.cpp.
QgsGraph QgsGraphBuilder::graph | ( | ) | const |
Returns the generated QgsGraph.
The builder is left in its current state.
Definition at line 44 of file qgsgraphbuilder.cpp.
QgsGraph * QgsGraphBuilder::takeGraph | ( | ) |
Takes the generated graph from the builder, resetting the builder back to its initial state ready for additional graph construction.
Definition at line 49 of file qgsgraphbuilder.cpp.