Given a set of observations, define a estimation template.

estimation_mask(x, buffer_size, res = buffer_size/8)

Arguments

x

An object of class sfg, sfc or sf, including particularly objects of class sr_obs. Geographical objects that determine the estimation region.

buffer_size

Numeric. Expansion of the extent around the convex-hull of x. In the units of the data (e.g. m, or arc-degrees).

res

Numeric vector of length 1 or 2. Resolution of the raster template. Size(s) of the pixel, in metres.

Examples

## Some random points in the unit square pp <- st_multipoint(matrix(runif(30), ncol = 2)) (em <- estimation_mask(pp, buffer_size = .3, res = .1))
#> class : RasterLayer #> dimensions : 15, 15, 225 (nrow, ncol, ncell) #> resolution : 0.1, 0.1 (x, y) #> extent : -0.2925914, 1.207409, -0.2194667, 1.280533 (xmin, xmax, ymin, ymax) #> crs : NA #> source : memory #> names : layer #> values : 1, 1 (min, max) #>
plot(em)
points(st_coordinates(pp))