QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | List of all members
QgsGraphBuilder Class Reference

This class 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 addArc (int pt1id, const QgsPoint &pt1, int pt2id, const QgsPoint &pt2, const QVector< QVariant > &prop) override
 add arc More...
 
virtual void addVertex (int id, const QgsPoint &pt) override
 add vertex More...
 
QgsGraphgraph ()
 return QgsGraph result; More...
 
- Public Member Functions inherited from QgsGraphBuilderInterface
 QgsGraphBuilderInterface (const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
 QgsGraphBuilderInterface constructor. More...
 
virtual ~QgsGraphBuilderInterface ()
 Destructor. More...
 
bool coordinateTransformationEnabled ()
 get coordinate transformation enabled More...
 
QgsCoordinateReferenceSystemdestinationCrs ()
 get destinaltion Crs More...
 
QgsDistanceAreadistanceArea ()
 get measurement tool More...
 
double topologyTolerance ()
 get topology tolerance More...
 

Detailed Description

This class making the QgsGraph object.

Definition at line 36 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 24 of file qgsgraphbuilder.cpp.

◆ ~QgsGraphBuilder()

QgsGraphBuilder::~QgsGraphBuilder ( )

Definition at line 30 of file qgsgraphbuilder.cpp.

Member Function Documentation

◆ addArc()

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

add arc

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

Reimplemented from QgsGraphBuilderInterface.

Definition at line 40 of file qgsgraphbuilder.cpp.

◆ addVertex()

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

add vertex

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

Reimplemented from QgsGraphBuilderInterface.

Definition at line 35 of file qgsgraphbuilder.cpp.

◆ graph()

QgsGraph * QgsGraphBuilder::graph ( )

return QgsGraph result;

Definition at line 45 of file qgsgraphbuilder.cpp.


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