QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Determine interface for creating a graph. More...
#include <qgsgraphbuilderinterface.h>
Public Member Functions | |
QgsGraphBuilderInterface (const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84") | |
Default constructor. | |
virtual | ~QgsGraphBuilderInterface ()=default |
virtual void | addEdge (int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies) |
Add edge to the graph. | |
virtual void | addVertex (int id, const QgsPointXY &pt) |
Add vertex to the graph. | |
bool | coordinateTransformationEnabled () const |
Returns coordinate transformation enabled. | |
QgsCoordinateReferenceSystem | destinationCrs () const |
Returns destinaltion CRS. | |
QgsDistanceArea * | distanceArea () |
Returns measurement tool. | |
double | topologyTolerance () const |
Returns topology tolerance. | |
Determine interface for creating a graph.
Contains the settings of the graph. QgsGraphBuilder and QgsGraphDirector both use a "builder" design pattern
Definition at line 40 of file qgsgraphbuilderinterface.h.
QgsGraphBuilderInterface::QgsGraphBuilderInterface | ( | const QgsCoordinateReferenceSystem & | crs, |
bool | ctfEnabled = true , |
||
double | topologyTolerance = 0.0 , |
||
const QString & | ellipsoidID = "WGS84" |
||
) |
Default constructor.
crs | Coordinate reference system for new graph vertex |
ctfEnabled | enable coordinate transform from source graph CRS to CRS graph |
topologyTolerance | sqrt distance between source point as one graph vertex |
ellipsoidID | ellipsoid for edge measurement |
Definition at line 20 of file qgsgraphbuilderinterface.cpp.
|
virtualdefault |
|
virtual |
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 in QgsGraphBuilder.
Definition at line 35 of file qgsgraphbuilderinterface.cpp.
|
virtual |
Add vertex to the graph.
id | vertex identifier |
pt | vertex coordinates |
Reimplemented in QgsGraphBuilder.
Definition at line 29 of file qgsgraphbuilderinterface.cpp.
|
inline |
Returns coordinate transformation enabled.
Definition at line 70 of file qgsgraphbuilderinterface.h.
|
inline |
Returns destinaltion CRS.
Definition at line 64 of file qgsgraphbuilderinterface.h.
|
inline |
Returns measurement tool.
Definition at line 82 of file qgsgraphbuilderinterface.h.
|
inline |
Returns topology tolerance.
Definition at line 76 of file qgsgraphbuilderinterface.h.