<div dir="ltr"><div><div><br><br>On Fri, Feb 10, 2017 at 5:44 PM, Uwe Fischer <<a href="mailto:gisfisch@t-online.de">gisfisch@t-online.de</a>> wrote:<br>><br>> Hello list,<br>><br>> I have a question about dealing with duplicate polygons (dp) coming into GRASS from a polygon shapefile. The polygons are not overlapping or having gaps, but there are a number of real duplicate ones (polygons show parcels with owners, and if one parcel has two or more owners, e. g. wife and husband, this situation in the shapefile is represented by two identical polys with two database rows that only differ in the owners name).<br>><br>> My goal is to get rid of duplicates, having a result with only one polygon/centroid at a given location with only one owner name. The name does not matter, it can be chosen arbitrary by the system. This works fine when using ESRI "clean"-command. The structure of the database table is maintained while one (or many) of the dp is/are lost, leaving only one valid polygon.<br>><br>> Now, I found an older thread called "unable to get rid of duplicate polygons". Obviously, the problem/question is the same but I could not find a solution for GRASS there.<br><br></div>There is no tool in GRASS that automatically removes all but one category values from a feature. You would need to use the vector digitizer or v.edit.<br><br></div>Alternatively, you could create a copy of the vector, remove all categories from layer 1 and 2 with<br>v.category type=centroid option=del cat=-1 layer=1<br>and<br><div><div>v.category type=centroid option=del cat=-1 layer=2<br><br>Then assign new categories with<br>v.category type=centroid option=add cat=1 layer=1<br><br></div><div>Finally try v.distance from=<cleaned vector> to=<original vector> from_type=centroid from_layer=1 to_type=centroid to_layer=1 upload=to_attr to_column=<column with owner name> column=<name of new column to be populated><br></div><div><br>Markus M<br><br>> So I tried:<br>><br>> v.clean -c input=input@mapset output=output_clean tool=snap,rmdac,bpol threshold=0.01,0,0<br>><br>> and<br>><br>> v.clean -c input=input@mapset output=output_clean  tool=break,snap,rmdupl,rmdac,bpol<br>><br>> Nothing did work. I get a map with tree layers, one showing the islands only (layer 0), one showing the complete polygon set with duplicates (1), and one showing only the duplicates (2). I also tried to delete layer 2, assuming that this might remove the dp, but it only messed up the dataset.<br>><br>>  <br>><br>> What am I doing wrong?<br>><br>>  <br>><br>> Regards, Uwe<br>><br>>  <br>><br>><br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br><br></div></div></div>