I have about 1,000 rasters which are around 10km x 10km and partially overlap to cover a whole country.
I would like to convert these into a single national raster, and where raster overlap, add the cell values together.
Currently, I am using ArcGIS's workspace to new raster tool, but I would like to replicate the process in the R language.
I've tried a couple of things but usually end up with only the intersection of the rasters. Many of the solutions on StackExchange advocate cropping to a common area, which is the exact opposite of what I want.
IS there a general solution for aligning two rasters and then making a mosaic which has the combined extent of both rasters?
Can this method be scaled to work for thousands of rasters?
EDIT
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rgdal_1.2-5 raster_2.5-8 sp_1.2-4
loaded via a namespace (and not attached):
[1] tools_3.3.2 Rcpp_0.12.9 grid_3.3.2 lattice_0.20-34
> rasterOptions()
format : raster
datatype : FLT8S
overwrite : FALSE
progress : none
timer : FALSE
chunksize : 1e+07
maxmemory : 1e+08
tmpdir : D:/RTemp\RtmpgzISfL/raster/
tmptime : 168
setfileext : TRUE
tolerance : 0.5
standardnames : TRUE
warn depracat.: TRUE
header : none