[GRASS-user] network analysis: cost columns and v.net.alloc problem

Moritz Lennert mlennert at club.worldonline.be
Wed Jul 1 12:04:27 EDT 2009

On 01/07/09 11:03, Ricardo Filipe Soares Garcia da wrote:
> Hello list
> I have a problem with the setting up of a vector map for network analysis:
> - I have two cost columns associated with the cost of traveling on
> each direction of arcs (so the afcol and abcol).
> - It happens that on some arcs (representing streets) sometimes it is
> not allowed to travel in one direction, and in that case the cost is
> set to -1
> - Now I have a set of points that I can connect to the network and
> then I want to calculate sub-nets for each point (using v.net.alloc)
> - When I connect the points to the network (using v.net), new lines
> get created to expand the network and link it with the points
> - These new lines get created and are assigned the cat of the main
> line from which they got extruded
> - The problem is: it happens that the cost associated with the main
> arc gets assigned also to this new line that connects the point to the
> network. This is due to the fact that both lines share the same cat
> (the key to the attribute table)
> - So if the main line had a cost of -1 assigned to one of the travel
> directions it means the new line will also have this same cost. This
> will make it impossible to travel (to or from, according to the
> affected column) to the point in the end of this line. This fact will
> cause the v.net.alloc algorithm to not assign a subnet to this point,
> since it is in fact inaccessible.

I would consider this as a bug, or at least a not very well-implemented 
feature. So please post a bug report about this.

> - Since both the main arc (the one belonging to the actual street) and
> the sub-arc (the one that just connects the point to the network)
> share the same cat, and thus the same entry in the attributes table,
> how can I fix the costs on the sub-arc without affecting the main one?
> - The only way I managed to uniquely reference these sub-arcs was with
> their internal ID (which I can see when I interactively query the
> vector's properties), but I can't seem to do much with it

You can collect all the ids and then use v.edit with the catdel and 
catadd tools and the ids parameter. Or you can change category values in 
the digitizer.


More information about the grass-user mailing list