snap_to_grid: Resample a raster to a standard matrix grid

Description Usage Arguments Value

View source: R/utilities.R

Description

Resample a raster to a standard matrix grid

Usage

1
snap_to_grid(x, grid, coords, method = "ngb")

Arguments

x

A Raster object to be resampled.

grid

A list of matrices as returned by grid_init().

coords

A numeric vector of length two indicating the spatial coordinates of the "center" grid cell.

method

Name of the resampling method passed to raster::resample. Can be "ngb" (the default) or "bilinear".

Value

A matrix that matches spatial dimensions of grid.


grahamstewart12/footprints documentation built on Aug. 18, 2021, 4:32 p.m.