spatial_rao_maker: Return a function to perform the computatin of Rao's index on...

Description Usage Arguments Value

Description

The function computes, serially or in parallel, the spatial Rao's index on each layer of a raster stack on a moving window around a center pixel.

The serial computation is carried out through the raster::focal function. The parallel computation takes advantage of the spatial.tools::rasterEngine function. The parallel cluster has to be initialized beforehand calling the returned function by spatial.tools::sfQuickInit.

Usage

1
2
spatial_rao_maker(raster_stack, window_dims_v, parallel = FALSE,
  is_rao = TRUE)

Arguments

raster_stack

a raster stack of layers that will be used by the returned function to calculate Rao'index

window_dims_v

a 2 element numeric vector of the count of x and y pixels for the moving window

parallel

whether or not to calculate the index in parallel

is_rao

boolean to get Rao's index back (default) or Shannon's index

Value

a function accepting a numeric index relative to the layer of the raster_stack where Rao's index has to be calculated


mbask/spacetimerao documentation built on May 17, 2019, 11:08 a.m.