rotate_raster.Rd
Rotates the detrended DEM according to the main direction of the Fourier spectrum
rotate_raster(rstr, ang_fourier)
rstr | a |
---|---|
ang_fourier |
|
a matrix
corresponding to the DEM rotated in the main direction of the Fourier spectrum
r <- raster::raster(ncol = 3, nrow = 3) raster::values(r) <- 1:(raster::ncell(r)) raster::as.matrix(r)#> [,1] [,2] [,3] #> [1,] 1 2 3 #> [2,] 4 5 6 #> [3,] 7 8 9#> [,1] [,2] [,3] [,4] #> [1,] NA 1 1 NA #> [2,] 7 4 2 3 #> [3,] 7 8 6 3 #> [4,] NA 9 9 NA