Learn R Programming

ursa (version 3.9.4)

ursaRaster: Definition of ursaRaster class.

Description

ursaRaster is S3 class for manipulation with georeferred raster images. See ‘Value’ section. is.ursa checks inhering to class ursaRaster

Usage

# S3 method for ursaRaster
print(x, digits = NA, grid = FALSE, raw = FALSE, caption = FALSE, ...)

# S3 method for ursaRaster str(object,...)

is.ursa(obj, ref = NULL) is_ursa(obj, ref = NULL)

Arguments

x, object

ursaRaster object.

obj

Any.

digits

Passed to format function

grid

Logical. If grid=TRUE then returns simplified metadata.

raw

Logical. If FALSE and values are categories, then attempting to restore numeric values from categorical names is before calculating of statistics. If TRUE then values for statistics are used as is. Default is FALSE.

caption

Logical of character. Print title or other identificational info. If logical and TRUE then print variable name or character representation of expression. If non-zero length character, then print this value. If FALSE (default) or zero-length character, then no header for printing.

Passed to format function

ref

Character or NULL. If character, then checking of ursaRaster sub-class(es):

Pattern Description
NULL ursaRaster
(raster|brick|ursa) ursaRaster
grid ursaGrid
(ct|color|table) ursaColorTable
stack ursaStack
con ursaConnection
val ursaNumeric OR ursaCategory

Value

ursaRaster is R's S3 class. It is a list with items:

grid

Geospatial properties. ursaGrid object

con

Connection properties.ursaConnection object

value

2-dimensional numerical or integer matrix of classes ursaValue in (spatial, temporal) specification formed from (samples*lines, bands). If data are not in memory, then NA.

dim

Dimension of $value. If bands are interpreted as observations in time, then it is spatial by temporal dimension of data. Even data are not in memory, dim is a dimension of whole data.

%%~ \item{ind}{Integer. Used to mark spatial component in matrix compression (\code{\link[ursa:codec]{compress}}, \code{\link[ursa:codec]{decompress}})}
name

Band names

colortable

Color table. ursaColorTable object

is.ursa(x) returns TRUE, if class of x is ursaRaster

Details

is.ursa() is designed mainly for developers to check arguments' class in function's call. is_ursa is a synonym to is.ursa.

Stucture of ursaRaster class is generated by non-public .raster.skeleton() function.

Examples

Run this code
# NOT RUN {
session_grid(NULL)
print(methods(class="ursaRaster"))

a <- pixelsize()
print(a)
print(a,grid=TRUE)
s <- substr(as.character(sessionInfo()),1,48)
b <- rep(a,length(s))
bandname(b) <- s
print(b)

require(datasets)
data(volcano)
print(is.ursa(a))
print(is.ursa(volcano))
print(is.ursa(as.ursa(volcano)))
# }

Run the code above in your browser using DataLab