Skip to contents

Generates a regular square or hexagonal spatial grid over a study area bounding box and assigns each cell a stable unique identifier. Create the grid once and reuse it across pipeline runs so that `cell_id` values remain consistent over time.

Usage

create_reference_grid(study_area_bbox, cell_size_meters = 500, hex = TRUE)

Arguments

study_area_bbox

An `sf` polygon or bounding box defining the spatial extent of the grid.

cell_size_meters

Numeric. Grid cell size in metres. Default is `500`.

hex

Logical. If `TRUE` (default), creates hexagonal cells; if `FALSE`, creates square cells.

Value

An `sf` polygon object with a `cell_id` column containing a unique identifier for each cell (format: `"GRID_<n>"`).

See also

[prep_fishing_points()], [aggregate_daily_effort()]