terra (version 0.3-7)

shift: Shift

Description

Shift the location of a SpatRaster or SpatVector object

Usage

# S4 method for SpatRaster
shift(x, dx=0, dy=0, filename="", overwrite=FALSE, wopt=list(), ...)

Arguments

x

SpatRaster or SpatVector

dx

numeric. The shift in horizontal direction

dy

numeric. The shift in vertical direction

filename

character. Output filename. Optional

overwrite

logical. If TRUE, filename is overwritten

wopt

list. Options for writing files as in writeRaster

...

additional arguments. None implemented

Value

Same object type as x

See Also

flip, rotate

Examples

Run this code
# NOT RUN {
r <- rast(xmn=0, ymn=0, xmx=1, ymx=1)
r <- shift(r, dx=1, dy=-1)
# }

Run the code above in your browser using DataCamp Workspace