0

I am having some trouble with finding an easy way to find the most optimum (shortest) route between four or so points without returning to the original one while following the path shown (red lines). My line layer is composed of multi-strings and my point layer has four points that overlay certain intersections on the line layer (refer to image). Accordingly, I have tried ORS Tools but I have yet to find a solution to the errors it gives (this is the origin of the blue lines you can see on the image), but I have still yet to fully understand PGrouting so that might be a start.

enter image description here

CarloseNew
  • 27
  • 2
  • Have you seen this QGIS tool "Shortest path (point to point)"? Also check this thread: https://gis.stackexchange.com/q/432668/99589 (linked up with @J.Monticolo's comment). – Taras Dec 18 '23 at 11:28
  • Yes I have seen that one, the only issue being that MTSP plugin has apparently been deprecated, v.net.salesman gives a strange result with it apparently taking the longest path even if there is an easier path, and ORS tools giving me errors any time I try to fix points but otherwise working well. – CarloseNew Dec 18 '23 at 11:37
  • Yes that is perfectly fine, thank you. – CarloseNew Dec 18 '23 at 11:53
  • 1
    Multi-part lines are probably inappropriate for network wayfinding. – Vince Dec 18 '23 at 13:00
  • would it just be possible to just dissolve them then? – CarloseNew Dec 18 '23 at 13:11
  • Please, see the updated answer: https://gis.stackexchange.com/questions/432668/building-the-shortest-route-through-all-points-in-qgis – Taras Dec 18 '23 at 13:20
  • Usualy one splits multipart features to make them singlepart. If dissolve works, then the feature shouldn't have been multipart. – Vince Dec 18 '23 at 14:30
  • Taras: Thank you for your answer, the code works perfectly, but I found that the temporary layer has the points connected with completely straight lines (with them still returning back to the original point regardless). I think I should have made it clearer that the path should following the line layer. – CarloseNew Dec 18 '23 at 18:50

0 Answers0