Raster cropping/masking: mask
Value outside of our area of interest: NA
(could be change with updatevalue
).
srtm_masked = terra::mask(srtm, zion)
plot(srtm_masked, col = grDevices::terrain.colors(50))
plot(zion$geom, add = TRUE)
# srtm_inv_masked = mask(srtm, zion, inverse = TRUE)