QGIS – Network Analysis: Point to Layer

Marketing
Marketing
  • Updated

By David Crowther

QGIS___Network_Analysis_-_Point_to_Layer_-_1.PNG

Question:

How can I calculate the distance to multiple locations in QGIS?

Answer:

In this previous blog we explore a number of QGIS tools and plugins which allow you to perform routing analysis, including Shortest Path, Distance to Lines and Isochrone Catchment analysis  - https://www.cadlinecommunity.co.uk/hc/en-us/articles/360001338178-QGIS-Routing-and-Distance-Tools

As a follow up to that Blog, we will now look at another option in the Network Analysis toolbox – Point to Layer.

In this QGIS project we have a line network from the Ordnance Survey – ITN_TF and a layer of Points for the School locations in this area – GuildfordSchools.

Using the Point to Layer tool we will calculate the distance from a chosen location (e.g. Home Address), using the road network to each of the end points represented by the School locations.

QGIS___Network_Analysis_-_Point_to_Layer_-_2.PNG

In QGIS choose Processing > Toolbox > and open the Network Analysis section.

QGIS___Network_Analysis_-_Point_to_Layer_-_3.PNG

Choose the Shortest Path > Point to Layer menu option and complete the menu below.

QGIS___Network_Analysis_-_Point_to_Layer_-_4.PNG

  • Vector layer representing network – choose your road network.
  • Path to CalculateShortest or Fastest (you can use Fastest if you have a road speed in your road network).
  • Start Pointclick in the map canvas to choose the start location.
  • Vector layer with end points – choose the School Locations layer.

QGIS___Network_Analysis_-_Point_to_Layer_-_5.PNG

Press Run and the calculation from the start point to each end point (School Locations) will commence.

The output will be a new Line Layer, with a line segment from the start location (Home Address) to each end point (School Location).

QGIS___Network_Analysis_-_Point_to_Layer_-_6.PNG

If you open the attribute table, this new layer will have a record for each end Point (School) with the original School Attributes and now a new column on the end with the calculated distance – referred to as the Cost.

QGIS___Network_Analysis_-_Point_to_Layer_-_7.PNG

The Cost field now shows the Distance (in the Project units e.g. Metres)  to each School from the chosen start location. This is therefore a great tool to use if you are looking to calculate the distance from a Home Address to multiple Schools, allowing decisions to be made for Travel Awards and/or School Applications.

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.