SAR_matrix: SAR_matrix

Description Usage Arguments Value Examples

View source: R/class.R

Description

Construct a SAR_matrix object from a matrix m. Each column of a SAR_matrix corresponds to a band in a SAR raster brick (i.e., to the depth dimension), and each row corresponds to a pixel.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
SAR_matrix(
  m,
  extent = raster::extent(raster::raster()),
  crs = "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0",
  brick_nrow,
  brick_ncol,
  brick_names = paste0("layer.", 1:ncol(m)),
  brick_na_indices = integer(0),
  attr_src
)

Arguments

m

A matrix with raster intensities.

extent

An extent object.

crs

A string specifying the coordinate reference system (as in crs).

brick_nrow

A single integer specifying the number of rows (in pixels) of each band in the brick. Note that brick_nrow * brick_nrow must equal nrow(m).

brick_ncol

A single integer specifying the number of columns (in pixels) of each band in the brick. Note that brick_nrow * brick_nrow must equal nrow(m).

brick_names

A vector of length ncol(m) labelling each band in the raster brick.

brick_na_indices

Integer vector giving row indices for locations where NA pixels exist in the corresponding raster brick.

attr_src

Either another SAR_matrix or a raster brick. If this argument is not missing then all other arguments to this function will be sourced from attr_src (except for the argument brick_names, since attr_src is understood to possible have fewer columns than m).

Value

A SAR_matrix object; a specialisation of class matrix that includes geospatial and brick dimension attributes.

Examples

1
2
SAR_matrix(m = matrix(0, 4, 3),
           brick_nrow = 4, brick_ncol = 3)

frycast/rsar documentation built on Sept. 4, 2020, 3:52 a.m.