<div dir="ltr"><div>Hello Hemant, <br></div><div><br></div><div>The discussion continued in the thread you linked (see next messages in the thread). I used the -c flag of v.in.ogr to avoid cleaning polygons when importing the shapefile as I needed the simple features to extract zonal stats from raster maps afterwards. Would that be useful to you too in this case? <br></div><div><br></div><div>Vero<br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El sáb, 19 feb 2022 a las 0:23, B H (<<a href="mailto:hemantbist@gmail.com">hemantbist@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I have data in a Shapefile which has genuine cases of overlapping geometries. (As documented in v.in.ogr) the common areas appear with multiple categories.<div>I need to find these common areas and "dedupe" them.<br><div><div>Currently I export the data out via v.out.ogr and in postgis do select distinct on (st_asbinary(geometrycomlum)) from tablename order by priorityattribute</div><div><br></div><div>Is there some way to either dedupe it in grass Gis itself, or have v.out.ogr output some common attribute in the two geometries that represent the common area<br></div><div>from two polygons.</div><div>There is a similar question in this old thread. However I could not find the solution.</div><div><a href="https://lists.osgeo.org/pipermail/grass-user/2019-May/080293.html" target="_blank">https://lists.osgeo.org/pipermail/grass-user/2019-May/080293.html</a></div><div><br></div><div><br></div><div><br></div><div><br></div><div>---</div><div>clip from v.in.ogr man page describing how the overlapping polygons are handled.</div><div><br></div><div>Overlapping polygons<br>When importing overlapping polygons, the overlapping parts will become new areas with multiple categories, one unique category for each original polygon. An original polygon will thus be converted to multiple areas with the same shared category. These multiple areas will therefore also link to the same entry in the attribute table. A single category value may thus refer to multiple non-overlapping areas which together represent the original polygon overlapping with another polygon. The original polygon can be recovered by using v.extract with the desired category value or where statement and the -d flag to dissolve common boundaries<br></div><div>Thanks,</div><div>Hemant</div><div> </div></div></div></div>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</blockquote></div>