\HeaderA{GDALReadOnlyDataset-methods}{subset methods for "GDALReadOnlyDataset"}{GDALReadOnlyDataset.Rdash.methods}
\aliasA{sub.GDROD}{GDALReadOnlyDataset-methods}{sub.GDROD}
\aliasA{[,GDALReadOnlyDataset-method}{GDALReadOnlyDataset-methods}{[,GDALReadOnlyDataset.Rdash.method}
\keyword{classes}{GDALReadOnlyDataset-methods}
\begin{Description}\relax
subsets GDAL objects, returning a SpatialGridDataFrame object
\end{Description}
\begin{Details}\relax
subsets a GDAL data set, returning a SpatialGridDataFrame object. Reading is
done on the GDAL side, and only the subset requested is ever read into memory.

Further named arguments to \code{[} are to either getRasterTable or getRasterData:
\describe{
\item[as.is] see \LinkA{getRasterData}{getRasterData}
\item[interleave] see \LinkA{getRasterData}{getRasterData}
\item[output.dim] see \LinkA{getRasterData}{getRasterData}
}
the other arguments, \code{offset} and \code{region.dim} are
derived from row/column selection values.
\end{Details}
\begin{Section}{Methods}
\describe{
\item["["] \code{signature(.Object = "GDALReadOnlyDataset")}: requires package
sp; selects rows and columns, and returns an object of class SpatialGridDataFrame
if the grid is not rotated, or else of class SpatialPointsDataFrame. Any arguments
passed to getRasterData (or in case of rotation getRasterTable) may be passed as
named arguments; the first three unnamed arguments are row,col,band 
}
\end{Section}
\begin{Author}\relax
Edzer J. Pebesma
\end{Author}
\begin{SeeAlso}\relax
See also \code{\LinkA{readGDAL}{readGDAL}} \code{\LinkA{GDALDriver-class}{GDALDriver.Rdash.class}},
\code{\LinkA{GDALDataset-class}{GDALDataset.Rdash.class}}, \code{\LinkA{GDALTransientDataset-class}{GDALTransientDataset.Rdash.class}},
\code{\LinkA{SpatialGridDataFrame-class}{SpatialGridDataFrame.Rdash.class}} .
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
logo <- system.file("pictures/logo.jpg", package="rgdal")[1]
x <- new("GDALReadOnlyDataset", logo)
dim(x)
x.sp = x[20:50, 20:50]
class(x.sp)
summary(x.sp)
spplot(x.sp)
GDAL.close(x)

logo <- system.file("pictures/Rlogo.jpg", package="rgdal")[1]
x.gdal <- new("GDALReadOnlyDataset", logo)
x = x.gdal[,,3]
dim(x)
summary(x)
spplot(x)
spplot(x.gdal[])
GDAL.close(x.gdal)
\end{ExampleCode}
\end{Examples}

