Skip to contents

Returns the ABMI 1 km reference grid for Alberta as a template SpatRaster: 1234 rows by 695 columns of 1000 m cells in ab_crs(). Cells belonging to the grid (those covering Alberta) hold the value 1; cells outside the province are NA.

Usage

ab_grid()

Value

A SpatRaster with a single layer named grid_1km.

Details

This is the default reference grid for check_alignment(), resample_to_grid(), and harmonize_crs(), so harmonized layers share one CRS, extent, resolution, and origin by default.

The template is snapped to the lattice of the source grid polygons, so a cell's raster row and column reproduce its source GRID_LABEL ("<row>_<col>", row 1 at the north edge, column 1 at the west edge).

See also

resample_to_grid() to harmonize a layer onto this grid; check_alignment() to test a layer against it.

Examples

if (FALSE) { # \dontrun{
ref <- ab_grid()
terra::res(ref)
terra::ext(ref)
} # }