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.
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