I have a vector layer with polygons representing administrative districts of germany. For every polygon smaller than 500 km² I would like to create bigger polygons by merging each of the small polygons with all its adjacent polygons.
You can find the dataset here under vg250_01-01.utm32s.shape.ebenen\vg250_ebenen_0101\VG250_KRS.shp
In this picture you can see the dataset with my selection of the polygons smaller than 500 km² by the processing tool "selectbyexpression" with the expression "$area < 500000000".
I tried the processing tool "eliminateselectedpolygons", however, it is only able to merge with either the biggest or the smallest adjacent polygon or the one with the longest shared border. Unfortunately, I wasn't able to find a tool that does the same with all adjacent polygons. I also tried to find a solution with "selectbylocation" and "dissolve", which works fine for the isolated small polygons, but I wasn'a able to make it work with the clusters of small polygons, which will end up in one big polygon.
How can I realize this preferably with QGIS? If this isn't possible with QGIS I'm also open for suggestions with other tools, e.g. R.