1

I am trying to calculate the shortest path over a series of points via the road layer. For this, I am using the shortest path algorithm in the network analysis tool via the Python console.

However, the algorithm takes a while to be solved because the area of the layer roads that I'm using is quite large. I was wondering if there is a faster way to do this, maybe obtaining a sublayer of the road graph, and then running the algorithm over that sublayer.

To give an example, for the figure in below I'd like to calculate the shortest path between the green and orange point, over the area marked in red and not the entire road layer.

Is there a simple way to obtain the area marked in red, any suggestions on how can I implement it?

New contributor
Andres is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

closed as off-topic by PolyGeo Aug 14 at 19:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.