[GRASS-user] Loss of data using v.net

Moritz Lennert mlennert at club.worldonline.be
Wed Jan 23 12:24:04 PST 2013


On 23/01/13 20:22, דור פרידמן wrote:
> I'm trying to build a network in GRASS in order to find the shortest
> path from any settlement out of 1120 (points), to one waste treatment
> facility out of 27 (points). I plan to use v.net.distance which is
> designated to this purpose, and to define source and destination points
> using a column called "type". In that column I have assigned the
> settlements layer with the number 5 and the treatment facilities with 1.
>
> My problem occurs when I try to create the network using v.net
> <http://v.net>; If I define nodes layer (nlayer=2) to be 2, I lose all
> the points and can't find it, even by using v.extract.

What is the exact comman line for v.extract that you used ? Did you set 
layer=2 ?

What does v.category option=report give you on the file resulting from 
v.net ?

Which version of GRASS are you using ?

> Otherwise (when
> nlayer=1) the attributes describing type are being auromatically changed
> to 4, which is the type attribute for roads.

v.net certainly should not (and AFAIK does not) change attribute data. 
Actually attribute data of points connected to the network with v.net 
operation=connect is not kept. As mentioned in the man page you have to 
reconnect your points to the attribute data by hand after running v.net.

> Any one has an idea why I'm losing this crucial data and how can I
> prevent it from happening?

It would help if you could give a reproducible case description, 
including data (possibly from the NC demo dataset), so that we can see 
exactly what is going wrong where.

Moritz


More information about the grass-user mailing list