Skip to content

Commit

Permalink
Fix crashing test
Browse files Browse the repository at this point in the history
Add missing strategy call
  • Loading branch information
nyalldawson authored and DelazJ committed Apr 22, 2024
1 parent b8a310f commit 44126e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/pyqgis_developer_cookbook/network_analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ uses the :meth:`shortestTree() <qgis.analysis.QgsGraphAnalyzer.shortestTree>` me
vectorLayer = QgsVectorLayer('testdata/network.gpkg|layername=network_lines', 'lines')
builder = QgsGraphBuilder(vectorLayer.sourceCrs())
director = QgsVectorLayerDirector(vectorLayer, -1, '', '', '', QgsVectorLayerDirector.DirectionBoth)
strategy = QgsNetworkDistanceStrategy()
director.addStrategy(strategy)
startPoint = QgsPointXY(1179661.925139,5419188.074362)
endPoint = QgsPointXY(1180942.970617,5420040.097560)
Expand Down

0 comments on commit 44126e3

Please sign in to comment.