[GRASS-user] Unable to get rid of duplicate polygons

Markus Metz markus.metz.giswork at googlemail.com
Mon Apr 2 04:31:16 EDT 2012


On Sun, Apr 1, 2012 at 11:45 PM, David J. Bakeman <dbakeman at comcast.net> wrote:
> David J. Bakeman wrote:
>>
>> Markus Neteler wrote:
>>>
>>> On Sun, Apr 1, 2012 at 9:45 PM, David J. Bakeman<dbakeman at comcast.net>
>>>  wrote:
>>>>
>>>> I didn't find an answer in the archives so.
>>>>
>>>> I have a shapefile of polygons and some of the polygons are duplicated.
>>>>  I
>>>> thought I could use v.clean tool=rmdupl to get rid of these polygons.  I
>>>> use
>>>> v.in.ogr to read it in and I get the following:
>>>>
>>>> WARNING: 8 areas represent more (overlapping) features, because polygons
>>>>          overlap in input layer(s). Such areas are linked to more than 1
>>>>          row in attribute table. The number of features for those areas
>>>> is
>>>>          stored as category in layer 2
>>>>
>>>> That is correct in that there are 8 duplicate polygons but the only
>>>> different attribute is the cat which grass added?  What am I missing?  I
>>>> then tried v.clean tool=bpol,rmdupl and nothing changes it still has the
>>>> 8
>>>> duplicates.  What am I doing wrong?
>>>
>>> I think that you need to add the break tool for v.clean.
>>
>> Correct that was actually what I was using:  v.clean tool=break,rmdupl
>>
>> Looking closer I see that when I run v.clean it doesn't even report the
>> duplicates that v.in.ogr did but they are still there.  The only thing that
>> differs in coordinates or attributes is the cat attribute that grass added.
>>>>
>>>> I am using grass 6.3.0 on fedora core 14 linux.
>>>
>>> Please note that you can upgrade to grass-6.4.0-4.fc14:
>>> http://koji.fedoraproject.org/koji/buildinfo?buildID=263115
>>
>> Thanks I'll see if I can upgrade.
>
> I upgraded to the 6.4.0 and the results are exactly the same.  The polygons
> really are identical in every respect except for they have different values
> in the cat column.  Is there some other grass tool for removing this kind of
> duplicate?

After import with v.in.ogr, there are no duplicate geometries left in
the vector. What you have now is some areas with two categories
assigned to them. Removing the duplicates means in this case removing
one of the two categories, for example with one of the vector
digitizers.

Markus M


More information about the grass-user mailing list