This function is called by the agg_upload module and loads a raster image.
agg_upload(shape, path, name, logger = NULL)
sf. sf object containing the area of interest
character. The location of the file to be loaded.
character. The name of the aggregation raster
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
a SpatRaster object
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, name = "population")