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 | None)

Add optimization strategy

Parameters:

prop (Optional[QgsNetworkStrategy])

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

Make a graph using QgsGraphBuilder

Parameters:
  • builder (Optional[QgsGraphBuilderInterface]) – the graph builder

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

  • snappedPoints – list of snapped points

  • feedback (Optional[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, signal: PYQT_SIGNAL) int
sender(self) QObject | None
senderSignalIndex(self) int
timerEvent(self, a0: QTimerEvent | None)