RotateRaster: Rotates a Raster in 2-dimensional space

Description Usage Arguments Value Examples

Description

Rotates a Raster in 2-dimensional space

Usage

1
RotateRaster(raster, angle, resolution)

Arguments

raster

Raster

angle

numeric, degrees to rotate Raster

resolution

numeric, resolution of output Raster

Value

A raster

Examples

1
2
3
4
5
6
7
8
library(raster)
x <- raster(matrix(1:(15*25), nrow = 15), xmn = -1000, xmx = 1000,
ymn = -1000, ymx = 1000)
plot(x, main="Original")
plot(RotateRaster(x, 30, 10), main = paste("Rotated by 30 degrees"))
plot(RotateRaster(x, 75, 10), main = paste("Rotated by 75 degrees"))
plot(RotateRaster(x, 180, 10), main = paste("Rotated by 180 degrees"))
plot(RotateRaster(x, 300, 10), main = paste("Rotated by 300 degrees"))

Blakemassey/gisr documentation built on Aug. 30, 2020, 12:14 a.m.