<div dir="ltr">[adding grass-user back] <div><br></div><div>Please, always keep the list when responding</div><div><br></div><div>I'm not sure I understand what you mean, but you can see what 2 or n categories an overlapping polygon has by displaying categories and centroids from layer 2 in d.vect. Layer 2 is usually where GRASS will store these topology errors after import. </div><div><br></div><div><img src="cid:ii_kzyg78pm1" alt="image.png" width="545" height="271"><br></div><div><br></div><div><img src="cid:ii_kzyg5nds0" alt="image.png" width="545" height="332"><br></div><div>HTH,</div><div>Vero</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mar, 22 feb 2022 a las 14:56, 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">Hi Veronica,<div>My understanding (I am not advanced user) that -c will also prevent any other cleaning of polygons imported from shapefile. </div><div>There are some small errors in the data that are corrected by v.in.ogr. These are the overlaps well above the "snap" threshold I use to import data.</div><div><br></div><div>(I may be completely wrong here and would love to correct my understanding).</div><div>I think that the two overlapping polygons are represented in Grass GIS using a single area with the unique centroid (and multiple category ids).</div><div>I was hoping that grass has a way of associating  and exposing to user a unique "centroid id" for each centroid (So I know that two overlapping parts are from same area).</div><div>thanks,</div><div>Hemant Bist.</div><div><br></div><div>  </div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 21, 2022 at 4:27 AM Veronica Andreo <<a href="mailto:veroandreo@gmail.com" target="_blank">veroandreo@gmail.com</a>> wrote:<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"><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" target="_blank">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>
</blockquote></div>
</blockquote></div>