<div dir="ltr"><br><br>On Wed, Nov 20, 2019 at 6:37 PM Daniel McInerney <<a href="mailto:daniel.o.mcinerney@gmail.com">daniel.o.mcinerney@gmail.com</a>> wrote:<br>><br>> Hi List,<br>><br>> We are using v.net.distance to calculate the shortest path between two<br>> points on a river network, but have been experiencing some issues in<br>> both grass 7.4 and 7.9. In some instances, we need to add a new vector<br>> line (stream) to the river network, which we have done using v.patch as<br>> follows:<br>><br>> v.patch input=river_network,stream output=river_network_with_stream<br>><br>> We then clean the output as follows:<br>><br>> v.clean input=river_network_with_stream<br><div>> output=river_network_with_stream_clean tool=rmdupl,break,snap</div><div><br></div><div>I suspect that the two river networks are just not connected (connecting vertices do not match). This could be fixed by using a larger threshold value for the snap tool in v.clean. You can also check with v.net.components if the resultant river networks are correct.</div><div><br></div><div>Markus M<br></div>><br>> We then run the following steps to calculate the shortest path (based on<br>> the documentation [1]), where the vector dataset (start_point) is<br>> located on the above-mentioned stream and the end_point is located on<br>> the river network:<br>><br>> <a href="http://v.net">v.net</a> input=river_network_with_stream_clean points=start_point<br>> output=river_net operation=connect thresh=100 arc_layer=1 node_layer=2<br>> --overwrite<br>><br>> <a href="http://v.net">v.net</a> input=river_net points=end_point output=river_net2<br>> operation=connect thresh=100 arc_layer=1 node_layer=3 --overwrite<br>><br>> The resulting output of v.category is:<br>><br>>   v.category input=river_net2 option=report<br>> Layer: 1<br>> type       count        min        max<br>> point          0          0          0<br>> line      102092          1     102072<br>> boundary       0          0          0<br>> centroid       0          0          0<br>> area           0          0          0<br>> face           0          0          0<br>> kernel         0          0          0<br>> all       102092          1     102072<br>> Layer: 2<br>> type       count        min        max<br>> point          1          1          1<br>> line           0          0          0<br>> boundary       0          0          0<br>> centroid       0          0          0<br>> area           0          0          0<br>> face           0          0          0<br>> kernel         0          0          0<br>> all            1          1          1<br>> Layer: 3<br>> type       count        min        max<br>> point          1          1          1<br>> line           0          0          0<br>> boundary       0          0          0<br>> centroid       0          0          0<br>> area           0          0          0<br>> face           0          0          0<br>> kernel         0          0          0<br>> all            1          1          1<br>><br>> At this point, I visually confirm that both points are connected to the<br>> network and then run:<br>><br>> v.net.distance in=river_net2 out=river_path from_layer=2 to_layer=3<br>> --overwrite<br>><br>> However, I (keep) get a warning ( WARNING: 1 'from' feature was not<br>> reachable) and the output is empty. I have read a few posts online<br>> reporting the same issue, but none of the proposed solutions have<br>> helped. Is there a step that I am overlooking as I would have assumed<br>> that once the network topology is built and the points are connected to<br>> the network that it would have run correctly. I confirm that I can<br>> calculate the shortest path when I use a start point that is the river<br>> network (excluding the stream), so I am assuming that the issue is<br>> related to the output of the v.patch?<br>><br>><br>> Thanks in advance for any help or suggestions.<br>><br>> best regards,<br>><br>> Daniel.<br>><br>> [1]: <a href="https://grass.osgeo.org/grass76/manuals/v.net.distance.html">https://grass.osgeo.org/grass76/manuals/v.net.distance.html</a><br>><br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a></div>