[GRASS-dev] spanning tree and steiner tree problems?

Moritz Lennert mlennert at club.worldonline.be
Mon Oct 8 08:53:39 PDT 2012


On 07/10/12 08:27, Michael Barton wrote:
> Hi Moritz,
>
> Thanks to your help, I now have been able to run through a number of the
> vector network operations. Two that don't seem to work are v.net.steiner
> and v.net.spanningtree. But perhaps I am not doing it right.
>
> Here is the setup using Highschools from the schools_wake vector and
> streets_wake in the sc_08 demo data set.
>
> First I connect highschools (previously extracted from schools_wake)
> with the streets.
>
> v.net <http://v.net> --overwrite input=streets_wake at grass7vect_sqlite
> points=highschools at spatialtech2012 output=hs_net operation=connect
> alayer=1 nlayer=2 thresh=200


Are you sure there are highschools connected to the network (is this the 
schools_wake layer) ?


> When I run v.net.stiener, it gives no error but doesn't create anything
> either. Here is the command:
>
> v.net.steiner input=hs_net at spatialtech2012 output=hs_steiner type=line
> alayer=1 nlayer=2
> tcats=4,7,11,12,37,49,50,65,67,69,77,83,91,101,103,115,117,138,153,158,164,165

When I try to do this on the entire streets_wake network, my machine 
immediately goes into disk swap and I don't have the time to wait and 
see if and when it finishes. However, when I cut out a small part of the 
network, it works as expected.

>
> When I run v.net.spanningtree, I do get results, but it is a complex
> street network that is almost the same as the original street network.
> Here is the command I am using:
>
> v.net.spanningtree --overwrite input=hs_net at spatialtech2012
> output=hs_spanningtree alayer=1 nlayer=2

See the attached image for results I get with the streets_wake layer. In 
black the original layer and in green the spanning tree. As you can see 
it seems to have worked.

It seems that this module ignores any nodes you might have on layer 2 
and just happily finds the minimum spanning tree of the entire network, 
using the intersections as nodes. I'm no expert on spanning trees and 
cannot say whether this is expected behavior or a bug.

Moritz


-------------- next part --------------
A non-text attachment was scrubbed...
Name: spanning.png
Type: image/png
Size: 52317 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20121008/c740033d/attachment-0001.png>


More information about the grass-dev mailing list