I have spatial data (about some glaciers) as an sf-object. My shp-file can be downloaded here: https://drive.google.com/open?id=1ERFdsqDGLH1a_FbxwawE_gPm0Au0Q9vT
Some of the glaciers are separated into different polygons. In the end, I want to resolve the inner boundaries and delete all polygons who are smaller than a certain cutoff (lets say 0,05km²).
So far I managed to merge adjacent polygons using
glaciers <- readOGR("C:/***", "Glacier_Clip_Polygon") glaciers_sf <- st_as_sf(glaciers) glaciers_combined <- st_union(glaciers_sf)
Merging them results in a Multipolygon with all inner boundaries resolved. So far so good. It now looks like this:
> glaciers_comb Geometry set for 1 feature geometry type: MULTIPOLYGON dimension: XY bbox: xmin: 81.38991 ymin: 42.47015 xmax: 81.54986 ymax: 42.57237 epsg (SRID): 4326 proj4string: +proj=longlat +datum=WGS84 +no_defs MULTIPOLYGON (((81.46754 42.47274, 81.46791 42....
But now I don't know how to address the polygons separately or how to delete the ones with an area smaller than my cutoff. Can anyone help me?