powered by
Generate a raster layer from coordinates which can be used in window_gd as the RasterLayer to move the window across
coords_to_raster( coords, buffer = 0, res = 1, agg = NULL, disagg = NULL, plot = FALSE )
RasterLayer
coordinates of samples as sf points, a SpatVector, a two-column matrix, or a data.frame with x and y coordinates
size of buffer to add to edge of raster (defaults to 0)
desired resolution of raster (defaults to 1). Can be a single value for square cells or a vector with two values representing x and y resolutions
aggregation factor to apply to raster (defaults to NULL)
disaggregation factor to apply to raster (defaults to NULL)
whether to plot resulting raster with coords (defaults to FALSE)
load_mini_ex() coords_to_raster(mini_coords, buffer = 1, plot = TRUE)
Run the code above in your browser using DataLab