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

The last line of the output should look like this, giving you the category values of the nodes in route order:

Nodes' categories (layer 2, 994 nodes):
42,41,164,38,126,15,52,84,16,55,17,157,60,6,61,8,1,76,72,46,47,68,24,25,26,28

It should be fairly easy to add an option to v.net.salesman to output this information. Please file a wish in the bug tracker, also explaining which output format would be most suitable.

Moritz





On 30/04/2012 10:21, Moritz Lennert wrote:
On 28/04/12 10:22, Gavin Fleming wrote:
Hi all

I've run v.net.salesman, which generates a nice route, but what I really
need is the sequence of nodes that the solution visits, in the correct
order. How can I obtain that from v.net.salesman outputs?

How about v.select ain=nodes bin=route ?

Moritz

--
regards

Gavin

Gavin Fleming
http://afrispatial.co.za
t: 0218620670
c: 0845965680
f: 0866164820



_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to