if (interactive() && requireNamespace("EBImage")) {
library(pliman)
shp1 <- shapefile_input(paste0(image_pliman(), "/shp1.rds"))
shp2 <- shapefile_input(paste0(image_pliman(), "/shp2.rds"))
shapefile_view(shp1) + shapefile_view(shp1)
# Apply operations
shapefile_within(shp1, shp2)
shapefile_outside(shp1, shp2)
shapefile_overlaps(shp1, shp2)
shapefile_touches(shp1, shp2)
shapefile_crosses(shp1, shp2)
shapefile_intersection(shp1, shp2)
shapefile_difference(shp1, shp2)
shapefile_union(shp1, shp2)
}
Run the code above in your browser using DataLab