QGIS API Documentation  2.99.0-Master (314842d)
Public Member Functions | List of all members
QgsGraphBuilderInterface Class Reference

Determine interface for creating a graph. More...

#include <qgsgraphbuilderinterface.h>

Inheritance diagram for QgsGraphBuilderInterface:
Inheritance graph

Public Member Functions

 QgsGraphBuilderInterface (const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
 Default constructor. More...
virtual ~QgsGraphBuilderInterface ()
virtual void addEdge (int pt1id, const QgsPoint &pt1, int pt2id, const QgsPoint &pt2, const QVector< QVariant > &strategies)
 Add edge to the graph. More...
virtual void addVertex (int id, const QgsPoint &pt)
 Add vertex to the graph. 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

Determine interface for creating a graph.

Contains the settings of the graph. QgsGraphBuilder and QgsGraphDirector both use a "builder" design pattern

Definition at line 33 of file qgsgraphbuilderinterface.h.

Constructor & Destructor Documentation

◆ QgsGraphBuilderInterface()

QgsGraphBuilderInterface::QgsGraphBuilderInterface ( const QgsCoordinateReferenceSystem crs,
bool  ctfEnabled = true,
double  topologyTolerance = 0.0,
const QString &  ellipsoidID = "WGS84" 

Default constructor.

crsCoordinate reference system for new graph vertex
ctfEnabledenable coordinate transform from source graph CRS to CRS graph
topologyTolerancesqrt distance between source point as one graph vertex
ellipsoidIDellipsoid for edge measurement

Definition at line 44 of file qgsgraphbuilderinterface.h.

◆ ~QgsGraphBuilderInterface()

virtual QgsGraphBuilderInterface::~QgsGraphBuilderInterface ( )

Definition at line 54 of file qgsgraphbuilderinterface.h.

Member Function Documentation

◆ addEdge()

virtual void QgsGraphBuilderInterface::addEdge ( int  pt1id,
const QgsPoint pt1,
int  pt2id,
const QgsPoint pt2,
const QVector< QVariant > &  strategies 

Add edge to the graph.

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

Reimplemented in QgsGraphBuilder.

Definition at line 102 of file qgsgraphbuilderinterface.h.

◆ addVertex()

virtual void QgsGraphBuilderInterface::addVertex ( int  id,
const QgsPoint pt 

Add vertex to the graph.

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

Reimplemented in QgsGraphBuilder.

Definition at line 87 of file qgsgraphbuilderinterface.h.

◆ coordinateTransformationEnabled()

bool QgsGraphBuilderInterface::coordinateTransformationEnabled ( )

Returns coordinate transformation enabled.

Definition at line 64 of file qgsgraphbuilderinterface.h.

◆ destinationCrs()

QgsCoordinateReferenceSystem QgsGraphBuilderInterface::destinationCrs ( ) const

Returns destinaltion CRS.

Definition at line 58 of file qgsgraphbuilderinterface.h.

◆ distanceArea()

QgsDistanceArea* QgsGraphBuilderInterface::distanceArea ( )

Returns measurement tool.

Definition at line 76 of file qgsgraphbuilderinterface.h.

◆ topologyTolerance()

double QgsGraphBuilderInterface::topologyTolerance ( )

Returns topology tolerance.

Definition at line 70 of file qgsgraphbuilderinterface.h.

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