Have a binary raster. I would like to remove any 'islands' that are fully surrounded by one of the classes while leaving the 'islands' that are fully surrounded by the other.
If 1 is enveloped by 0, then reclassify to 0. If 0 is enveloped by 1, leave as one.
Essentially a select by location, but for raster. This is super easy in vector - struggling to find a solution in raster. Am I overlooking the obvious?
Platforms of choice are Arc or QGIS.