I am trying to find a tool in the Grass/Saga toolbox which is equivalent to http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/boundary-clean.htm
1 Answer
While not equivalent in method (and, thus, will not generate the exact same result), GDAL Sieve does something similar in spirit - that is, it generalizes the raster values, grouping values of smaller significance with values of higher.
How it does that is by setting a threshold (user input) of minimal significant area. Say, 5 pixels. Any group of pixels smaller than that threshold will be assigned the values of the largest group that touches it:
0 0 0 0 1 1 1 0 0 0 0 1 1 1
0 0 2 2 2 1 1 0 0 1 1 1 1 1
0 0 2 1 1 1 1 -----\ 0 0 1 1 1 1 1
0 0 0 1 1 1 4 -----/ 0 0 0 1 1 1 4
3 3 0 1 1 4 4 0 0 0 1 1 4 4
3 3 0 1 1 4 4 0 0 0 1 1 4 4
In the above example, the 2 group was smaller than 5px, so it was assigned to the largest neighbourhood group, which was the 1 group. The 3 group was also smaller than 5px, and it was assigned to the 0 group, which was the only one in its neighbourhood. The 4 group was within the threshold, and thus remained unchanged.
ArcGIS' Boundary Clean does this automatically, without needing to set a threshold yourself (all you input is if you want one pass or two), but the results should be similar.
If you want to test it, you can access the method in QGIS going to Raster -> Analysis -> Sieve.