Revision 40cd02ba
Added by Jim Regetz over 12 years ago
- ID 40cd02ba1f17d73e766c5806e11494e23bd337fc
terrain/research/oregon/arcgis/v2/multiscalesmooth9a_clean.R | ||
---|---|---|
195 | 195 |
#setwindow maxof |
196 | 196 |
|
197 | 197 |
# create smoothed higher resolution versions of z and v_bg, hopefully with no nulls! |
198 |
# [suppressing warnings to avoid .couldBeLonLat complaints] |
|
199 |
suppressWarnings({ |
|
200 |
hs.tmp <- disaggregate(focal(hs[[j]], w=circle2, fun=mean, |
|
201 |
pad=TRUE, padValue=NA, na.rm=TRUE), 3) |
|
202 |
vs.tmp <- disaggregate(focal(vs[[j]], w=circle2, fun=mean, |
|
203 |
pad=TRUE, padValue=NA, na.rm=TRUE), 3) |
|
204 |
}) |
|
198 |
hs.tmp <- focal(disaggregate(hs[[j]], 3), w=circle2, fun=mean, |
|
199 |
pad=TRUE, padValue=NA, na.rm=TRUE) |
|
200 |
vs.tmp <- focal(disaggregate(vs[[j]], 3), w=circle2, fun=mean, |
|
201 |
pad=TRUE, padValue=NA, na.rm=TRUE) |
|
205 | 202 |
|
206 | 203 |
# create no-null version of finer z and v |
207 | 204 |
h_c <- calc(z[[j-1]], function(x) ifelse(is.na(x), 0, x)) |
Also available in: Unified diff
reversed order of refine-and-smooth step