I have a landmask derived from Landsat, transformed into polygons. Due to the raster origin, there are a lot of 4 line nodes (see picture), creating "holes" of unmasked area within the polygons. Picture. Black polygon/raster land area, white unmasked/no value area.
The small contained white quadrats are a problem, while the uncontained must remain unmasked/no-value. I can not use these black polygons, since (fetchR) in R then complains due to "TopologyException /.../ Ring Self-intersection". I estimate the nodes to be at least a hundred. Can anyone think of
A. a workaround, fixing these nodes automatically, e.g. by at each node connected by >2 lines create two juxtaposed nodes OR filling these areas (either as polygon/raster).
B. a quick way to identify these nodes for manual fixing.