Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-10-17 Thread Johannes Radinger
Dear Stefan,
Dear all,

thank you for your tipps, and especially the recommendations regarding the
use of the igraph library. In fact, I decided to use do most of the network
analysis now in igraph/R. I use GRASS and the report option of v.net to get
a table of all vertices and edges my graph/network consists of.
Subsequently, I load these tables in igraph and conduct specific analysis.
That seems a very convenient way to obtain most of the information I am
looking for.

/J

On Fri, Oct 13, 2017 at 3:17 PM, Stefan Blumentrath <
stefan.blumentr...@nina.no> wrote:

> Hi Johannes,
>
>
>
> Sorry for the delayed response.
>
>
>
> You could try v.net and then use igraph.
>
>
>
> See: https://github.com/NINAnor/gudbrand_hydro/blob/master/v.
> igraph.order.py
>
> as an example for network analysis using a GRASS python script in
> combination with igraph.
>
>
>
> What you would need is to compute the paths between all possible
> combinations of sampling sites (using e.g. http://igraph.org/python/doc/
> igraph.GraphBase-class.html#get_shortest_paths).
>
> Once you got a unique list of edges you can use v.extract I guess to get
> your subnetwork…
>
>
>
> Or if you continue with network analysis you could just use:
>
> http://igraph.org/python/doc/igraph.GraphBase-class.html#subgraph_edges
>
>
>
> Hope that is somehow useful…
>
>
>
> Cheers
>
> Stefan
>
>
>
> *From:* grass-user [mailto:grass-user-boun...@lists.osgeo.org] *On Behalf
> Of *Johannes Radinger
> *Sent:* torsdag 28. september 2017 13.04
> *To:* Markus Metz <markus.metz.gisw...@gmail.com>
> *Cc:* GRASS user list <grass-user@lists.osgeo.org>
> *Subject:* Re: [GRASS-user] Extract subnet from grass vector network
> based on selected nodes
>
>
>
> 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 >10 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.gisw...@gmail.com> wrote:
>
>
>
> On Thu, Sep 28, 2017 at 9:43 AM, Moritz Lennert <
> mlenn...@club.worldonline.be> wrote:
> >
> > On 28/09/17 08:51, Markus Metz wrote:
> >>
> >>
> >>
> >> On Wed, Sep 27, 2017 at 11:55 PM, Moritz Lennert <
> mlenn...@club.worldonline.be <mailto:mlenn...@club.worldonline.be>> wrote:
> >>  >
> >>  > On 27/09/17 21:03, Markus Metz wrote:
> >>  >>
> >>  >>
> >>  >>
> >>  >> On Wed, Sep 27, 2017 at 4:07 PM, Moritz Lennert <
> mlenn...@club.worldonline.be <mailto:mlenn...@club.worldonline.be>
> <mailto:mlenn...@club.worldonline.be <mailto:mlenn...@club.worldonline.be>>>
> wrote:
> >>  >>  >
> >>  >>  >
> >>  >>  >
> >>  >>  > Le 27 septembre 2017 13:11:54 GMT+02:00, Johannes Radinger <
> johannesradin...@gmail.com <mailto:johannesradin...@gmail.com>  johannesradin...@gmail.com <mailto:johannesradin...@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

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-10-13 Thread Stefan Blumentrath
Hi Johannes,

Sorry for the delayed response.

You could try v.net and then use igraph.

See: https://github.com/NINAnor/gudbrand_hydro/blob/master/v.igraph.order.py
as an example for network analysis using a GRASS python script in combination 
with igraph.

What you would need is to compute the paths between all possible combinations 
of sampling sites (using e.g. 
http://igraph.org/python/doc/igraph.GraphBase-class.html#get_shortest_paths).
Once you got a unique list of edges you can use v.extract I guess to get your 
subnetwork…

Or if you continue with network analysis you could just use:
http://igraph.org/python/doc/igraph.GraphBase-class.html#subgraph_edges

Hope that is somehow useful…

Cheers
Stefan

From: grass-user [mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of 
Johannes Radinger
Sent: torsdag 28. september 2017 13.04
To: Markus Metz <markus.metz.gisw...@gmail.com>
Cc: GRASS user list <grass-user@lists.osgeo.org>
Subject: Re: [GRASS-user] Extract subnet from grass vector network based on 
selected nodes

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 >10 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.gisw...@gmail.com<mailto:markus.metz.gisw...@gmail.com>> wrote:


On Thu, Sep 28, 2017 at 9:43 AM, Moritz Lennert 
<mlenn...@club.worldonline.be<mailto:mlenn...@club.worldonline.be>> wrote:
>
> On 28/09/17 08:51, Markus Metz wrote:
>>
>>
>>
>> On Wed, Sep 27, 2017 at 11:55 PM, Moritz Lennert 
>> <mlenn...@club.worldonline.be<mailto:mlenn...@club.worldonline.be> 
>> <mailto:mlenn...@club.worldonline.be<mailto:mlenn...@club.worldonline.be>>> 
>> wrote:
>>  >
>>  > On 27/09/17 21:03, Markus Metz wrote:
>>  >>
>>  >>
>>  >>
>>  >> On Wed, Sep 27, 2017 at 4:07 PM, Moritz Lennert 
>> <mlenn...@club.worldonline.be<mailto:mlenn...@club.worldonline.be> 
>> <mailto:mlenn...@club.worldonline.be<mailto:mlenn...@club.worldonline.be>> 
>> <mailto:mlenn...@club.worldonline.be<mailto:mlenn...@club.worldonline.be> 
>> <mailto:mlenn...@club.worldonline.be<mailto:mlenn...@club.worldonline.be>>>> 
>> wrote:
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  > Le 27 septembre 2017 13:11:54 GMT+02:00, Johannes Radinger 
>> <johannesradin...@gmail.com<mailto:johannesradin...@gmail.com> 
>> <mailto:johannesradin...@gmail.com<mailto:johannesradin...@gmail.com>> 
>> <mailto:johannesradin...@gmail.com<mailto:johannesradin...@gmail.com> 
>> <mailto:johannesradin...@gmail.com<mailto:johannesradin...@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 h

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-28 Thread Johannes Radinger
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 >10 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  wrote:

>
>
> On Thu, Sep 28, 2017 at 9:43 AM, Moritz Lennert <
> mlenn...@club.worldonline.be> wrote:
> >
> > On 28/09/17 08:51, Markus Metz wrote:
> >>
> >>
> >>
> >> On Wed, Sep 27, 2017 at 11:55 PM, Moritz Lennert <
> mlenn...@club.worldonline.be > wrote:
> >>  >
> >>  > On 27/09/17 21:03, Markus Metz wrote:
> >>  >>
> >>  >>
> >>  >>
> >>  >> On Wed, Sep 27, 2017 at 4:07 PM, Moritz Lennert <
> mlenn...@club.worldonline.be 
> >>
> wrote:
> >>  >>  >
> >>  >>  >
> >>  >>  >
> >>  >>  > Le 27 septembre 2017 13:11:54 GMT+02:00, Johannes Radinger <
> johannesradin...@gmail.com   johannesradin...@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
>
>
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-28 Thread Markus Metz
On Thu, Sep 28, 2017 at 9:43 AM, Moritz Lennert <
mlenn...@club.worldonline.be> wrote:
>
> On 28/09/17 08:51, Markus Metz wrote:
>>
>>
>>
>> On Wed, Sep 27, 2017 at 11:55 PM, Moritz Lennert <
mlenn...@club.worldonline.be > wrote:
>>  >
>>  > On 27/09/17 21:03, Markus Metz wrote:
>>  >>
>>  >>
>>  >>
>>  >> On Wed, Sep 27, 2017 at 4:07 PM, Moritz Lennert <
mlenn...@club.worldonline.be  mailto:mlenn...@club.worldonline.be>>> wrote:
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  > Le 27 septembre 2017 13:11:54 GMT+02:00, Johannes Radinger <
johannesradin...@gmail.com  mailto:johannesradin...@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
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-28 Thread Moritz Lennert

On 28/09/17 08:51, Markus Metz wrote:



On Wed, Sep 27, 2017 at 11:55 PM, Moritz Lennert 
> wrote:

 >
 > On 27/09/17 21:03, Markus Metz wrote:
 >>
 >>
 >>
 >> On Wed, Sep 27, 2017 at 4:07 PM, Moritz Lennert 
 
>> wrote:

 >>  >
 >>  >
 >>  >
 >>  > Le 27 septembre 2017 13:11:54 GMT+02:00, Johannes Radinger 
 
>> 
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.


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.


Moritz  
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-28 Thread Stefan Blumentrath
Did you try:
v.net.allpairs input=river_network out=river_sampling_subnet 
where=”node_type=’sampling point’” # You could also use “cats=1-5” or whatever… 
and maybe also specify arc_column=name arc_backward_column=name as I assume 
your network is directed, but arc_column options are probably not necessary..

Cheers
Stefan



From: grass-user [mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of 
Stefan Blumentrath
Sent: onsdag 27. september 2017 13.30
To: Johannes Radinger <johannesradin...@gmail.com>; GRASS user list 
<grass-user@lists.osgeo.org>
Subject: Re: [GRASS-user] Extract subnet from grass vector network based on 
selected nodes

Sorry, there is: https://grass.osgeo.org/grass72/manuals/v.net.allpairs.html

From: grass-user [mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of 
Johannes Radinger
Sent: onsdag 27. september 2017 13.12
To: GRASS user list 
<grass-user@lists.osgeo.org<mailto:grass-user@lists.osgeo.org>>
Subject: [GRASS-user] Extract subnet from grass vector network based on 
selected nodes

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?

Cheers,
Johannes
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-28 Thread Markus Metz
On Wed, Sep 27, 2017 at 11:55 PM, Moritz Lennert <
mlenn...@club.worldonline.be> wrote:
>
> On 27/09/17 21:03, Markus Metz wrote:
>>
>>
>>
>> On Wed, Sep 27, 2017 at 4:07 PM, Moritz Lennert <
mlenn...@club.worldonline.be > wrote:
>>  >
>>  >
>>  >
>>  > Le 27 septembre 2017 13:11:54 GMT+02:00, Johannes Radinger <
johannesradin...@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

Markus M
>
> Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-27 Thread Moritz Lennert

On 27/09/17 21:03, Markus Metz wrote:



On Wed, Sep 27, 2017 at 4:07 PM, Moritz Lennert 
> wrote:

 >
 >
 >
 > Le 27 septembre 2017 13:11:54 GMT+02:00, Johannes Radinger 
> 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 ?


Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-27 Thread Markus Metz
On Wed, Sep 27, 2017 at 4:07 PM, Moritz Lennert <
mlenn...@club.worldonline.be> wrote:
>
>
>
> Le 27 septembre 2017 13:11:54 GMT+02:00, Johannes Radinger <
johannesradin...@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.

Markus M

>
> Moritz
>
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-27 Thread Stefan Blumentrath
Sorry, there is: https://grass.osgeo.org/grass72/manuals/v.net.allpairs.html

From: grass-user [mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of 
Johannes Radinger
Sent: onsdag 27. september 2017 13.12
To: GRASS user list <grass-user@lists.osgeo.org>
Subject: [GRASS-user] Extract subnet from grass vector network based on 
selected nodes

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?

Cheers,
Johannes
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-27 Thread Markus Metz
On Wed, Sep 27, 2017 at 1:11 PM, Johannes Radinger <
johannesradin...@gmail.com> wrote:
>
> 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?

You could try v.net.steiner. A Steiner tree is probably overkill for a
river network, but it should work.

Markus M
>
> Cheers,
> Johannes
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-27 Thread Moritz Lennert


Le 27 septembre 2017 13:11:54 GMT+02:00, Johannes Radinger 
 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 ?

Moritz


___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-27 Thread Stefan Blumentrath
Hei Johannnes,

Maybe looping over the different possible combinations of nodes using 
https://grass.osgeo.org/grass72/manuals/v.net.path.html does the job?

Cheers
Stefan

From: grass-user [mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of 
Johannes Radinger
Sent: onsdag 27. september 2017 13.12
To: GRASS user list <grass-user@lists.osgeo.org>
Subject: [GRASS-user] Extract subnet from grass vector network based on 
selected nodes

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?

Cheers,
Johannes
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

[GRASS-user] Extract subnet from grass vector network based on selected nodes

2017-09-27 Thread Johannes Radinger
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?

Cheers,
Johannes
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user