QGIS API Documentation  2.99.0-Master (37c43df)
Public Member Functions | List of all members
QgsGraphBuilder Class Reference

This class used for making the QgsGraph object. More...

#include <qgsgraphbuilder.h>

Inheritance diagram for QgsGraphBuilder:
Inheritance graph
[legend]

Public Member Functions

 QgsGraphBuilder (const QgsCoordinateReferenceSystem &crs, bool otfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
 Default constructor. More...
 
 ~QgsGraphBuilder ()
 
virtual void addEdge (int pt1id, const QgsPoint &pt1, int pt2id, const QgsPoint &pt2, const QVector< QVariant > &prop) override
 Add edge to the graph. More...
 
virtual void addVertex (int id, const QgsPoint &pt) override
 Add vertex to the graph. More...
 
QgsGraphgraph ()
 Returns generated QgsGraph. More...
 
- Public Member Functions inherited from QgsGraphBuilderInterface
 QgsGraphBuilderInterface (const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
 Default constructor. More...
 
virtual ~QgsGraphBuilderInterface ()
 Destructor. More...
 
bool coordinateTransformationEnabled ()
 Returns coordinate transformation enabled. More...
 
QgsCoordinateReferenceSystem destinationCrs () const
 Returns destinaltion CRS. More...
 
QgsDistanceAreadistanceArea ()
 Returns measurement tool. More...
 
double topologyTolerance ()
 Returns topology tolerance. More...
 

Detailed Description

This class used for making the QgsGraph object.

Definition at line 33 of file qgsgraphbuilder.h.

Constructor & Destructor Documentation

§ QgsGraphBuilder()

QgsGraphBuilder::QgsGraphBuilder ( const QgsCoordinateReferenceSystem crs,
bool  otfEnabled = true,
double  topologyTolerance = 0.0,
const QString &  ellipsoidID = "WGS84" 
)

Default constructor.

Definition at line 27 of file qgsgraphbuilder.cpp.

§ ~QgsGraphBuilder()

QgsGraphBuilder::~QgsGraphBuilder ( )

Definition at line 33 of file qgsgraphbuilder.cpp.

Member Function Documentation

§ addEdge()

void QgsGraphBuilder::addEdge ( int  pt1id,
const QgsPoint pt1,
int  pt2id,
const QgsPoint pt2,
const QVector< QVariant > &  strategies 
)
overridevirtual

Add edge to the graph.

Parameters
pt1idfirst vertex identificator
pt1first vertex coordinates
pt2idsecond vertex identificator
pt2second vertex coordinates
strategiesoptimization strategies
Note
pt1id, pt1 and pt2id, pt2 is a redundant interface. You can use vertex coordinates or their identificators.

Reimplemented from QgsGraphBuilderInterface.

Definition at line 43 of file qgsgraphbuilder.cpp.

§ addVertex()

void QgsGraphBuilder::addVertex ( int  id,
const QgsPoint pt 
)
overridevirtual

Add vertex to the graph.

Parameters
idvertex identifier
ptvertex coordinates
Note
id and pt are redundant. You can use pt or id to identify the vertex

Reimplemented from QgsGraphBuilderInterface.

Definition at line 38 of file qgsgraphbuilder.cpp.

§ graph()

QgsGraph * QgsGraphBuilder::graph ( )

Returns generated QgsGraph.

Definition at line 48 of file qgsgraphbuilder.cpp.


The documentation for this class was generated from the following files: