Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • Thanks for the reply....but it doesn't work in my model. Honestly, i don't know why. The process is clear, are you sure that all is correct? Thanks again! Commented Jan 25, 2022 at 11:07
  • Do you get an error? The End point geometry must be very precise, it must be exactly on the network for a route to be calculated. If your calculated coordinates are not, you will have to add a step to find the nearest point on the network from your calculated point. To test I used vertex snapping with a new point layer and just calculated the $x,$y as a shortcut to get come coordinates. Commented Jan 25, 2022 at 11:23
  • No error, simply the paths are not created. I used vertex snapping and it's very precise. I tested this coordinates value also out of the model and the paths are ok. Is it ok that the "shortest path algorithm" is not connected to the "field calculator" block? Commented Jan 25, 2022 at 11:31
  • I added a step in my answer which might solve it. (Change the input type of the End point parameter from Value to Pre-calculated Value). Apologies, I missed that in my answer intially. Commented Jan 25, 2022 at 12:51
  • It's fine that they are not connected. If the Shortest path algorithm was using the output of the Field calculator directly they would be connected, but in this case the model makes a new layer from the field calculator (lyr_with_coords) and adds it to the canvas before picking it up again to use. I couldn't get Shortest path to recognise the output directly wthout making a new layer. Commented Jan 25, 2022 at 13:01