align_rasters function added to gdalUtils 0.3.5
Folks: I added a beta of a new function "align_rasters" to gdalUtils 0.3.5 (currently on r-forge): http://r-forge.r-project.org/R/?group_id=1695 This is a fairly frequently requested function, where you want to "coerce" one raster to match the projection, extent, and resolution of another one (e.g. setting up a time series stack, or taking data from multiple sources for use with a species distribution model). I have something similar in spatial.tools (spatial_sync_raster), but align_rasters is MUCH faster since it uses the native gdal binaries to do the processing. You should check out the options in ?gdalwarp to see what additional parameters you can send to align_rasters, but for the most part the only thing you might want to mod is the resampling method (e.g. align_rasters(...,r="near") ). Also, and this is somewhat untested, you can use multi=TRUE and it will, in theory, run the alignment using multiple processors. Let me know if you run into any bugs or want to see any features added. Cheers! --j
Jonathan A. Greenberg, PhD Assistant Professor Global Environmental Analysis and Remote Sensing (GEARS) Laboratory Department of Geography and Geographic Information Science University of Illinois at Urbana-Champaign 259 Computing Applications Building, MC-150 605 East Springfield Avenue Champaign, IL 61820-6371 Phone: 217-300-1924 http://www.geog.illinois.edu/~jgrn/ AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307, Skype: jgrn3007