Description Usage Arguments Details Author(s) Examples
View source: R/fh_raster_transfrom.R
function to perform a raster::extract on very large data sets
1 | fh_raster_transform(in_layerStack, parallel, no_cores, transform_eq)
|
in_layerStack |
- a raster brick or stack |
transfrom_eq |
- equation to manipulate the cell values i.e. "(x - 10000) /10000" x represents the cell value |
takes a layer stack/brick an transforms all layers-pixel values provide a transformation eq like: transform_eq = "(x-10000) / 10000"
Eric Krueger
1 2 3 4 5 6 7 8 9 | ## Not run:
r <- r2 <- raster::raster(ncol=10, nrow=10)
r <- raster::setValues(r,1:raster::ncell(r))
r2 <- raster::setValues(r2,10)
raster_brick <- raster::brick(r,r2)
fh_raster_transform(in_layerStack = raster_brick,
transform_eq = "(x + 10) / 2") # adds 10 to each cell
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.