Dear GRASS users :
I want to search shortest path on vector data.
I'm trying to use v.net.path command in GRASS5.7.
But I cannot understand data input format for v.net.path.
I read manual of v.net.path.
But, what I could understand options is only input and output.
What I want to know is ,
How do I set start and end node ? .
In short, I want to know input format of v.net.path for seach shortest path.
Please tell me example of usage.
Please give me your suggestion.
Thank you in advance.
Sincerely yours.
----
Hayashi Shin-ichiro
mail:forest@bres.tsukuba.ac.jp URL:http://ryuiki.agbi.tsukuba.ac.jp/~forest
Watershed Management Lab., University of TSUKUBA
On Wednesday 10 December 2003 08:29, Hayashi Shin-ichiro wrote:
Dear GRASS users :
I want to search shortest path on vector data.
I'm trying to use v.net.path command in GRASS5.7.
But I cannot understand data input format for v.net.path.
I read manual of v.net.path.
But, what I could understand options is only input and output.
What I want to know is ,
How do I set start and end node ? .
In short, I want to know input format of v.net.path for seach shortest
path. Please tell me example of usage.
Please give me your suggestion.
Thank you in advance.
Sincerely yours.
Nodes on the network are identified by category number of points
placed exactly on network nodes (ends of lines). If you have lines
only in you vector, you can add new points by v.net and assign categories
to points by v.category field=2. Then use these categories as input for v.net:
echo "1 5" | v.net.path
Radim
Dear GRASS users:
Thank you very much for your advise, Radim.
I tried
$ v.net input=walk output=walk_ca
1)My question
1. does v.net give category for all arc and node?
2. Is category number which 1 is arc and 2 is node?
I executed v.net.path. Command worked but didn't make any shortest path.
$ echo "1 5" |v.net.path input=walk_ca output=walkpath
Error messege
WARNING: 54667 points without category.
WARNING: No point with category 1
WARNING: No point with category 5
And I tried
$ v.category in=walk out=walk_ca option=add
I have same question.
1. does v.category give category for all arc and node?
2. Is category number which 1 is arc and 2 is node?
Then I executed v.net.path. Command worked but didn't make any shortest path.
GRASS gives me same error messege.
I execute d.what.rast. But command tell me only infomation about arc.
2)My question
What way can I get infomation about node?
My big question is
What way can I give category number for node?
Please give me your suggestion.
Thank you in advance.
Sincerely yours.
Nodes on the network are identified by category number of points
placed exactly on network nodes (ends of lines). If you have lines
only in you vector, you can add new points by v.net and assign categories
to points by v.category field=2. Then use these categories as input for v.net:
echo "1 5" | v.net.path
Radim
----
Hayashi Shin-ichiro
mail:forest@bres.tsukuba.ac.jp URL:http://ryuiki.agbi.tsukuba.ac.jp/~forest
Watershed Management Lab., University of TSUKUBA
On Wednesday 10 December 2003 16:39, Hayashi Shin-ichiro wrote:
Dear GRASS users:
Thank you very much for your advise, Radim.
I tried
$ v.net input=walk output=walk_ca
1)My question
1. does v.net give category for all arc and node?
2. Is category number which 1 is arc and 2 is node?
I executed v.net.path. Command worked but didn't make any shortest path.
$ echo "1 5" |v.net.path input=walk_ca output=walkpath
Error messege
WARNING: 54667 points without category.
WARNING: No point with category 1
WARNING: No point with category 5
And I tried
$ v.category in=walk out=walk_ca option=add
But I had written v.category field=2, so try
v.category in=walk out=walk_ca option=add field=2
echo "1 5" | v.net.path input=walk_ca output=walkpath
Node numbers may be in from <1,54667>, for example
echo "123 45678" | v.net.path input=walk_ca output=walkpath
Note that, you can make more SP at the same time
echo -e "1 2\n3 4" | v.net.path input=walk_ca output=walkpath
I have same question.
1. does v.category give category for all arc and node?
2. Is category number which 1 is arc and 2 is node?
Then I executed v.net.path. Command worked but didn't make any shortest
path. GRASS gives me same error messege.
I execute d.what.rast. But command tell me only infomation about arc.
2)My question
What way can I get infomation about node?
My big question is
What way can I give category number for node?
Please give me your suggestion.
Thank you in advance.
Sincerely yours.
Try to play a bit with 'type' and 'field' options for v.category and d.what.vect
to get idea.
Radim
>Nodes on the network are identified by category number of points
>placed exactly on network nodes (ends of lines). If you have lines
>only in you vector, you can add new points by v.net and assign categories
>to points by v.category field=2. Then use these categories as input for
> v.net: echo "1 5" | v.net.path
Dear GRASS USERS:
I'm successful to make shortest path vector data.
There are this way as follows.
1.I executed v.net. v.net give nodes point attribute.
v.net input=walk output=walk_cat nfield=2 operation=nodes
2.Next I executed v.category. v.category gave point category number.
v.category in=walk_cat out=walk_cate option=add field=2 type=point
3.I executed v.net.path. It worked.
echo "7112 8369" |v.net.path input=walk_cate output=walk_path
Thank you for your advise heartily, Radim.
I'm very happy!
On Wednesday 10 December 2003 16:39, Hayashi Shin-ichiro wrote:
Dear GRASS users:
Thank you very much for your advise, Radim.
I tried
$ v.net input=walk output=walk_ca
1)My question
1. does v.net give category for all arc and node?
2. Is category number which 1 is arc and 2 is node?
I executed v.net.path. Command worked but didn't make any shortest path.
$ echo "1 5" |v.net.path input=walk_ca output=walkpath
Error messege
WARNING: 54667 points without category.
WARNING: No point with category 1
WARNING: No point with category 5
And I tried
$ v.category in=walk out=walk_ca option=add
But I had written v.category field=2, so try
v.category in=walk out=walk_ca option=add field=2
echo "1 5" | v.net.path input=walk_ca output=walkpath
Node numbers may be in from <1,54667>, for example
echo "123 45678" | v.net.path input=walk_ca output=walkpath
Note that, you can make more SP at the same time
echo -e "1 2\n3 4" | v.net.path input=walk_ca output=walkpath
I have same question.
1. does v.category give category for all arc and node?
2. Is category number which 1 is arc and 2 is node?
Then I executed v.net.path. Command worked but didn't make any shortest
path. GRASS gives me same error messege.
I execute d.what.rast. But command tell me only infomation about arc.
2)My question
What way can I get infomation about node?
My big question is
What way can I give category number for node?
Please give me your suggestion.
Thank you in advance.
Sincerely yours.
Try to play a bit with 'type' and 'field' options for v.category and d.what.vect
to get idea.
Radim
>Nodes on the network are identified by category number of points
>placed exactly on network nodes (ends of lines). If you have lines
>only in you vector, you can add new points by v.net and assign categories
>to points by v.category field=2. Then use these categories as input for
> v.net: echo "1 5" | v.net.path
----
Hayashi Shin-ichiro
mail:forest@bres.tsukuba.ac.jp URL:http://ryuiki.agbi.tsukuba.ac.jp/~forest
Watershed Management Lab., University of TSUKUBA