getPixmapGDAL {rgdal} | R Documentation |
A wrapper function for getRasterData()
to insert the retrieved data into pixmap objects; only implemented now for greyscale and RGB data.
getPixmapGDAL(dataset, col=NULL, band = NULL, offset = c(0, 0), region.dim = dim(dataset), output.dim = region.dim, interleave = c(0, 0), stretch.bands = TRUE, as.is = FALSE)
dataset |
An object inheriting from class 'GDALReadOnlyDataset' |
col |
a vector of colours or a colour function such as rainbow |
band |
The band number (1-based) to read from |
offset |
Number of rows and columns from the origin (usually the upper left corner) to begin reading from |
region.dim |
The number of rows and columns to read from the dataset |
output.dim |
Number of rows and columns in the output data; if
smaller than region.dim the data will be subsampled |
interleave |
Element and row stride while reading data; rarely needed |
stretch.bands |
if TRUE, stretch 3-band RGB images |
as.is |
If false, scale the data to its natural units; if the case of thematic data, return the data as factors |
For single band data, returns a "pixmapGrey"
object, for three band data, a "pixmapRGB"
object.
Roger Bivand
logo <- system.file("pictures/logo.jpg", package="rgdal")[1] x <- new("GDALReadOnlyDataset", logo) xGrey <- getPixmapGDAL(x) xGrey plot(xGrey) xCm <- getPixmapGDAL(x, col=cm.colors) xCm plot(xCm) GDAL.close(x) Rlogo <- system.file("pictures/Rlogo.jpg", package="rgdal")[1] y <- new("GDALReadOnlyDataset", Rlogo) yRGB <- getPixmapGDAL(y) yRGB plot(yRGB) GDAL.close(y)