Learn R Programming

rgdal (version 0.5-1)

SpatialGridDataFrameGDAL-class: Class "SpatialGridDataFrameGDAL"

Description

Class for spatial attributes that have spatial locations on a (full) regular grid on file, not (yet) actually read.

Arguments

Objects from the Class

Objects can be created by calls of the form open. SpatialGridDataFrameGDAL(name),, where name is the name of the GDAL file.

Extends

Class "SpatialGridDataFrame", directly. Class "SpatialGrid", by class "SpatialGridDataFrame". Class "Spatial", by class "SpatialGrid".

See Also

SpatialGridDataFrame-class, which is actually sub-classed.

Examples

Run this code
x <- open.SpatialGridDataFrameGDAL(system.file("external/test.ag", package="sp")[1])
image(x[])
image(as(x, "SpatialGridDataFrame"))
summary(as(x, "SpatialGridDataFrame"))
spplot(x) # S4 method: will transform x
# select first 50 rows:
summary(x[1:50])
# select first 50 columns:
summary(x[,1:50])
# select band 1:
summary(x[,,1])
# select first 50 rows, first 50 columns, band 1:
summary(x[1:50,1:50,1])
# get values of first band:
summary(x[[1]])
close(x)

Run the code above in your browser using DataLab