[GRASSLIST:6661] Re: v.net.path cost function?
Radim Blazek
blazek at itc.it
Thu Apr 28 04:30:45 EDT 2005
Ryan D Taylor wrote:
> Hi,
>
> I'm just wondering what the v.net.path module uses to determine the
> default cost of an arc. It doesn't seem to be distance as this is the
> shortest path it gave me between 2 nodes:
>
> http://www.cs.utah.edu/~ryant/shortestpath.gif
Are you sure that there are no gaps in the network? Is it TIGER?
Try to test with d.path and v.digit if the lines are connected.
> Also, as some background information, this is what i've done to generate
> the shortest path. I started with some vector data called "slc" which
> contains real road data, then I ran a v.net to generate a vector map
> called "nodesmap" with the node data. then i did a v.category with
> "nodesmap" as the input and "categorymap" as
> the output. Finally I did a v.net.path with "categorymap" as input and
> "shortestpath" as the output--which you can see in red in the gif file.
>
> Ultimately I'm trying to determine a shortest path between two points that
> takes into account more than distance. My original vector data set
> contains columns that describe speed limits, road directions, road
> quality, etc. How could I get v.net.path to take several fields like that
> into account? Also, since I'm generating the "shortestpath" vector map
> from "categorymap" and not from my original dataset "slc", how can I
> specify to v.net.path to take into account values from "slc"?
You have to calculate costs in one column and then use afcolumn,
abcolumn, ncolumn.
Radim
> Thanks for any help you can give me. I really appreciate it.
>
> Ryan T.
>
More information about the grass-user
mailing list