Creates polygon or centre-point geometries for all or selected cells in a configured PRIO-GRID.
Usage
pg_geometry(
pgid = NULL,
geometry = c("polygon", "point"),
crs = NULL,
config = priogrid::pg_current_config()
)Examples
config <- priogrid::pg_config(nrow = 18, ncol = 36)
pg_geometry(1:3, geometry = "point", config = config)
#> Simple feature collection with 3 features and 1 field
#> Geometry type: POINT
#> Dimension: XY
#> Bounding box: xmin: -175 ymin: -85 xmax: -155 ymax: -85
#> Geodetic CRS: +proj=longlat +datum=WGS84 +no_defs
#> pgid geometry
#> 1 1 POINT (-175 -85)
#> 2 2 POINT (-165 -85)
#> 3 3 POINT (-155 -85)