Load survey block data (polygon, point, or coordinate table)
Source:R/utils.R
load_survey_blocks.Rd
Returns the built-in survey_blocks
dataset as either polygons, centroids, or
coordinates. Survey blocks are 2x2 km square grids that may overlap with land.
Note that centroid and coordinate outputs may fall on land rather than in the ocean.
While suitable for visualization and basic modeling, these points should not be used
directly for extracting oceanographic covariates - instead use polygon
and extract
as appropriate.
Usage
load_survey_blocks(type = c("polygon", "centroid", "XY"), active_only = TRUE)
Arguments
- type
Character string specifying the output format. One of:
"polygon"
(default): returns ansf
object with polygon geometries."centroid"
: returns ansf
object with the centroid point for each block."XY"
: returns atibble
with columnsX
andY
(in kilometres), representing point-on-surface coordinates extracted from each polygon.
- active_only
Logical. If TRUE (default), only returns active survey blocks.
Examples
if (FALSE) { # \dontrun{
load_survey_blocks("polygon") |>
ggplot() +
geom_sf(aes(fill = survey_abbrev)) +
theme_minimal()
load_survey_blocks("centroid") |>
ggplot() +
geom_sf(aes(colour = survey_abbrev)) +
theme_minimal()
load_survey_blocks("XY") |>
ggplot() +
geom_point(aes(x = X, y = Y)) +
theme_minimal()
} # }