SpatialGridDataFrameGDAL-class {rgdal}R Documentation

Class "SpatialGridDataFrameGDAL"

Description

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

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.

Slots

points:
see SpatialPoints; points slot which is not actually filled with all coordinates (only with min/max)
grid:
see GridTopology-class; grid parameters
grid.index:
see SpatialPixels-class; this slot is of zero length for this class, as the grid is full
bbox:
Object of class "matrix"; bounding box
proj4string:
Object of class "CRS"; projection
data:
Object of class data.frame, containing attribute data

Extends

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

Methods

[
signature(x = "SpatialGridDataFrameGDAL", i, j, ...): selects rows (i), columns (j), and bands (third argument); returns an object of class SpatialGridDataFrame. Only the selection is actually read.
[[
signature(i): reads band i and returns the values as a numeric vector

Note

Author(s)

Edzer J. Pebesma, e.pebesma@geo.uu.nl

References

See Also

SpatialGridDataFrame-class, which is actually sub-classed.

Examples

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)

[Package rgdal version 0.5-13 Index]