I need to stack multiple maps (tif) together and clip them all according to extent of one small raster map (second raster at the top of picture below). However, the size of pixels in each map is different. Is there any way how to make process visualized bellow?
Please, answer only R-solution or QGIS-solution.
library(raster) e1<-extent(c(0,6,0,6)) r1<-raster(nrows=3,ncols=3,ext=e1) values(r1)<-c(0,4,1,0,1,1,1,2,3) plot(r1) e2<-extent(c(2,5,2,5)) r2<-raster(nrows=4,ncols=3,ext=e2) values(r2)<-c(0,8,2,1,4,9,9,4,0,8,0,0) plot(r2)