Automating multiple route computation using batch processing
If you have multiple input point layers, you can use Processing's batch processing capabilities to speed up the process. In this recipe, we will compute routes for two input point layers at once, but the same approach can be applied to many more layers.
Getting ready
To follow this recipe, load network_pgr.shp
and the two point layers, sample_pts_for_routing.shp
and sample_pts_for_routing2.shp
.
How to do it…
To get started, right-click on the point layer to route tool in the Processing Toolbox option and select Execute as batch process. Then perform the following steps:
In the points column, click the … button and use the Select from open layers option to select
sample_pts_for_routing
andsample_pts_for_routing2
.Select and remove the third line using the Delete row button at the bottom of the dialog.
In the network column, click the … button and use the Select from open layers option to select
network_pgr
. You can avoid having to pick...