Description Usage Arguments Details Value
split_brick_px
divides a RasterBrick into an arbitrary number of pieces (tiles).
1 2 3 4 |
brick |
The RasterBrick to be split. |
tile_w_px |
The width of the output tiles in number of pixels/cells. |
tile_h_px |
The height of the output tiles in number of pixels/cells. |
overlap |
The number of pixels images should overlap. Default of 0 means no image overlap (i.e., no two tiles will contain the same pixel from the source image). The same overlap value will be used in both x and y directions. |
complete_image |
If TRUE and the tile size and overlap dimensions do not conform to covering the entire source RasterBrick, an additional row and column of tiles will be created that include the excluded pixels but do NOT respect the overlap value. If FALSE and the dimensions do not conform, the set of tiles will omit some pixels on the right and bottom side of the source RasterBrick. |
path |
Character specifying the directory to which the split tiles will be saved. If missing, the function will store the tiles in memory. If the path does not exist, it will be created. |
file_ext |
Extension for image file type of saved tiles. |
d_type |
Datatype of the tiles. Defaults to INT1U. See |
write_only |
If TRUE, tiles will not be retained in memory. |
write_options |
File writing options passed to |
cl |
A cluster object. Optional. This would generally be created using parallel::makeCluster or equivalent. |
This function is parallel-aware, using the same mechanism as used in the raster
package. Specifically, if you start a cluster using beginCluster
, then
this function will automatically use that cluster. It is always a good
idea to stop the cluster when finished, using endCluster
.
split_brick_px
returns either a list of cropped raster brick tiles or,
if write_only = TRUE
, a list containing TRUE
, an error message,
or a warning message depending on whether the tile was successfully written to
file. The list's length will be equal to the number of tiles, determined by
the source image width/height in pixels and the out_x_px
, out_y_px
,
and overlap
argument values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.