| crop_caim | R Documentation |
Extracts a rectangular region of interest (ROI) from a canopy image. This
function complements read_caim() and read_caim_raw().
crop_caim(r, upper_left = NULL, width = NULL, height = NULL)
r |
terra::SpatRaster. |
upper_left |
numeric vector of length two. Pixel coordinates of the
upper-left corner of the ROI, in the format |
width, height |
numeric vector of length one. Size (in pixels) of the rectangular ROI to read. |
terra::SpatRaster object containing the same layers and values
as r but restricted to the selected ROI, preserving all other properties.
rcaiman uses terra without geographic semantics: rasters are kept with
unit resolution (cell size = 1) and a standardized extent
ext(0, ncol, 0, nrow) with CRS EPSG:7589.
caim <- read_caim()
ncell(caim)
caim <- crop_caim(caim, c(231,334), 15, 10)
ncell(caim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.