[GRASS-dev] [grass-code I][342] v.clean tool=snap: doubled vertices
in the output
grass-codei at wald.intevation.org
grass-codei at wald.intevation.org
Sun Mar 25 07:48:21 EDT 2007
code I item #342, was opened at 2007-03-25 13:48
Status: Open
Priority: 3
Submitted By: Maciej Sieczka (msieczka)
Assigned to: Nobody (None)
Summary: v.clean tool=snap: doubled vertices in the output
Issue type: module bug
Issue status: None
GRASS version: CVS HEAD
GRASS component: vector
Operating system: all
Operating system version:
GRASS CVS checkout date, if applies (YYMMDD): 070325
Initial Comment:
As the title reads. To reproduce, do the following:
1. Import an example line:
$ echo "L 17 1
592300.58091286 4921395.5186722
592717.09543568 4921990.53941909
593252.61410788 4920889.75103734
594026.14107884 4921812.03319502
594323.65145228 4920889.75103734
594888.92116183 4921752.53112033
595305.43568465 4920889.75103734
595989.70954357 4921484.77178423
596376.47302905 4920830.24896266
596971.49377593 4921514.52282158
597566.51452282 4920740.99585062
598102.03319502 4921306.26556017
598637.55186722 4920592.2406639
599351.57676349 4921187.26141079
599797.84232365 4920562.48962656
600273.85892116 4920979.00414938
600690.37344398 4920651.74273859
1 1" | v.in.ascii -n out=zigzag format=standard
2. Snap each second vertex:
$ v.clean input=zigzag output=zigzag_snap type=line tool=snap thresh=1200
3. See the doubled vertices:
$ v.out.ascii zigzag_snap format=standard | awk 'NR>10'
L 17 1
592300.58091286 4921395.5186722
592300.58091286 4921395.5186722
592300.58091286 4921395.5186722
594026.14107884 4921812.03319502
595305.43568465 4920889.75103734
595305.43568465 4920889.75103734
595305.43568465 4920889.75103734
596971.49377593 4921514.52282158
596971.49377593 4921514.52282158
596971.49377593 4921514.52282158
598637.55186722 4920592.2406639
598637.55186722 4920592.2406639
598637.55186722 4920592.2406639
600273.85892116 4920979.00414938
600273.85892116 4920979.00414938
600273.85892116 4920979.00414938
600273.85892116 4920979.00414938
1 1
There was a similar bug in v.build.polylines [1], fixed in 6.3 CVS by Martin Landa [2] recently.
Workaurond (same as for RT #4249 v.build.polylines bug): run 'v.clean tool=prune thresh=0' on the v.clean tool=snap output. It will remove the bogus doubled vertices.
Maciek
[1]https://intevation.de/rt/webrt?serial_num=4249
[2]http://grass.itc.it/pipermail/grass-commit/2007-February/027003.html
----------------------------------------------------------------------
You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=204&aid=342&group_id=21
More information about the grass-dev
mailing list