[GRASS-user] obtain node sequence from v.net.salesman

Moritz Lennert mlennert at club.worldonline.be
Mon Apr 30 05:34:12 EDT 2012


On 30/04/12 11:30, Moritz Lennert wrote:
> On 30/04/12 11:10, Gavin Fleming wrote:
>> Here's my route - it's easy enough to see the nodes but how to extract
>> them in the order they need to be visited?
>>
>> v.select just selects them, but not in route order.
>
> There's currently no official way of getting the node ids in order.
> However, there is a workaround that allows you to get that info using
> debug output:
>
>
> [using the NC demo data]
>
> v.net in=streets_wake points=schools_wake out=streets_with_schools
> operation=connect thresh=50
> g.gisenv set=DEBUG=2
> v.net.salesman in=streets_with_schools out=salesroute ccats=1-999


Sorry, above is not totally correct: you actually do not need to set the 
DEBUG variable, just setting the verbose flag is enough:

v.net in=streets_wake points=schools_wake out=streets_with_schools
operation=connect thresh=50
v.net.salesman in=streets_with_schools out=salesroute ccats=1-999 --v

But still, this should probably be upgraded from a hidden feature to a 
real option.

Moritz




More information about the grass-user mailing list