Calculate the SpatRasters needed for the terrain model.
Arguments
- terrain
Terrain model (elevation + land cover).
TRUEdownloads a DEM viaelevatr. Pass a DEM raster to skip the download. Per-cell values are computed once and stored in the result asterrainModelforplot_result()/random_search().- area
Site polygon (
sf, SpatialPolygons, or coordinate matrix). Must be projected in metres.- ccl
Path to a Corine Land Cover raster when
terrainis on.- ccl_roughness
Path to the CLC legend CSV (
Rauhigkeit_zcolumn).- plot
Plot the elevation and roughness rasters
- verbose
Print a line per generation.
Examples
if (FALSE) { # \dontrun{
library(sf)
area <- sf::st_as_sf(sf::st_sfc(
sf::st_polygon(list(cbind(
c(4651704, 4651704, 4654475, 4654475, 4651704),
c(2692925, 2694746, 2694746, 2692925, 2692925)
))),
crs = 3035
))
Polygon_wgs84 <- sf::st_transform(area, st_crs(4326))
srtm <- elevatr::get_elev_raster(locations = Polygon_wgs84, z = 11)
res <- terrain_model(srtm, area)
} # }