Generate a raster from another raster an a function that takes block (a vector of pixels) as argument and returns a new raster in memory.
1 | applyFunctionByBlocks(raster, block_func, ...)
|
raster |
A raster object. |
block_func |
A function that takes a vector of pixels as argument and returns another vector of pixels with the same size of the input. All but the last call use vectors with the same size. The last one uses the remaining pixels of the raster. |
... |
Any other parameters to pass to block_func. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.