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

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. 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.

Any hints?

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
SIGTE

Pl. Ferrater Mora 1
17071 Girona
Tel +34 972 418 039 (7025 intern)
lluis@sigte.udg.edu

http://www.sigte.udg.edu
Twitter http://twitter.com/SIGTE_UDG

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. 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.

Any hints?

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

just tested the example from the manual [1] with:

GRASS version: 7.1.svn
GRASS SVN revision: 67197
Build date: 2015-12-17
Build platform: x86_64-w64-mingw32
GDAL: 1.11.3
PROJ.4: 4.9.2
GEOS: 3.5.0
SQLite: 3.7.17
Python: 2.7.5
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)

it works as expected, the attribute table of the lines is in the connected
node-line-vector layer. can you test it with the NC sample data set [2]?

[1] https://grass.osgeo.org/grass71/manuals/v.net.html
[2] https://grass.osgeo.org/download/sample-data/

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Unexpected-result-with-v-net-op-connect-No-attributes-on-new-lines-tp5241905p5241925.html
Sent from the Grass - Users mailing list archive at Nabble.com.

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 :wink:

Moritz

[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
*SIGTE*
-
Pl. Ferrater Mora 1
17071 Girona
Tel +34 972 418 039 (7025 intern)
lluis@sigte.udg.edu <mailto:lluis@sigte.udg.edu>

http://www.sigte.udg.edu
Twitter http://twitter.com/SIGTE_UDG

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user