classRaster_dim: Dimension of multiband raster image

Description Usage Arguments Details Value Author(s) Examples

Description

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

Usage

1
2
3
4
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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 May 23, 2021, 1:06 a.m.