\HeaderA{getPixmapGDAL}{Read GDAL datasets as pixmapGrey or pixmapRGB objects}{getPixmapGDAL}
\keyword{hplot}{getPixmapGDAL}
\begin{Description}\relax
A wrapper function for \code{getRasterData()} to insert the retrieved data into pixmap objects; only implemented now for greyscale and RGB data.
\end{Description}
\begin{Usage}
\begin{verbatim}
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)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{dataset}] An object inheriting from class 'GDALReadOnlyDataset'
\item[\code{col}] a vector of colours or a colour function such as rainbow
\item[\code{band}] The band number (1-based) to read from
\item[\code{offset}] Number of rows and columns from the origin (usually the
upper left corner) to begin reading from
\item[\code{region.dim}] The number of rows and columns to read from the
dataset
\item[\code{output.dim}] Number of rows and columns in the output data; if
smaller than \code{region.dim} the data will be subsampled
\item[\code{interleave}] Element and row stride while reading data; rarely
needed
\item[\code{stretch.bands}] if TRUE, stretch 3-band RGB images
\item[\code{as.is}] If false, scale the data to its natural units; if the
case of thematic data, return the data as factors
\end{ldescription}
\end{Arguments}
\begin{Value}
For single band data, returns a \code{"pixmapGrey"} object, for three band data, a \code{"pixmapRGB"} object.
\end{Value}
\begin{Author}\relax
Roger Bivand
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{GDALRasterBand-class}{GDALRasterBand.Rdash.class}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
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)
\end{ExampleCode}
\end{Examples}

