Class: QgsGraphDirector¶
Determine making the graph. QgsGraphBuilder
and
QgsGraphDirector
implemented using “builder” design patter.
Class Hierarchy¶
Base classes¶
Subclasses¶
Determine making the graph from vector line layer |
Methods
Add optimization strategy |
|
Make a graph using |
|
Returns director name |
- class qgis.analysis.QgsGraphDirector[source]¶
Bases:
QObject
- addStrategy(self, prop: QgsNetworkStrategy | None)[source]¶
Add optimization strategy
- Parameters:
prop (Optional[QgsNetworkStrategy])
- makeGraph(self, builder: QgsGraphBuilderInterface | None, additionalPoints: Iterable[QgsPointXY], feedback: QgsFeedback | None = None) List[QgsPointXY] [source]¶
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
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]
- Returns:
list of snapped points