QGIS API Documentation  3.6.0-Noosa (5873452)
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 () override
 
void addEdge (int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &prop) override
 Add edge to the graph. More...
 
void addVertex (int id, const QgsPointXY &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 ()=default
 
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 35 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 26 of file qgsgraphbuilder.cpp.

◆ ~QgsGraphBuilder()

QgsGraphBuilder::~QgsGraphBuilder ( )
override

Definition at line 32 of file qgsgraphbuilder.cpp.

Member Function Documentation

◆ addEdge()

void QgsGraphBuilder::addEdge ( int  pt1id,
const QgsPointXY pt1,
int  pt2id,
const QgsPointXY 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 42 of file qgsgraphbuilder.cpp.

◆ addVertex()

void QgsGraphBuilder::addVertex ( int  id,
const QgsPointXY 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 37 of file qgsgraphbuilder.cpp.

◆ graph()

QgsGraph * QgsGraphBuilder::graph ( )

Returns generated QgsGraph.

Definition at line 47 of file qgsgraphbuilder.cpp.


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