3

I´m pretty new to QGIS and hence I do not know yet what is possible or not. I want to calculate the shortest distance between several points in a layer. Assuming I have 6 places I want to visit. Mom, dad, sister, brother grandma, grandpa. I have geographical coordinates for all of them. Now I want to know in which order to visit all of them to have the shortest distance.

I´ve already calculated a distance matrix and used several nearest neighbour plugins. However, I´ve not found a solution yet. Anyone struggled with something comparable?

  • 1
    Did you try the Chinese Postman Solver plugin as well? – Mazu_R Aug 12 '17 at 18:08
  • Dear Mazu, Thanks for the hint! I´ve tried the Chinese Postman Plugin. However, after selecting the features in the specific layer. Qgis returns "Could not find any components". The layer I´m referring to contains the Specific points (An ID, lat, long). do I have to change anything in the layer? – Jay Rege Aug 13 '17 at 12:34
  • I suppose that only points are not sufficient. You will need a line layer. Maybe the documentation on github will help you github.com/rkistner/chinese-postman – Mazu_R Aug 13 '17 at 18:19
  • wouldn't this be the travelling salesman rather than chinese postman? either way, you will have to use a routable network with a correctly noded topology to be able to use routing/graph algorithms. usually, that would be an edge layer (e.g. roads) as lines with cost atrributes (e.g. traveltime or lenght or...) and corresponding nodes as points (e.g. start/end/intersections of roads) to build the routing graph. if 'real' network routing is what you want, of course. – ThingumaBob Aug 13 '17 at 19:36
  • ah wait...I worked too much on network routing lately, didn't think of this as shortest path via distance matrix. Nevermind, Mazu is right and chinese postman it is. For whats it worth: built-in Python would be my choice if it has to be QGIS... – ThingumaBob Aug 13 '17 at 20:13

Your Answer

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

Browse other questions tagged or ask your own question.