Skip to contents

This function matches the simulated cloud so that it is on the same extent and projection as the original raster

Usage

match_rasters(raster, cloud, trace = FALSE)

Arguments

raster

original raster to match to.

cloud

simulated cloud

trace

will show some feedback if needed.

Value

matched cloud raster

Examples

library(raster)
plot(example_raster)

cloud <- simulate_cloud(phi = 0.1, seed = 2023)
# \donttest{
example_cloud <- match_rasters(example_raster, cloud, trace = TRUE)
#> class      : Extent 
#> xmin       : 0.5 
#> xmax       : 70.5 
#> ymin       : 0.5 
#> ymax       : 70.5 
#> class      : Extent 
#> xmin       : 426885 
#> xmax       : 664215 
#> ymin       : 7019185 
#> ymax       : 7231015 
#> [1] NA
#> [1] "+proj=utm +zone=55 +south +datum=WGS84 +units=m +no_defs"
plot(example_cloud)

# }