I have drainage catchments that sit within each other (i.e. a primary, secondary and major catchment area, nested). At the moment, if I was to click info in the red area in the example below, it would return three results (red, green, blue). In the green area I'd get two results (blue, green) and in the blue, just one result (blue). I'd like these separated out, so that the smallest (red) retains its shape, the next largest (green) is clipped to the smallest (red) and the largest (blue) is clipped to the green. Ultimately, I just need one answer in each polygon area.
Let's assume there is a polygon layer called 'overlaps' with its attribute table, see image below.
Step 1. Perform an intersection by means of the SAGA's "Polygon Self-Intersection" geoalgorithm
Step 2. Make use of the "Extract by expression" geoalgorithm with this expression:
regexp_match("ID",'\\|') or not is_empty_or_null($geometry)
and get the output
Additionally, the application of the "Join attributes by location" geoalgorithm can be relevant to get the initial attributes back.