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:

  1. In the points column, click the button and use the Select from open layers option to select sample_pts_for_routing and ...

Get QGIS: Becoming a GIS Power User now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.