Description Usage Arguments Details Value Author(s) Examples
Buffr calculates a buffer around any user-defined cell value for RasterLayer objects.
1 2 3 |
r |
RasterLayer. |
distance |
numeric>0. The buffer distance. The units are defined in the units argument. |
units |
character. This argument must equal either "cell" or "geographic". If set to "cell", then the buffer distance is interpreted as the number of cells. If set to "geographic", then the distance is interpreted as being in the same units as the resolution of the raster file. |
target_value |
numeric. Cell value to perform the buffer operation on. Buffered cells will take on this value. |
mask |
logical. If TRUE then all cells that do not contain the target value are masked with the value defined in the mask_value argument (NA by default). If FALSE then all cells that do not contain the target value are returned with their original value. |
mask_value |
numeric. Value to use for masking when the mask argument is set to TRUE. |
max_rows_at_once |
numeric>0. Sets the maximum number of rows for R to process at once, which can cause larger jobs to be broken into smaller loops. Recommended to leave at the default value of 100000000. |
verbose |
logical. Should progress indicators be supressed? |
Buffr assigns a cell value based on whether the center of the cell falls within the buffer radius.
Buffr offers several advantages over the buffer function in the raster package v2.6-7:
It is substantially faster, especially for large rasters and buffers. This is partially because the computationally intensive operations are implemented in C++ using the Rcpp package.
The user can define which cell value to buffer.
It includes progress indicators.
RasterLayer
Ariel Fridman
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.