Book Image

QGIS Python Programming Cookbook

Book Image

QGIS Python Programming Cookbook

Overview of this book

Table of Contents (16 chapters)
QGIS Python Programming Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Routing along streets


Sometimes, you may want to find the best driving route between two addresses. Street routing has now become so commonplace that we take it for granted. However, if you explore the recipes on geocoding and network analysis in this book, you will begin to see what a complex challenge street routing truly is. To perform routing operations in QGIS, we'll use the QGIS GeoSearch plugin, which is written in Python, so that we can access it from the console.

Getting ready

You will need to install the QGIS Python GeoSearch plugin for this exercise in order to do the routing, as well as the QGIS OpenLayers Plugin to overlay the result on a Google map, as follows:

  1. From the QGIS Plugins menu, select Manage and Install Plugins….

  2. If you have the QGIS GeoCoding Plugin installed, then you must uninstall it, as sometimes it conflicts with the GeoSearch plugin. So, select this in the plugin list and click on the Uninstall plugin button.

  3. In the Plugins dialog search box, search for GeoSearch...