Learn R Programming

rgdal (version 0.4-4)

GDALReadOnlyDataset-methods: subset methods for "GDALReadOnlyDataset"

Description

subsets GDAL objects, returning a SpatialGridDataFrame object

Arguments

Details

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 [ are to either getRasterTable or getRasterData: [object Object],[object Object],[object Object] the other arguments, offset and region.dim are derived from row/column selection values.

See Also

See also readGDAL GDALDriver-class, GDALDataset-class, GDALTransientDataset-class, SpatialGridDataFrame-class .

Examples

Run this code
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)

Run the code above in your browser using DataLab