This function is called by the agg_upload module and loads a raster image.

agg_upload(shape, path, logger = NULL)

Arguments

shape

sf. sf object containing the area of interest

path

character. The location of the file to be loaded.

logger

Stores all notification messages to be displayed in the Log Window. Insert the logger reactive list here for running in shiny, otherwise leave the default NULL

Value

a SpatRaster object

Author

Simon Smart simon.smart@cantab.net

Examples

path <- list.files(system.file("extdata/aggregation",
        package="disagapp"), full.names = TRUE)
shp_file <- list.files(system.file("extdata/shapes",
        package="disagapp"), pattern = ".shp", full.names = TRUE)
shape <- sf::st_read(shp_file, quiet = TRUE)
raster <- agg_upload(shape = shape, path = path)