classRaster_head: Extract first and last bands of raster image

headR Documentation

Extract first and last bands of raster image

Description

Functions to extract first bands (head), last bands (tail) and first+last bands (series) of raster image.

Usage

## S3 method for class 'ursaRaster'
head(x, n = 3L, ...)

## S3 method for class 'ursaRaster'
tail(x, n = 3L, ...)

series(x, n = 3L, s=170, ...)

Arguments

x

Object of class ursaRaster

n

Positive integer. Number of extracted bands.

s

Positive numeric. Maximal size of memory in MB for extracted raster image in the assumption that class of values is numeric.

...

Not used.

Details

Function series combines consequtive calling head(x); tail(x) with checking the size of extracted part of raster image. If size exceeds specified value of the argument s, then number of extracted bands n is decreased.

Value

Object of class ursaRaster

Author(s)

Nikita Platonov platonov@sevin.ru

Examples

session_grid(NULL)
session_grid(regrid(mul=1/8))
a <- ursa_dummy(nband=101)
print(head(a))
print(tail(a))
print(series(a,2))
print(series(a[1:5]))

ursa documentation built on Oct. 17, 2023, 5:11 p.m.