[GRASS-user] Extract subnet from grass vector network based on selected nodes
Johannes Radinger
johannesradinger at gmail.com
Thu Sep 28 04:04:17 PDT 2017
Hi all,
I just tried two different tools that both work to extract a subnetwork
that connects a set of selected nodes:
1) v.net.allpairs works fine and a subnetwork is extracted. However, this
definitely needs some clean up and layer/attribute operations to get the
connected tables/cats from the original network
2) v.net.steiner also works fine. However, it seems that this approach
takes slightly longer than v.net.allpairs.
In general both approaches are rather slow if one wants to extract a
subnetwork based on e.g. >1000 selected nodes from a very large network.
For example, my initial (large) network consists of >100000 lines which
makes any further analysis rather slow. Thus, I wanted to minimize the
network to one that still connects my target nodes but skips parts that are
not needed.
Thank you for you suggestions, anyway.
/Johannes
On Thu, Sep 28, 2017 at 10:06 AM, Markus Metz <markus.metz.giswork at gmail.com
> wrote:
>
>
> On Thu, Sep 28, 2017 at 9:43 AM, Moritz Lennert <
> mlennert at club.worldonline.be> wrote:
> >
> > On 28/09/17 08:51, Markus Metz wrote:
> >>
> >>
> >>
> >> On Wed, Sep 27, 2017 at 11:55 PM, Moritz Lennert <
> mlennert at club.worldonline.be <mailto:mlennert at club.worldonline.be>> wrote:
> >> >
> >> > On 27/09/17 21:03, Markus Metz wrote:
> >> >>
> >> >>
> >> >>
> >> >> On Wed, Sep 27, 2017 at 4:07 PM, Moritz Lennert <
> mlennert at club.worldonline.be <mailto:mlennert at club.worldonline.be>
> <mailto:mlennert at club.worldonline.be <mailto:mlennert at club.worldonline.be>>>
> wrote:
> >> >> >
> >> >> >
> >> >> >
> >> >> > Le 27 septembre 2017 13:11:54 GMT+02:00, Johannes Radinger <
> johannesradinger at gmail.com <mailto:johannesradinger at gmail.com> <mailto:
> johannesradinger at gmail.com <mailto:johannesradinger at gmail.com>>> a écrit :
> >> >> > >Hi,
> >> >> > >
> >> >> > >I have a GRASS vector network that represents a river network
> (with
> >> >> > >many
> >> >> > >first order tributaries) and that has additional connected
> nodes that
> >> >> > >represent sampling sites.
> >> >> > >
> >> >> > >I'd like to extract a minimum subnetwork of the full network
> that still
> >> >> > >connects a set of selected nodes (e.g. identified by their cat).
> >> >> > >However,
> >> >> > >network edges (i.e. river segments) that are not necessary to
> connect
> >> >> > >the
> >> >> > >sampling points should be excluded in the new subnetwork. Is
> there a
> >> >> > >function or process in GRASS GIS to extract such a subnetwork
> that
> >> >> > >fully
> >> >> > >connects a set of selected nodes?
> >> >> >
> >> >> > not sure but maybe v.net.spanningtree ?
> >> >>
> >> >> v.net.spanningtree calculates a tree covering all nodes in the
> network, not only selected nodes, therefore v.net.spanningtree does not
> apply here.
> >> >
> >> >
> >> > If you connect only the selected nodes to the network, wouldn't that
> work ? Or does v.net.spanningtree consider all connections between lines as
> nodes ?
> >>
> >> v.net.spanningtree considers all internal nodes of the network. See also
> >> https://en.wikipedia.org/wiki/Spanning_tree
> >
> >
> > Ok, thanks. So, one would need to "disconnect" lines at non-selected
> nodes for this to work.
>
> or use v.net.steiner (see my previous reply)
> >
> > And maybe some clarification on what is meant by "nodes" in the sentence
> "A spanning tree is a minimum cost subnetwork connecting all nodes in an
> undirected network" in the man page might help future users.
>
> Yes, that would help. I needed to look at the library fn
> NetA_spanning_tree() to be sure.
>
> Markus M
> >
> > Moritz
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170928/27dc0051/attachment-0001.html>
More information about the grass-user
mailing list