QGIS – Valhalla Isochrones

Marketing
Marketing
  • Updated

By David Crowther

QGIS___Valhalla_Isochrones_-_1.PNG

Question:

Can you create distance/time isochrones in QGIS?

Answer:

Yes, QGIS has several tools and plugins that you can use to create distance or time isochrones. These previous Blogs and FAQs are a good starting point to learn about some of those tools:

Location Lab -

https://www.cadlinecommunity.co.uk/hc/en-us/articles/360001604058-QGIS-Location-Lab-Catchments

Routing and Distance Tools -

https://www.cadlinecommunity.co.uk/hc/en-us/articles/360001338178-QGIS-Routing-and-Distance-Tools

Service Areas -

https://www.cadlinecommunity.co.uk/hc/en-us/articles/4402652359185-QGIS-Network-Analysis-Service-Areas-

… and here is another one!... it’s called Valhalla.

Open the QGIS Plugins tool and search for Valhalla.

QGIS___Valhalla_Isochrones_-_2.PNG

Once you have found the plugin, choose Install Plugin.

QGIS___Valhalla_Isochrones_-_3.PNG

It will be installed and accessible under the Web menu.

QGIS___Valhalla_Isochrones_-_4.PNG

To use the Valhalla tool, you will need to setup the Provider Settings. Before we do that, we will need to get our API key from the provider of the online routing service, which is MapBox.

If you haven’t already created a MapBox account, then follow this blog to get started –

https://www.cadlinecommunity.co.uk/hc/en-us/articles/360000603618-MapThat-Create-your-own-MapBox-Access-Tokens

Within MapBox you can choose the Navigation > Directions API page.

QGIS___Valhalla_Isochrones_-_5.PNG

On the Directions API page, copy the public access token shown in the window to the left of the map.

QGIS___Valhalla_Isochrones_-_6.PNG

Back in QGIS, choose Web > Valhalla > Provider Settings and choose the MapBox option.

QGIS___Valhalla_Isochrones_-_7.PNG

Paste in the public access token into the API Key window and press OK.

To now run the tool, choose Web > Valhalla > Valhalla.

QGIS___Valhalla_Isochrones_-_8.PNG

Choose the Provider to be MapBox, and then in the Valhalla window choose the task you wish to perform, which include:

  • Point to Point Routing
  • Isochrones
  • Source to Target
  • Locate
  • Centroid
  • Extract

In this example, we will choose Isochrone, and from the Go With option we can choose automatic, truck,  bicycle or pedestrian.

QGIS___Valhalla_Isochrones_-_9.PNG

We will choose auto.

Then from the Mode we can either choose fastest or shortest – dependent on the task you have.

QGIS___Valhalla_Isochrones_-_10.PNG

To now generate the travel isochrone, you need to add a starting point into the map.

  • To add one starting point, choose the green plus button and double click in the map at your chosen start location.
  • To add multiple starting points, choose the green button and left click in the map to add multiple starting points, double left clicking to add the last one.

QGIS___Valhalla_Isochrones_-_11.PNG

The starting points are then added into the Valhalla tool window.

QGIS___Valhalla_Isochrones_-_12.PNG

If you need to remove a starting point, select the point in the list and choose the Red X button.

There are then a number of settings and parameters that you can choose, including:

  • Method Configuration
  • Costing Options
  • Avoid Locations

Choose Method Configuration > Isochrones.

QGIS___Valhalla_Isochrones_-_13.PNG

  • The default time travelled for each isochrone will be 10 minutes. Change that value as required e.g. choose a 15-minute isochrone.
  • The default isochrone geometry will be a Polygon, but you could choose a LineString, which would create lines around the edges of the isochrone area.

Having changed the configuration as desired….

QGIS___Valhalla_Isochrones_-_14.PNG

Choose Apply and the Isochrone generation stars.

The output is a scratch layer, which has one or many polygons, indicating the area that can be covered travelling for 15 minutes from each start location.

We ran multiple starting points, so each coloured polygon is the isochrone denoting the area that can be reached in 15 minutes from each start point.

QGIS___Valhalla_Isochrones_-_15.PNG

If we changed the geometry parameter to aggregate the polygon….

QGIS___Valhalla_Isochrones_-_16.PNG

….. and press Apply, we then get one polygon, denoting the area that can be reached in 15 minutes is we were to use the 3 starting points.

QGIS___Valhalla_Isochrones_-_17.PNG

Let’s make one last change and make the output geometry a LineString.

QGIS___Valhalla_Isochrones_-_18.PNG

Press Apply, we then get a LineString layer showing the edges of the isochrone, without applying fill.

QGIS___Valhalla_Isochrones_-_19.PNG

Why not download the Valhalla plugin yourself and see how you can create isochrones around your data? It’s a great way to undertake spatial analysis such as:

  • what population can reach a hospital within x minutes?
  • which offenders live within x minutes of an incident?

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.