library(raster)
library(sf)
library(landscapemetrics)
library(dplyr)
library(ggplot2)
library(mapview)
The user would be able to generate several scenarios by assigning different crops to their agricultural patches.
# Read rasters with crop data - to be used directly for landscapemetrics::sample_lsm()
rst <- list.files(path = "data", pattern = "\\.tif", full.names = TRUE) %>%
lapply(FUN = raster)
# Read polygons with crop data
polys <- read_sf("data/AOIParcelsWithInfo.shp")
# Read biogas plant location
load(file = "data/biogas.plant.sf.rda")
pts <- as(biogas.plant.sf, Class = "Spatial")
Below one can see three different crop scenarios. Scenario 2 is an extreme example of when an user would decide to plant one single type of species on her/his agricultural patches (monocultures).
polys <- polys %>% select(land_cover = LndCvrT,
matches("Crops"))
mapview(polys, zcol = "Crops1")
mapview(polys, zcol = "Crops2")
mapview(polys, zcol = "Crops3")