[GRASS-SVN] r72029 - grass/trunk/scripts/r.fillnulls
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jan 4 15:05:09 PST 2018
Author: marisn
Date: 2018-01-04 15:05:09 -0800 (Thu, 04 Jan 2018)
New Revision: 72029
Modified:
grass/trunk/scripts/r.fillnulls/r.fillnulls.py
Log:
r.fillnulls: Fix RST segmax/npmin logic.
Current version errornously was discarding user provided values (as implemented by me at r57030)
This bug was causing segmentation even for small holes.
Modified: grass/trunk/scripts/r.fillnulls/r.fillnulls.py
===================================================================
--- grass/trunk/scripts/r.fillnulls/r.fillnulls.py 2018-01-04 16:54:48 UTC (rev 72028)
+++ grass/trunk/scripts/r.fillnulls/r.fillnulls.py 2018-01-04 23:05:09 UTC (rev 72029)
@@ -340,8 +340,11 @@
# Avoid v.surf.rst warnings
if pointsnumber < segmax:
- npmin = pointsnumber + 1
- segmax = pointsnumber
+ use_npmin = pointsnumber
+ use_segmax = pointsnumber * 2
+ else:
+ use_npmin = npmin
+ use_segmax = segmax
# launch v.surf.rst
tmp_rmaps.append(holename + '_dem')
@@ -349,7 +352,7 @@
grass.run_command('v.surf.rst', quiet=quiet,
input=holename, elev=holename + '_dem',
tension=tension, smooth=smooth,
- segmax=segmax, npmin=npmin)
+ segmax=use_segmax, npmin=use_npmin)
except CalledModuleError:
# GTC Hole is NULL area in a raster map
grass.fatal(_("Failed to fill hole %s") % cat)
More information about the grass-commit
mailing list