QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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
[legend]

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.
 
QgsDistanceAreadistanceArea ()
 Returns measurement tool.
 
double topologyTolerance () const
 Returns topology tolerance.
 

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 40 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.

Parameters
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 20 of file qgsgraphbuilderinterface.cpp.

◆ ~QgsGraphBuilderInterface()

virtual QgsGraphBuilderInterface::~QgsGraphBuilderInterface ( )
virtualdefault

Member Function Documentation

◆ addEdge()

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

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 in QgsGraphBuilder.

Definition at line 36 of file qgsgraphbuilderinterface.cpp.

◆ addVertex()

void QgsGraphBuilderInterface::addVertex ( int  id,
const QgsPointXY pt 
)
virtual

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 in QgsGraphBuilder.

Definition at line 30 of file qgsgraphbuilderinterface.cpp.

◆ coordinateTransformationEnabled()

bool QgsGraphBuilderInterface::coordinateTransformationEnabled ( ) const
inline

Returns coordinate transformation enabled.

Definition at line 73 of file qgsgraphbuilderinterface.h.

◆ destinationCrs()

QgsCoordinateReferenceSystem QgsGraphBuilderInterface::destinationCrs ( ) const
inline

Returns destinaltion CRS.

Definition at line 67 of file qgsgraphbuilderinterface.h.

◆ distanceArea()

QgsDistanceArea * QgsGraphBuilderInterface::distanceArea ( )
inline

Returns measurement tool.

Definition at line 85 of file qgsgraphbuilderinterface.h.

◆ topologyTolerance()

double QgsGraphBuilderInterface::topologyTolerance ( ) const
inline

Returns topology tolerance.

Definition at line 79 of file qgsgraphbuilderinterface.h.


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