[GRASS-user] v.net.distance - from feature was not reachable
Markus Metz
markus.metz.giswork at gmail.com
Sat Nov 23 12:00:19 PST 2019
On Wed, Nov 20, 2019 at 6:37 PM Daniel McInerney <
daniel.o.mcinerney at gmail.com> wrote:
>
> Hi List,
>
> We are using v.net.distance to calculate the shortest path between two
> points on a river network, but have been experiencing some issues in
> both grass 7.4 and 7.9. In some instances, we need to add a new vector
> line (stream) to the river network, which we have done using v.patch as
> follows:
>
> v.patch input=river_network,stream output=river_network_with_stream
>
> We then clean the output as follows:
>
> v.clean input=river_network_with_stream
> output=river_network_with_stream_clean tool=rmdupl,break,snap
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.
Markus M
>
> We then run the following steps to calculate the shortest path (based on
> the documentation [1]), where the vector dataset (start_point) is
> located on the above-mentioned stream and the end_point is located on
> the river network:
>
> v.net input=river_network_with_stream_clean points=start_point
> output=river_net operation=connect thresh=100 arc_layer=1 node_layer=2
> --overwrite
>
> v.net input=river_net points=end_point output=river_net2
> operation=connect thresh=100 arc_layer=1 node_layer=3 --overwrite
>
> The resulting output of v.category is:
>
> v.category input=river_net2 option=report
> Layer: 1
> type count min max
> point 0 0 0
> line 102092 1 102072
> boundary 0 0 0
> centroid 0 0 0
> area 0 0 0
> face 0 0 0
> kernel 0 0 0
> all 102092 1 102072
> Layer: 2
> type count min max
> point 1 1 1
> line 0 0 0
> boundary 0 0 0
> centroid 0 0 0
> area 0 0 0
> face 0 0 0
> kernel 0 0 0
> all 1 1 1
> Layer: 3
> type count min max
> point 1 1 1
> line 0 0 0
> boundary 0 0 0
> centroid 0 0 0
> area 0 0 0
> face 0 0 0
> kernel 0 0 0
> all 1 1 1
>
> At this point, I visually confirm that both points are connected to the
> network and then run:
>
> v.net.distance in=river_net2 out=river_path from_layer=2 to_layer=3
> --overwrite
>
> However, I (keep) get a warning ( WARNING: 1 'from' feature was not
> reachable) and the output is empty. I have read a few posts online
> reporting the same issue, but none of the proposed solutions have
> helped. Is there a step that I am overlooking as I would have assumed
> that once the network topology is built and the points are connected to
> the network that it would have run correctly. I confirm that I can
> calculate the shortest path when I use a start point that is the river
> network (excluding the stream), so I am assuming that the issue is
> related to the output of the v.patch?
>
>
> Thanks in advance for any help or suggestions.
>
> best regards,
>
> Daniel.
>
> [1]: https://grass.osgeo.org/grass76/manuals/v.net.distance.html
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20191123/f30eb240/attachment.html>
More information about the grass-user
mailing list