project_raster: Raster projection utility

View source: R/utils.R

project_rasterR Documentation

Raster projection utility

Description

Project a raster according to a specified CRS and resolution. It will adjust the output extent according to the resolution.

Usage

project_raster(rast, epsg, resolution, method = "bilinear", trim = FALSE)

Arguments

rast

input raster ('SpatRaster')

epsg

the EPSG code to use for projecting the raster

resolution

the resolution of the projected raster (pixel size in m)

method

the projection method (default 'bilinear', see 'project' from 'terra' package for other available options)

trim

flag (default 'FALSE') to trim the periphery of the rast after projection and remove all NA pixels (use with caution as it can shrink substantially the output raster)

Value

a projected raster


VincentGodard/gtbox documentation built on Sept. 4, 2022, 3:46 a.m.