[GRASS-user] How to detect/remove overlapping polygons (imported with v.in.ogr )based on the data attributes
Veronica Andreo
veroandreo at gmail.com
Mon Feb 21 04:27:20 PST 2022
Hello Hemant,
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?
Vero
El sáb, 19 feb 2022 a las 0:23, B H (<hemantbist at gmail.com>) escribió:
> 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.
> I need to find these common areas and "dedupe" them.
> 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
>
> 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
> from two polygons.
> There is a similar question in this old thread. However I could not find
> the solution.
> https://lists.osgeo.org/pipermail/grass-user/2019-May/080293.html
>
>
>
>
> ---
> clip from v.in.ogr man page describing how the overlapping polygons are
> handled.
>
> Overlapping polygons
> 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
> Thanks,
> Hemant
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20220221/5f96aa60/attachment.html>
More information about the grass-user
mailing list