gridcells: Construct Grid Cells

gridCellsR Documentation

Construct Grid Cells

Description

Forms grid cells centred on input points.

Usage


gridCells(x, cellsize = spacing(x), crs = NA)

Arguments

x

matrix or dataframe with x- and y-coordinates

cellsize

length of gridcell side

crs

crs description suitable for st_crs

Details

The argument x will often be a traps or mask object with spacing attribute. Otherwise cellsize must be provided.

Value

A simple features (sf) object of class ‘sfc_MULTIPOLYGON’.

crs may be the integer EPSG code (e.g. 3578 Yukon Albers).

See Also

plotMaskEdge, spacing

Examples


plot(gridCells(traps(captdata)))
plot(traps(captdata), add = TRUE)

secr documentation built on Oct. 18, 2023, 1:07 a.m.