[GRASS-user] Unexpected result with v.net op=connect. No attributes on new lines.

Moritz Lennert mlennert at club.worldonline.be
Fri Dec 18 06:05:05 PST 2015

On 18/12/15 12:59, Lluís Vicens wrote:
> Hi all,
> I'm doing some basic exercises based on v.net on GRASS GIS but I'm
> getting some unexpected results (according to my knowledge and my
> understanding of the v.net manual). When I execute the following command:
> v.net input=streets_clean points=libraries output=network
> operation=connect threshold=50
> I get unsatisfactory results according to the v.net manual: "While the
> arcs created with v.net will retain any attribute information associated
> with the input vector line/boundary file in data layer 1, nodes created
> and stored in data layer 2 will not have any associated attribute
> information."
> The problem is that the new created lines connecting the points
> (libraries) to the existing network (streets_clean) doesn't retain
> neither show any kind of attributes.

They do not have any attributes as they are new lines. Cf the 
explanation below

> There is a new geometry with no
> attributes associated. As far as I remember, older GRASS GIS versions
> (6.4.x) worked well on this issue.

Older GRASS versions just assumed that these lines should have the same 
category (identifier) as the first line touched, and so they were linked 
to the same attributes at these lines. Now, v.net creates new categories 
for these connecting lines which seems the more correct solution to me.

> Any hints?

The easiest solution, and in my eyes this should be the default [1], is 
to use the '-s' flag of v.net which snaps the points to the lines. In 
cases where points are buildings and lines are roads this makes more 
sense as dimensionless points are just an abstract representation of 
buildings and you will not build a road from the existing streets 
through the entry door of the building towards its center ;-)


[1] https://trac.osgeo.org/grass/ticket/2780

> My GRASS GIS version on gnu/linux:
> /version=7.0.1//
> //date=2015//
> //revision=00000//
> //build_date=2015-08-06//
> //build_platform=x86_64-unknown-linux-gnu/
> I've already tested a Windows version with the same results
> /version=7.0.2
> date=2015
> revision=66861
> build_date=2015-11-19
> build_platform=i686-pc-mingw32
> /
> --
> *Lluís Vicens*
> Servei de Sistemes d'Informació Geogràfica
> -
> Universitat de Girona
> -
> Pl. Ferrater Mora 1
> 17071 Girona
> Tel +34 972 418 039 (7025 intern)
> lluis at sigte.udg.edu <mailto:lluis at sigte.udg.edu>
> http://www.sigte.udg.edu
> Twitter http://twitter.com/SIGTE_UDG
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user

More information about the grass-user mailing list