classRaster_seq: Sequence Generation for raster image and coordinate grid

seqR Documentation

Sequence Generation for raster image and coordinate grid

Description

Set of functions to generate regular sequences of bands, x-/y-cordinates and columns/rows.

Usage

## S3 method for class 'ursaRaster'
seq(...)

## S3 method for class 'ursaGrid'
seq(...)

ursa_seqx(obj)
ursa_seqy(obj)
ursa_seqc(obj)
ursa_seqr(obj)

Arguments

...

Set of arguments, which are recognized via their names (using regular expressions), position and classes.

.*

First argument (position 1). Object of classes ursaRaster, ursaGrid.

.*

Second argument (position >1). One-character name. Valid values are in the list c("z","x","y","c","r","lines","samples"). "c" ("samples") and "r" ("lines") specify to generate cell sequence in the horizontal and vertical directions from bottom-left corner, whereas "z" specifies to generate sequence of bands. x and "y" return cell midpoints in spatial dimension.

obj

Object of classes ursaRaster, ursaGrid. Missing obj is allowed; in this case the session grid is considered.

Details

All ordinal sequences (⁠axis⁠ is ⁠\dQuote{c}⁠, ⁠\dQuote{r}⁠, ⁠\dQuote{z}⁠) start from 1L.

⁠axis=\dQuote{z}⁠ is ignored in the function seq for ursaGrid object. The returned value is 1L.

seq(obj) for ursaRaster objects is suitable for using in cycles across bands.

Value

Functions ursa_seqx and seq(obj, "x") return x-coordinates of cell midpoints.
Functions ursa_seqy and seq(obj, "y") return y-coordinates of cell midpoints.
Functions ursa_seqc, seq(obj, "samples") and seq(obj, "c") return sequence of cells in horizontal direction.
Functions ursa_seqr, seq(obj, "lines") and seq(obj, "r") return sequence of cells in vertical direction.
Functions seq(obj) and seq(obj, "z") for ursaRaster object returns sequence of bands.
Function seq(obj) and seq(obj, "z") for ursaGrid object returns 1L.

Author(s)

Nikita Platonov platonov@sevin.ru

Examples

session_grid(NULL)
session_grid(regrid(mul=1/16))
print(session_grid())
a <- ursa_dummy(nband=5)
print(a)
print(seq(a))
print(seq(a,"c"))
print(seq(a,"x"))
print(ursa_seqx())

nplatonov/ursa documentation built on Feb. 2, 2024, 4:08 a.m.