So I have a set of three layers:

  1. A set of points
  2. A road network layer
  3. A line layer (e.g. which represents a cable)

I need to find the shortest paths which connect the points (Layer 1) to the line layer (Layer 3) via the road network (Layer 2). I tried doing this by first converting the line to a set of points on QGIS 3.8 on Windows and then using GRASS 7.6 on CentOS 7 and using the v.net.distance algorithm to achieve my objective.

However, before this, I had to prepare the three layers using v.net and when doing so I encountered an error stating v.net: rect.c:338: RTreeRectVolume: Assertion volume >= 0.0' failed. Aborted (core dumped), which I believe was due to the large number of points that the line converted to.

For the time being, I've had to make do with a few points spaced far apart on the line layer and connecting the points from Layer 1 via v.net.distance. However, as evident from the image below this leads to inaccuracies when I try to calculate distances from the cable to the points as it often travels a long way along the cable before branching out to the road network.

On the image below: Road network: light grey. Line Layer: green. Points: red Triangles.


So in summary, what I need to do is find a way by which I get the shortest path to connect the points (in Layer 1) to the line (in Layer 3) via the road network (in Layer 2)

I am considering any solution using QGIS, GRASS GIS or a combination of both.

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.