Learn R Programming

ursa (version 3.10.4)

head: 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 ursaRaster
head(x, n = 3L, ...)

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

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

Value

Object of class ursaRaster

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.

Author

Nikita Platonov platonov@sevin.ru

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.

Examples

Run this code
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]))

Run the code above in your browser using DataLab