1

I have some commuting data showing people who cycle to work. The data has residence, workplace and unique ID numbers for each commuter. I have georeferenced the home and work locations so I have two point shapefiles, work and home. I also have a shapefile of the road and cycle route network.

I have done some experimenting and the shortest path algorithm in QGIS 3 allows shortest route analysis of shapefile to point OR point to shapefile (which is super), but I need to calculate a route for EVERY commuter. Is there a way to automate this using the ID number as the base?

From looking into this online it seems that this may be possible using PGRouting in PostGIS, but it would be nice to find a solution avoiding PostGIS because my colleagues do not have access to this.

This stackexchange question alludes to a similar problem, but, again, this user is only using one point. I have not found a stackexchange thread which answers this problem. QGIS 3 - Shortest path layer to layer, not point!

1

You could use "OSM-Tools" to do this task.

There is currently a workaround to start routing, you have to select your features first and then start. Further information are available here.

This Plugin is available from the Plugin-Repository and after you ordered a key you can start routing.

enter image description here

  • This looks promising - I will experiment with this over the next few days. Thank you very much for your reply. – rkemp78 Aug 8 '18 at 12:56
  • I am struggling to get osm tools to work. I have my two point layers open. I have a valid API key (with credit remaining). I have selected all in both my point layers. OSM tools won't let me select the tables (the drop down ís blank) refresh list does nothing. I have reduced my point tables to a manageable number (3 points each) and I have tried various versions of QGIS 3. Any ideas what I am doing wrong? – rkemp78 Aug 12 '18 at 6:53
  • do you have an id field (integer) in your point features to select? do you try routing or matrix? I also had struggle with matrix. do you use epsg 4328? – DirkB. Aug 12 '18 at 8:26
  • Do you use the free api key? How many features do you want to route at once? – DirkB. Aug 12 '18 at 11:01
  • Yes, I am using the free API key, I have 0/2500 credit remaining. My ID field was char, but I've made a copy ID field in integer format for both tables - still the same. It doesn't work in Matrix or Routing. For the purposes of testing I am using two points in each table. I am using EPSG 27700 projection, but I don't suppose projection matters? – rkemp78 Aug 13 '18 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.