Description Usage Arguments Value See Also Examples
Function to resample LandClim maps of any resolution to required resolution of 25 m (or 30 m).
1 | resample_landclim_maps(landClimRasterStack, targetResolution = 25)
|
landClimRasterStack |
Raster stack (with all required input maps) |
targetResolution |
Raster stack ready to be written in LandClim format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | gk_projection<-CRS("+init=epsg:31467")
require(raster)
nr <- 20
nc <- 20
res <- 45
ex <- extent(0, nc*res, 0, nr*res)
dem <- raster(nrows=nr, ncols=nc, ex)
projection(dem) <- gk_projection
dem[] <- rep(seq(500, 2200,len=nr), each=nc)
### LandClim map "slope" and "aspect".
slope <- terrain(dem, filename="slopeAspect.tif", opt='slope', unit="degrees", overwrite = TRUE)
slope[]<- 0
### LandClim map "soil".
soil <- dem
soil[] <- 20
soil ### Check min, max values
### LandClim map "landtype".
landtype <- slope
landtype[] <- 1
### Aspect (dummy)
aspect <- slope
aspect[] <- 0
### LandClim map "nitrogen".
nitro <- slope
nitro[] <- 1
### Create raster-stack
maps <- stack(dem, slope, aspect, soil, landtype, nitro)
names(maps) <- c("dem", "slope", "aspect", "soil", "landtype", "nitro")
maps25 <- resample_landclim_maps(landClimRasterStack=maps)
plot(maps25$dem)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.