[GRASS-user] importing and cleaning overlapping polygons that are supposed to overlap
veroandreo at gmail.com
Tue May 14 14:46:42 PDT 2019
I was working today with a very simple vector map which corresponds to
clusters (circular polygons) that overlap and it is just fine that they
overlap. So, i received a shapefile with 3 of these clusters. Two of them
overlaped. When I import them into GRASS with v.import I get an extra
centroid and area where 2 of the polygons overlap.
Problem arises when I want to query a raster map with those polygons since
originally the attribute table contained only 3 polygons (which is just
fine). However, v.what.rast will only upload values for 2 of those three
polygons because it finds 2 centroids with the same category, AFAIU.
I tried with
v.clean input=clusters output=clusters_clean1 tool=break,rmdupl,rmsa,rmdac
v.clean input=clusters type=centroid output=clusters_clean2 tool=rmdupl
but nothing seemed to do the kind of cleaning I wanted. I ended up using
brute force and removing the extra centroid manually in the GUI. That
helped with v.what.rast (all cats in the attr table were updated) but part
of the original and correct geometry was clearly gone. I am sure that's not
the right combination nor the right way either.
In the wiki , I only found this piece of text: "If the *input polygons
have logical errors*.... You can investigate overlapping areas in the
imported vector with 'd.vect
<https://grass.osgeo.org/grass76/manuals/d.vect.html> yourmap type=area
layer=2' (only overlapping areas have a category in layer 2 after import).
Additionally you may show the centroids of layer=2 to easier find tiny
overlapping areas with 'd.vect
<https://grass.osgeo.org/grass76/manuals/d.vect.html> yourmap type=centroid
However, it says nothing about how to proceed further as to keep correctly
overlapping polygons, each with its own centroid and remove the duplicated
ones that are generated when importing.
Can someone please share the set of steps that should be followed in these
cases? Maybe it's a silly question, but I'm more a raster person so I am
very easily lost with vector issues.
Thanks much in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user