| 1 |
\name{Rlogo} |
| 2 |
\alias{Rlogo} |
| 3 |
\alias{gt} |
| 4 |
\docType{data} |
| 5 |
\title{Rlogo jpeg image} |
| 6 |
\description{ |
| 7 |
Rlogo jpeg image data as imported by \code{getRasterData} in the rgdal package |
| 8 |
} |
| 9 |
\usage{data(Rlogo)} |
| 10 |
\format{ |
| 11 |
The format is: |
| 12 |
int [1:101, 1:77, 1:3] 255 255 255 255 255 255 255 255 255 255 ... |
| 13 |
} |
| 14 |
|
| 15 |
\examples{ |
| 16 |
data(Rlogo) |
| 17 |
d = dim(Rlogo) |
| 18 |
cellsize = abs(c(gt[2],gt[6])) |
| 19 |
cells.dim = c(d[1], d[2]) # c(d[2],d[1]) |
| 20 |
cellcentre.offset = c(x = gt[1] + 0.5 * cellsize[1], y = gt[4] - (d[2] - 0.5) * abs(cellsize[2])) |
| 21 |
grid = GridTopology(cellcentre.offset, cellsize, cells.dim) |
| 22 |
df = as.vector(Rlogo[,,1]) |
| 23 |
for (band in 2:d[3]) df = cbind(df, as.vector(Rlogo[,,band])) |
| 24 |
df = as.data.frame(df) |
| 25 |
names(df) = paste("band", 1:d[3], sep="") |
| 26 |
Rlogo <- SpatialGridDataFrame(grid = grid, data = df) |
| 27 |
summary(Rlogo) |
| 28 |
spplot(Rlogo, zcol=1:3, names.attr=c("red","green","blue"), |
| 29 |
col.regions=grey(0:100/100), |
| 30 |
main="example of three-layer (RGB) raster image", as.table=TRUE) |
| 31 |
} |
| 32 |
\keyword{datasets} |