Skip to contents

Generate a regular grid of spatial points at a specified pixel resolution (i.e. density of points), from provided polygon(s) or multipolygon(s). The points will be used in subsequent processing, for example, to summarise landscape variables as model inputs, as well as to generate spatial predictions across the target area. This function is a wrapper around the sf::st_make_grid() function with the argument what = "centers".

Usage

generate_grid(target_areas, innerbuffer_m, pixelsize_m)

Arguments

target_areas

sf object(s) of type POLYGON or MULTIPOLYGON.

innerbuffer_m

numeric value indicating the minimum distance between generated points and the boundaries of the target area.

pixelsize_m

numeric value for output grid cell size (in metres).

Value

An sf dataframe with an additional geometry (sfc) column of type POINT.