get_field_grid: Make polygon grid of field

Description Usage Arguments Value Note

View source: R/preprocessing.R

Description

Make polygon grid of field

Usage

1
get_field_grid(field, alpha, harvest_width, passes_to_clip, cellsize_scaler)

Arguments

field

sf; an sf object of point geometries.

alpha

numeric; parameter that controls the level of simplication in the field boundary. Larger numbers are more simple and follow the data points less closely. This parameter is passed to alphahull::ashape.

harvest_width

numeric; width of harvest header, in meters.

passes_to_clip

integer; the number of harvest passes to clip when creating field buffer.

cellsize_scaler

numeric; controls the size of the grid cells. The value of combind_width * cellsize_scaler is passed to sf::st_make_grid.

Value

An sfc_POLYGON object that contains a hexagonal grid of cell size harvest_width * cellsize_scaler, clipped to the size of the field buffer. The field buffer is the detected field boundardy, with its simplifiction controlled by alpha, minus harvest_width * passes_to_clip.

Note

TODO maybe add ... to give more flexibility in passing arguments?


smmueller/plotdesignr documentation built on Jan. 5, 2022, 10:55 a.m.