# \donttest{
# Define file names
ex_sel <- system.file(
"extdata/out/S2A2A_20190723_022_Barbellino_BOA_10.tif",
package = "sen2r"
)
ex_ref <- system.file(
"extdata/out/S2A2A_20190723_022_Barbellino_SCL_10.tif",
package = "sen2r"
)
ex_out <- tempfile(fileext = "_BOA_out.tif")
# Run function
sen2r:::gdalwarp_grid(ex_sel, ex_out, ref = ex_ref)
# Show output
oldpar <- par(mfrow = c(1,3), mar = rep(0,4))
image(stars::read_stars(ex_sel), rgb = 4:2, maxColorValue = 3500, useRaster = TRUE)
par(mar = rep(2/3,4))
image(stars::read_stars(ex_ref), useRaster = TRUE)
par(mar = rep(0,4))
image(stars::read_stars(ex_out), rgb = 4:2, maxColorValue = 3500, useRaster = TRUE)
par(oldpar)
# }
Run the code above in your browser using DataLab