st_xy2sfc: replace x y raster dimensions with simple feature geometry list (points, or polygons = rasterize) and vice versa
Description
replace x y raster dimensions with simple feature geometry list (points, or polygons = rasterize) and vice versa
Usage
st_xy2sfc(x, as_points, ..., na.rm = TRUE)
st_sfc2xy(x, ...)
Value
`st_xy2sfc` returns an object of class stars with x and y raster dimensions replaced by a single sfc geometry list column containing either points, or polygons. Adjacent cells with identical values are not merged; see st_rasterize for this.
`st_sfc2xy` returns an object of class stars with a POINT list replaced by X and Y raster dimensions. This only works when the points are distributed over a regular or rectilinear grid.
Arguments
x
object of class stars, or of class sf
as_points
logical; if TRUE, generate points at cell centers, else generate polygons
...
for `st_xy2sfc`: arguments passed on to st_as_sfc, for `st_sfc2xy` arguments passed on to st_as_stars.data.frame
na.rm
logical; omit (remove) cells which are entirely missing valued (across other dimensions)?
Details
`st_xy2sfc` replaces x y raster dimensions with simple feature geometry list (points, or polygons = rasterize)
`st_sfc2xy` replaces POINT simple feature geometry list with an x y raster