Revision 6c9ca794
Added by Jim Regetz over 12 years ago
- ID 6c9ca79410d15d84f946431a07ce39d30070378e
- Child a92ae83f
terrain/research/oregon/multiscalesmooth.py | ||
---|---|---|
217 | 217 |
i = j + 1 |
218 | 218 |
gs.message('Refining from %d to %d' % (i, j), flag='i') |
219 | 219 |
|
220 |
refine_region() |
|
221 |
gs.run_command('r.resample', input=smooth, output=smooth, |
|
222 |
overwrite=True, quiet=True) |
|
223 |
gs.run_command('r.resample', input='v.smooth', output='v.smooth', |
|
224 |
overwrite=True, quiet=True) |
|
225 |
|
|
226 | 220 |
# create smoothed higher resolution versions of z and v |
227 | 221 |
# using weight matrix equivalent to ArcGIS circle with radius 2 |
228 |
gs.run_command('r.neighbors', flags='c', input=smooth, |
|
222 |
refine_region() |
|
223 |
gs.run_command('r.neighbors', flags='ac', input=smooth, |
|
229 | 224 |
output='zs', method='average', size=5, overwrite=True, |
230 | 225 |
quiet=True) |
231 | 226 |
tmp_rast.add('zs') |
232 |
gs.run_command('r.neighbors', flags='c', input='v.smooth', |
|
227 |
gs.run_command('r.neighbors', flags='ac', input='v.smooth',
|
|
233 | 228 |
output='vs', method='average', size=5, overwrite=True, |
234 | 229 |
quiet=True) |
235 | 230 |
tmp_rast.add('vs') |
Also available in: Unified diff
simplified code by using 'a' flag for r.neighbors (improves 3abda63)