classRaster_dim: Dimension of multiband raster image

dimR Documentation

Dimension of multiband raster image

Description

Retrieve the dimension of an object of class ursaRaster. The replacement function is dummy; it doesn't change raster dimension.

Usage

## S3 method for class 'ursaRaster'
dim(x)
## S3 replacement method for class 'ursaRaster'
dim(x) <- value

Arguments

x

Object of class ursaRaster

value

Any. Ignored

Details

Use extract operator [] and combine function c to change third (e.g., temporal) dimension of raster.
Use regrid function to change grid parameters and to resize/resample raster into new grid.

Value

The 'Extract' function dim returns named integer vector of length three: 1) number of lines/rows, 2) number of samples/columns, 3) number of bands/channels/layers.
The 'Replacement' function dim<- returns ursaRaster object without changes.

Author(s)

Nikita Platonov platonov@sevin.ru

Examples

session_grid(NULL)
session_grid(regrid(mul=1/16))
a <- ursa_dummy(nband=3)
ursa_info(a)
print(dim(a))
dim(a) <- c(25,00,34)
print(dim(a))
b <- create_envi("tmp1",bandname=letters[1:5],compress=FALSE)
print(dim(b))
close(b)
envi_remove("tmp1")

ursa documentation built on Sept. 30, 2024, 9:35 a.m.