Book Image

QGIS Blueprints

By : Ben Mearns
Book Image

QGIS Blueprints

By: Ben Mearns

Overview of this book

Table of Contents (14 chapters)
QGIS Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Generating the shortest paths for all students


So far, we have only looked at the shortest path between all the given segments of road in the city. Now, given the student location, let's look at where student traffic will accumulate.

Finding the associated segment for a student location

By following these steps, we will join attributes from the closest road segment—including the associated topological and travel attributes—to each student location. Perform the following steps:

  1. Install the NNJoin plugin.

  2. Navigate to Plugins | NNJoin | NNJoin.

  3. Enter the following parameters:

    • Input vector layer: students

    • Join vector layer: newark_osm

    • Output layer: students_topology

  4. Click on OK.

  5. Import students_topology into the packt_c4 database using Database Manager.

The following image shows the parameters as entered into the NNJoin plugin:

Calculating the accumulated shortest paths by segment

We want to find which routes are the most popular given the student locations, network characteristics, and school location...