File: rotate.Rd

package info (click to toggle)
r-cran-raster 3.6-31-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,300 kB
  • sloc: cpp: 2,367; ansic: 1,572; sh: 13; makefile: 2
file content (42 lines) | stat: -rw-r--r-- 804 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\name{rotate}

\docType{methods}

\alias{rotate}
\alias{rotate,Raster-method}

  
\title{Rotate}

\description{
Rotate a Raster* object that has x coordinates (longitude) from 0 to 360, to standard coordinates between -180 and 180 degrees. Longitude between 0 and 360 is frequently used in global climate models.
}

\usage{
\S4method{rotate}{Raster}(x, filename='', ...)
}

\arguments{
\item{x}{Raster* object}
\item{filename}{character. Output filename (optional)}
\item{...}{additional arguments as for \code{\link{writeRaster}}}  
}

\value{
RasterLayer or a RasterBrick object
}


\seealso{ \code{\link[raster]{flip}} }


\examples{

r <- raster(nrow=18, ncol=36)
m <- matrix(1:ncell(r), nrow=18)
values(r) <- as.vector(t(m))
extent(r) <- extent(0, 360, -90, 90)
rr <- rotate(r)
}

\keyword{spatial}