#2358 closed defect (wontfix)
Strange behaviour with v.net on GRASS GIS 7
Reported by: | lluis | Owned by: | |
---|---|---|---|
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)
Change History (3)
by , 10 years ago
Attachment: | bug_grass.tar.gz added |
---|
follow-up: 2 comment:1 by , 9 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
This is a set of a bigger data set (OSM data)