Class: QgsGraphDirector

class qgis.analysis.QgsGraphDirector

Bases: PyQt5.QtCore.QObject

Determine making the graph. QgsGraphBuilder and QgsGraphDirector implemented using “builder” design patter.

addStrategy(self, prop: QgsNetworkStrategy)

Add optimization strategy

Parameters

prop (QgsNetworkStrategy) –

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
isSignalConnected(self, QMetaMethod)bool
makeGraph(self, builder: QgsGraphBuilderInterface, additionalPoints: Iterable[QgsPointXY], feedback: QgsFeedback = None)List[QgsPointXY]

Make a graph using QgsGraphBuilder

Parameters
  • builder (QgsGraphBuilderInterface) – the graph builder

  • additionalPoints (Iterable[QgsPointXY]) – list of points that should be snapped to the graph

  • snappedPoints – list of snapped points

  • feedback (QgsFeedback = None) – feedback object for reporting progress

Note

if snappedPoints[i] == QgsPointXY(0.0,0.0) then snapping failed.

Return type

List[QgsPointXY]

name(self)str

Returns director name

Return type

str

receivers(self, PYQT_SIGNAL)int
sender(self)QObject
senderSignalIndex(self)int
timerEvent(self, QTimerEvent)