Learn R Programming

rcrisp (version 0.3.1)

reproject: 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, ...)

Value

sf::sf, sf::sfc, or terra::SpatRaster object reprojected to specified 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

Examples

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

Run the code above in your browser using DataLab