st_morph_close.Rd
Morphological closing for vector polygon geometry (eliminate scraps)
st_morph_close(x, radius = 0.01)
object of class sf
, sfc
or sfg
numeric or object of class units
; radius for the morphological closing operation (erosion followed by dilation). In case x
has geodetic coordinates (lon/lat) and sf_use_s2()
is TRUE
, a numeric radius
is taken as distance in meters and a units
object in radius
is converted to meters. In case x
has geodetic coordinates (lon/lat) and sf_use_s2()
is FALSE
, a numeric radius
is taken as degrees, and a units
object in radius
is converted to arc_degree
(and warnings are issued). In case x
does not have geodetic coordinates (projected) then numeric radius
is assumed to have the units of the coordinates, and a units
radius
is converted to those if st_crs(x)
is not NA
.
object of class sf
, sfc
or sfg