Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#2358 closed defect (wontfix)

Strange behaviour with v.net on GRASS GIS 7

Reported by: lluis Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Vector Version: svn-releasebranch70
Keywords: Ubuntu 14.04, v.net, attributes Cc:
CPU: x86-64 Platform: Linux

Description

Hi,

I'm working with GRASS GIS 7.0.0svn (r59969) on Ubuntu 14.04 LTS and I'm experiencing a strange behaviour when using v.net. I have set of nodes that I want to connect to a collection of streets on a network.

When I execute "v.net streets points=libraries out=net op=connect thresh=150" on GRASS GIS 6.4.4, the new arc(s)/line(s) that connect the points to the network, inherit all the attributes (even the 'cat' value) of the pre-existing arcs. But, when I execute the same command on GRASS GIS 7.0.0 that expected behaviour doesn't take place. The new arc(s)/line(s) generated with GRASS 7 doesn't have attributes, a new cat value is generated for each new line but they doesn't appear on the attribute table...

Attachments (1)

bug_grass.tar.gz (26.6 KB ) - added by lluis 10 years ago.
This is a set of a bigger data set (OSM data)

Download all attachments as: .zip

Change History (3)

by lluis, 10 years ago

Attachment: bug_grass.tar.gz added

This is a set of a bigger data set (OSM data)

in reply to:  description ; comment:1 by mlennert, 8 years ago

Resolution: wontfix
Status: newclosed

Replying to lluis:

Hi,

I'm working with GRASS GIS 7.0.0svn (r59969) on Ubuntu 14.04 LTS and I'm experiencing a strange behaviour when using v.net. I have set of nodes that I want to connect to a collection of streets on a network.

When I execute "v.net streets points=libraries out=net op=connect thresh=150" on GRASS GIS 6.4.4, the new arc(s)/line(s) that connect the points to the network, inherit all the attributes (even the 'cat' value) of the pre-existing arcs. But, when I execute the same command on GRASS GIS 7.0.0 that expected behaviour doesn't take place. The new arc(s)/line(s) generated with GRASS 7 doesn't have attributes, a new cat value is generated for each new line but they doesn't appear on the attribute table...

This is not a bug, but a feature, although maybe not documented enough. The previous behaviour could be considered a bug, as there is no real reason to believe that attributes of the line connected to are valid for the line created for the connection. This was, therefore, corrected two years ago in v.net. Now v.net attributes new, unique, cat values to the new arcs, but these values do not have entries in the attribute table.

The easiest way to add extra lines into the attribute table for these new arcs is to use

v.to.db map op=cat

It is then the responsibility of the user to fill in the other attribute fields for these new arcs (using v.db.update).

However, grass7 also provides the new '-s' flag which, instead of creating connection arcs, snaps the points to the closest line. In many applications this is more realistic then the connection arcs, and it has the added value that the points are then on potential paths and thus one can calculate centrality indicators for these points.

I will file an enhancement ticket that proposes to make this behaviour the default behaviour, as I believe that this will avoid many headaches for many users. In the meantime, I'm closing this bug.

in reply to:  1 comment:2 by mlennert, 8 years ago

Replying to mlennert:

I will file an enhancement ticket that proposes to make this behaviour the default behaviour, as I believe that this will avoid many headaches for many users. In the meantime, I'm closing this bug.

For the record: #2780

Note: See TracTickets for help on using tickets.