reproject: Reproject a raster or vector dataset to the specified...

View source: R/utils.R

reprojectR Documentation

Reproject a raster or vector dataset to the specified coordinate reference system (CRS)

Description

Reproject a raster or vector dataset to the specified coordinate reference system (CRS)

Usage

reproject(x, crs, ...)

Arguments

x

Raster (SpatRaster) or vector (sf) object

crs

CRS to be projected to, provided as numeric, integer or logical vector of length one or sf::crs. If numeric, the value should be a positive number with unrestricted upper bound representing a valid EPSG code.

...

Optional arguments for raster or vector reproject functions

Value

sf::sf, sf::sfc, or terra::SpatRaster object reprojected to specified CRS

Examples

# Reproject a raster to EPSG:4326
r <- terra::rast(matrix(1:12, nrow = 3, ncol = 4), crs = "EPSG:32633")
reproject(r, 4326)

rcrisp documentation built on Nov. 24, 2025, 5:07 p.m.