RasterArray-class: Array of "SpatRaster"-class objects

RasterArray-classR Documentation

Array of 'SpatRaster'-class objects

Description

Array class for easier navigation of multilayer rasters

Arguments

stack

A SpatRaster object.

index

A vector, matrix or array type object. Includes either the indices of layers in the stack, or their names.

dim

A numeric vector. Same as for array, creates proxy procedurally.

Details

The class implements structures to organize single-layer 'SpatRaster'-class objects that have the same dimensions and coordinate reference system. Subsetting rules were defined using the proxy object in the @index slot. See examples for implementations.

The class has two slots: @stack: A 'SpatRaster'-class object with multiple layers, the actual data. index: A proxy object that represents the organization of the layer in the array.

Value

A 'RasterArray'-class object.

Examples

# example data
  ex <- rastex()
  st <-ex@stack
  ind <- 1:6
  names(ind) <- letters[1:length(ind)]
  ra<- RasterArray(stack=st, index=ind)
  

via documentation built on May 31, 2023, 8:31 p.m.

Related to RasterArray-class in via...