GDALRasterBand-class {rgdal}R Documentation

Class "GDALRasterBand"

Description

Returns a two-dimensional array with data from a raster band, used internally within functions

Usage

getRasterData(dataset, band = NULL, offset = c(0, 0),
              region.dim = dim(dataset), output.dim = region.dim,
              interleave = c(0, 0), as.is = FALSE) 

getRasterTable(dataset, band = NULL, offset = c(0, 0), region.dim = dim(dataset))

getProjectionRef(dataset)

Arguments

dataset An object inheriting from class 'GDALReadOnlyDataset'
band The band number (1-based) to read from
offset Number of rows and columns from the origin (usually the upper left corner) to begin reading from; presently ordered (y,x) - this may change
region.dim The number of rows and columns to read from the dataset; presently ordered (y,x) - this may change
output.dim Number of rows and columns in the output data; if smaller than region.dim the data will be subsampled
interleave Element and row stride while reading data; rarely needed
as.is If false, scale the data to its natural units; if the case of thematic data, return the data as factors

Details

getRasterData:
retrieves data from the dataset as array.
getRasterTable:
retrieves data from the dataset as data frame.
getProjectionRef:
returns the geodetic projection in Well Known Text format.

Objects from the Class

Objects can be created by calls of the form new("GDALRasterBand", dataset, band).

Slots

handle:
Object of class "externalptr", from class "GDALMajorObject", used internally; not for public consumption

Extends

Class "GDALMajorObject", directly.

Methods

dim
signature(x = "GDALRasterBand"): ...
initialize
signature(.Object = "GDALRasterBand"): ...

Author(s)

Timothy H. Keitt, modified by Roger Bivand

See Also

See also GDALDriver-class, GDALDataset-class, GDALTransientDataset-class

Examples

logo <- system.file("pictures/logo.jpg", package="rgdal")[1]
x <- new("GDALReadOnlyDataset", logo)
plot(density(getRasterTable(x)$band1))
GDAL.close(x)

[Package rgdal version 0.4-4 Index]