As usual I am tinkering with ways of automatically identifying islands on vector maps and in DEMs. Currently I am mostly working on DEMs and actually have a solution for my problem, although in practice it doesn't exactly work.
Exemplary I am using a clip from the EU-DEM (Image 1) of an water rich area north of Berlin.
As one can see, there are some islands in the lakes, which should be easily identifiable due to their topographic/geomorphological properties, so I am using r.geomorphon to identify the geomorphological forms in the DEM (Image 2). The lake areas (which are plains in these SRTM data) are marked in grey, the islands appear as slopes, shoulders, ridges and peaks.
Now all I need to do is to identify all flats, find "rings" within them and identify the geomorpholocial forms in these rings. As a first step, I vectorize the output of r.geomorphon using GDAL Polygonize (Image 3).
The next logical step would be to select the plains and use e.g. the QGIS tool Difference to create polygons within the rings of these plains. Unfortunately this step does not work, because there are to many topological errors in the vectorized layer. Difference throws the following error message: "Feature (82) has invalid geometry. Please fix the geometry or change the Processing setting to the "Ignore invalid input features" option. Execution failed after 0.53 seconds". It appears, that the raster output of r.geomorphon creates a lot of single cells on the edges of larger features, which can not be vectorized properly (Image 4).
I tried several tools to clean the topological errors (e.g. v.clean), but I did not find one that works. I certainly could remove all the errors by hand, but that would be rather pointless since I could also spend the same time to identify and vectorize the islands by hand. I thought about smoothing the original DEM, but I am afraid I going to lose the islands if I do that.
I would appreciate ideas and thoughts on that procedure.