#2903: v.edit break bug with multiple coordinates
-----------------------+-------------------------
Reporter: robert17 | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.7
Component: Vector | Version: 7.0.3
Resolution: | Keywords:
CPU: OSX/PPC | Platform: All
-----------------------+-------------------------
Comment (by jradinger):
It seems that this issue is not yet solved?!
I just had similar problems using `v.edit tool=break`. Tested with version
7.4.1 (r72807M) and 7.5SVN (r73007M) and MacOS. Trying to break a line
vector map at multiple coordinates using `v.edit` causes that some of the
line features might not get broken (I don't know why). Then I can run
`v.edit tool=break` a second time which causes an overlay of the old line
feature with the two broken parts (so in sum three lines, that can be
identified using the gui query tool). This happens not for all
lines/coordinates; however I couldn't identify a common pattern that might
cause these errors.
Here an example with the NC dataset were I can at least reproduce the
error of getting mulitple overlayed lines when using the break tool (have
a look at the railroad line feature with the orig cat 3231):
{{{
from grass.script import core as grass
# Copy data from PERMANENT mapset
grass.run_command("g.copy",
overwrite=True,
vector="railroads@PERMANENT,railroads")
grass.run_command("v.extract",
overwrite=True,
input="firestations@PERMANENT",
cat="58,66,29,35,31,32",
output="firestations")
# Connectors to find exact break points coords
grass.run_command("v.distance",
overwrite=True,
to="railroads",
from_="firestations",
output="firestations_connectors")
firestations_connectors_coors = grass.read_command("v.to.db",
flags="p",
map="firestations_connectors",
option="end",
separator="comma").splitlines()
firestations_connectors_coors = [[",".join(x.split(",")[1:3])] for x in
firestations_connectors_coors[1:]]
# Break at point coords
grass.run_command("v.edit",
tool="break",
map="railroads",
coords=firestations_connectors_coors,
threshold=50,
layer=1,
cats="1-99999999")
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2903#comment:7>
GRASS GIS <https://grass.osgeo.org>