replace x y raster dimensions with simple feature geometry list (points or polygons)
st_xy2sfc(x, as_points = st_dimensions(x)$x$point, ...)
object of class stars
logical; if TRUE
, generate points at cell centers, else generate polygons
arguments passed on to st_as_sfc
object of class stars
with x and y raster dimensions replace by sfc geometry list