powered by
Shift the location of a SpatRaster or SpatVector object
# S4 method for SpatRaster shift(x, dx=0, dy=0, filename="", overwrite=FALSE, wopt=list(), ...)
SpatRaster or SpatVector
numeric. The shift in horizontal direction
numeric. The shift in vertical direction
character. Output filename. Optional
logical. If TRUE, filename is overwritten
TRUE
filename
list. Options for writing files as in writeRaster
writeRaster
additional arguments. None implemented
Same object type as x
x
flip, rotate
flip
rotate
# 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 DataLab