if (FALSE) {
# These examples require external data files not included with the package
# Mathematical operations
sum_raster <- raster_to_raster_ops("ndvi.tif", "evi.tif", "add")
diff_raster <- raster_to_raster_ops("before.tif", "after.tif", "subtract")
# Masking operations
masked <- raster_to_raster_ops("data.tif", "mask.tif", "mask")
# Complex overlay with alignment
overlay <- raster_to_raster_ops(
raster1 = "fine_res.tif",
raster2 = "coarse_res.tif",
operation = "overlay",
align_method = "resample",
summary_function = "mean",
verbose = TRUE
)
}
Run the code above in your browser using DataLab