Solution below worked for a small subset with a filesize <<1 gb, for larger file sizes another solution would be needed
I'm trying to formulate an expression which extracts specific parts/geometries from a dataset.
The background is my work on quick clay zones; I have produced discharge areas (U) based on previously mapped release areas (L). Followed by cutting off areas over a certain threshold (average height of the release area). Now I am stuck with several split discharge areas, where I want to extract only the discharge areas directly connected to their respective release area.
I have many overlapping areas, so extracting by location doesn't yield a good result, since it also extracts discharge areas which overlap with other release areas.
Basically, I want to filter areas which overlap and have the same
"ID", I can't really iterate over the layer since I have more than 10'000 features, and don't want to end up with the same amount of shapefiles.
For easier understanding (process from top to bottom):