[R-sig-Geo] Function to smooth grids using n x n window moving average (low-pass filter)
piero campa
piero.campa at gmail.com
Wed Jan 19 17:56:46 CET 2011
Very quick method Paul,
I tried on my own by simple pixel by pixel computing and the result is much
slower.
Good work.
Anyway I was trying to understand how to yield a small modification to your
code:
having a SpatiaGridDataFrame with NA holes, I noticed that the borderline
pixels turn to NA too (and that's because x + NA = NA in R by default),
letting theholes grow proportionally to the kernel size (just like the
border pixels in a fullgrid data frame).
I was trying to do add the ability to ignore NAs (just like it's in the sum
method with na.rm = TRUE).
I can't find the way however.
Thank for any suggestion !
Cheers,
Piero
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Function-to-smooth-grids-using-n-x-n-window-moving-average-low-pass-filter-tp2765093p5940465.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list