Skip to contents

Align vector CRS to raster's

Usage

reproject_to_raster(vector = NULL, raster = NULL)

Arguments

vector

sf/stars/SpatVector/SpatRaster object

raster

SpatRaster object

Value

Reprojected object in the same class as vector

See also

Other Helper functions: datamod(), dep_check(), dep_switch(), get_clip_ext(), par_def_q(), reproject_std()

Author

Insang Song

Examples

if (FALSE) { # \dontrun{
library(terra)
library(sf)
options(sf_use_s2 = FALSE)

ncpath <- system.file("gpkg/nc.gpkg", package = "sf")
elev <- system.file("ex/elev.tif", package = "terra")
nc <- terra::vect(ncpath)
elev <- terra::rast(elev)
reproject_to_raster(nc, elev)
} # }