I have a huge vector layer coming from an aerial image classification, containing lots of small polygons. I’m willing to clean it a bit (i.e. "removing" polygons < 25 sq. metres) but I didn’t find any tool related to a rule-based merge capable of merging adjoining polygons according to the longest shared border or biggest neighbouring area.
I already found this question, but it was solved using ArcGIS, while I'm looking for alternatives in R or QGIS.