[R-sig-Geo] raster() and mixed-projection/resolution files

Jonathan Greenberg greenberg at ucdavis.edu
Tue May 25 04:35:36 CEST 2010


R-sig-geo'ers:

Given two rasters of differing resolutions, extents, and cell sizes,
what is the most efficient way to do some level of raster algebra on
the files, e.g.:

raster1=raster(file1)
raster2=raster(file2)

I would like to add raster1 + raster2 and have the output be the
extent, cell size and projection of file1.   My understanding is
raster()'s map algebra requires the same size/projection of the
inputs, correct?  Thanks!

--j



More information about the R-sig-Geo mailing list