How can one levelplot
a raster
of say mean temperature on the hillshade provided by a DEM of the area of interest? Consider the example below (from Robert H):
library(raster)
library(rasterVis)
dem <- getData('alt', country='CHE')# get DEM for region of interest
slas <- slopeAspect(dem)#get slope and aspect
hill <- hillShade(slas[[1]], slas[[2]], 40, 270)# compute hillshade
plot(hill, col=grey(0:100/100), legend=FALSE, main='Switzerland')
- I like the hillshade because it shows clearly the hills and valleys etc.
- Now given a raster of mean temperature for Switzerland, how can I overlay it on the hill just like
plot(dem, col=rainbow(25, alpha=0.35), add=TRUE)
? I am usinglevelplot
function for my mapping. - The temperature data set can be obtained from
climate <- getData('worldclim', var='bio', res=2.5)
and thenplot(climate$bio1, main="Annual Mean Temperature")
The desired output should look like the image below but temperature instead of DEM.
Any thoughts on this?