replace x y raster dimensions with simple feature geometry list (points, or polygons = rasterize)
st_xy2sfc(x, as_points, ..., na.rm = TRUE)
object of class stars
logical; if TRUE
, generate points at cell centers, else generate polygons
arguments passed on to st_as_sfc
logical; remove cells with all missing values?
object of class stars
with x and y raster dimensions replaced by a single sfc geometry list column containing either points or square polygons