Returns a two-dimensional array with data from a raster band, used internally within functions
getRasterData(dataset, band = NULL, offset = c(0, 0),
region.dim = dim(dataset), output.dim = region.dim,
interleave = c(0, 0), as.is = FALSE, list_out=FALSE) getRasterTable(dataset, band = NULL, offset = c(0, 0),
region.dim = dim(dataset))
getProjectionRef(dataset, OVERRIDE_PROJ_DATUM_WITH_TOWGS84 = NULL)
getRasterBand(dataset, band = 1)
getRasterBlockSize(raster)
toSigned(x, base)
toUnSigned(x, base)
get_OVERRIDE_PROJ_DATUM_WITH_TOWGS84()
set_OVERRIDE_PROJ_DATUM_WITH_TOWGS84(value)
An object inheriting from class 'GDALReadOnlyDataset'
The band number (1-based) to read from
Number of rows and columns from the origin (usually the upper left corner) to begin reading from; presently ordered (y,x) - this may change
The number of rows and columns to read from the dataset; presently ordered (y,x) - this may change
Number of rows and columns in the output data; if
smaller than region.dim
the data will be subsampled
Element and row stride while reading data; rarely needed
If false, scale the data to its natural units; if the case of thematic data, return the data as factors
default FALSE, return array, if TRUE, return a list of vector bands
An object of class GDALRasterBand
integer variable for conversion
If Byte input, 8, if Int16 or UInt16, 16
logical value, default NULL, which case the cached option set by set_OVERRIDE_PROJ_DATUM_WITH_TOWGS84
is used. Ignored if the GDAL version is less than “1.8.0” or if the CPLConfigOption variable is already set
logical value to set OVERRIDE_PROJ_DATUM_WITH_TOWGS84
Objects can be created by calls of the form new("GDALRasterBand", dataset, band)
.
handle
:Object of class "externalptr", from class "GDALMajorObject"
, used internally; not for public consumption
Class "GDALMajorObject"
, directly.
signature(x = "GDALRasterBand")
: ...
signature(.Object = "GDALRasterBand")
: ...
getRasterData
:retrieves data from the dataset as an array or list of bands; will try to convert relevant bands to factor if category names are available in the GDAL driver when returning a list.
getRasterTable
:retrieves data from the dataset as data frame.
getProjectionRef
:returns the geodetic projection in Well Known Text format.
getRasterBand
:returns a raster band
getRasterBlockSize
:returns the natural block size of the raster band. Use this for efficient tiled IO.
toSigned
:used to convert a band read as unsigned integer to signed integer
toUnSigned
:used to convert a band read as signed integer to unsigned integer
See also GDALDriver-class
, GDALDataset-class
, GDALTransientDataset-class
# NOT RUN {
logo <- system.file("pictures/logo.jpg", package="rgdal")[1]
x <- new("GDALReadOnlyDataset", logo)
plot(density(getRasterTable(x)$band1))
GDAL.close(x)
# }
Run the code above in your browser using DataLab