Whoops - somehow a double comma worked its way into the ."Call" lines in the first patch I sent. The attached patch is updated to address that issue. Alex On Fri, May 30, 2014 at 10:48 AM, Alex Zvoleff
<azvoleff at conservation.org> wrote:
Dear list (and Robert Hijmans in particular), I am using the terrain function in the raster package to calculate slope and aspect prior to performing topographic correction. The landsat package supports applying a smoothing factor during the slope calculation, to avoid over-correction of reflectance in high slope areas with low illumination (as suggested by Ria?o, Salas, and Aguado 2003). However I have been using the terrain function in the raster package to calculate slope and aspect since it can handle large rasters and is coded in C. Attached is a patch to allow applying a smoothing factor when calculating slope using the terrain function in raster. Is there a chance of including the attached changes (based on r2994) in the next release of raster? Thanks, Alex Ref: Ria?o D., Chuvieco E., Salas J., and Aguado I., 2003. Assessment of different topographic corrections in Landsat-TM data for mapping vegetation types. IEEE Transactions on Geoscience and Remote Sensing 41: 1056-1061. -- Alex Zvoleff Postdoctoral Associate Tropical Ecology Assessment and Monitoring (TEAM) Network Conservation International 2011 Crystal Dr. Suite 500, Arlington, Virginia 22202, USA Tel: +1-703-341-2749, Fax: +1-703-979-0953, Skype: azvoleff http://www.teamnetwork.org | http://www.conservation.org
Alex Zvoleff Postdoctoral Associate Tropical Ecology Assessment and Monitoring (TEAM) Network Conservation International 2011 Crystal Dr. Suite 500, Arlington, Virginia 22202, USA Tel: +1-703-341-2749, Fax: +1-703-979-0953, Skype: azvoleff http://www.teamnetwork.org | http://www.conservation.org -------------- next part -------------- A non-text attachment was scrubbed... Name: smoothing_factor_v2.patch Type: application/octet-stream Size: 8350 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140603/1a04d80a/attachment.obj>