4

I have a shapefile with overlapping polygons. I need to clean these overlaps based on an attribute: in case of polygon overlap, the polygon with the lowest value of a given attribute needs to be clipped, while the polygon with the highest value of attribute remains the same. Any idea?

Ideally I'm searching for an automated solution with a plugin or a script. However my dataset is not really big (around 20 shp with about 50 features each and three different values of the attribute; no need to clear overlap between different shps), so manual work would also be ok, but which tool would be the most efficient in this case?

PS: this question could be a possible solution, but I don't have access to arcGIS.

1 Answer 1

2

QGIS 3.2

You can follow the same workflow you have linked.

(1) Union breaks the overlapping polygon into parts.

(2) Delete duplicate geometries will remove overlapping parts, while retaining only one geometry which is listed at the top on the attribute table. (Sort the attribute table by Order by expression tool beforehand).

(3) Dissolve

Only difference from the ArcGIS workflow is that you do not have to export each duplicated feature separately.

5
  • my overlaps are in one shapefile... is there a way to perform union in just one shapefile?
    – almerillat
    Oct 31, 2018 at 16:11
  • @almerillat If you mean single shapefile layer, yes, it does the job. For the details of this new union tool see Changelog QGIS 3.2.
    – Kazuhito
    Oct 31, 2018 at 16:14
  • Oh, my bad. I didn't see that your answer only works in QGIS 3.2. I'm stuck with QGIS 2.18 at work, I will try it on QGIS 3.2
    – almerillat
    Oct 31, 2018 at 16:22
  • I stumble upon the "delete duplicate geometries". How can I order the attribute table by expression? I tried a few things (sort the attribute table by a field by clicking on it or right-click and sort...) but they don't seem to work. The "delete duplicate geometries" tool deletes one of the two features seemingly randomly.
    – almerillat
    Nov 2, 2018 at 14:34
  • @almerillat Order by expression tool can be found in the Processing Toolbox | Vector general.
    – Kazuhito
    Nov 2, 2018 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.