View source: R/visualizations.R
testIntersection | R Documentation |
Tests whether two rasters overlap. Used in
\code{\link[voluModel:diversityStack]{diversityStack}}
function to verify all rasters in list overlap with the
template raster.
testIntersection(a, b)
a |
The first |
b |
The second |
A logical vector stating whether the two inputs overlap
library(terra)
rast1 <- rast(ncol=10, nrow=10)
values(rast1) <- rep(0:1, 50)
rast2 <- rast(ncol=10, nrow=10)
values(rast2) <- c(rep(0, 50), rep(1,50))
testIntersection(rast1, rast2)
rast1 <- crop(rast1, ext(10, 20, 30, 40))
rast2 <- crop(rast2, ext(-20, -10, -40, -30))
testIntersection(rast1, rast2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.