0

As shown in the image below I need to connect the points in yellow to the respective nearest point in brown via the shortest path on the road network in blue.

Incorrect result when using v.net.distance

I decided to use v.net.distance on GRASS GIS 7.6 for this purpose as the documentation for it describes exactly what I need to achieve. However, as visible in the image, the path that was generated (in red) takes a longer route instead of the more obvious shortest path as it is supposed to. Not sure what I'm doing wrong here.

The commands I used are as follows.

v.net roads points=bs op=connect thresh=10000 output=net1
v.net net1 points=end op=connect thresh=1000 output=net2 arc_layer=1 node_layer=3
v.net.distance input=net2 output=network flayer=2 to_layer=3
4
  • I suspect that grass thinks it can only go along that line in one direction
    – Ian Turton
    Sep 16, 2019 at 8:11
  • @IanTurton any reason as to why that might happen and what I can do about it?
    – Nandula
    Sep 16, 2019 at 8:17
  • I've never used v.net but I'd look for reverse costs in the documentation
    – Ian Turton
    Sep 16, 2019 at 8:26
  • 2
    Please also verify that the network is really with all edges connected. v.net is the tool to use for network maintenance: grass.osgeo.org/grass78/manuals/v.net.html
    – markusN
    Sep 16, 2019 at 12:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.