[GRASS-user] Duplicate vector removal

Martin Landa landa.martin at gmail.com
Tue Nov 20 07:03:47 EST 2007


Hi,

2007/11/20, Andre Hauptfleisch <ahaupt at gmail.com>:
> Good day,
>
> I used the v.clean approach to snap some vectors to each other. This caused
> a number of vectors to lie on the same line. The rmdupl option does not seem
> to remove these short segments.
>
> Any ideas on how I can get rid of them? Or perhaps I'm just using v.clean
> wrong. Here is the command:
>
> v.clean input=scene01 at test output=scene01_clean type=line
> tool=snap,rmdupl,rmsa thresh=15 --overwrite

rmdupl removes only *identical* features, for example

L  2 1
 594233.1875  4921026.59375
 596956.11875847 4921515.74307787
 1     1
L  2 1
 596956.11875847 4921515.74307787
 599775.5     4922022.21875
 1     2
L  2 1
 594233.1875  4921026.59375
 599775.5     4922022.21875
 1     3
L  2 1
 595793       4918172.46875
 603426.125   4919400.40625
 1     4
L  2 1
 595793       4918172.46875
 603426.125   4919400.40625
 1     5

after rmdupl

L  2 1
 594233.1875  4921026.59375
 596956.11875847 4921515.74307787
 1     1
L  2 1
 596956.11875847 4921515.74307787
 599775.5     4922022.21875
 1     2
L  2 1
 594233.1875  4921026.59375
 599775.5     4922022.21875
 1     3
L  2 2
 595793       4918172.46875
 603426.125   4919400.40625
 1     5
 1     4

First two lines 'lie' on the third one, but they are not identical, if
you want to remove them, you need to merge them first. E.g.

v.edit dupl1 tool=merge cat=1,2

remove vertex from line

v.generalize in=dupl1 out=dupl2

and then run v.clean.

The result is

L  2 3
 594233.1875  4921026.59375
 599775.5     4922022.21875
 1     1
 1     2
 1     3
L  2 2
 595793       4918172.46875
 603426.125   4919400.40625
 1     5
 1     4

Martin

> Thanks!
>
> --
> Groete,
> Andre Hauptfleisch
>
> M: 082 5722 469
> F: 086 687 1106
> E: ahaupt at gmail.com
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>


-- 
Martin Landa <landa.martin at gmail.com> * http://gama.fsv.cvut.cz/~landa *


More information about the grass-user mailing list