[GRASS-SVN] r57020 - grass/trunk/scripts/r.fillnulls
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jul 5 04:43:12 PDT 2013
Author: marisn
Date: 2013-07-05 04:43:12 -0700 (Fri, 05 Jul 2013)
New Revision: 57020
Modified:
grass/trunk/scripts/r.fillnulls/r.fillnulls.py
Log:
Allow user to adjust npmin and segmax values for RST interpolator.
High default values choosen to promote no segmentation for smaller holes as data around holes are not
uniformly distributed and thus prone to segment edge problem.
Modified: grass/trunk/scripts/r.fillnulls/r.fillnulls.py
===================================================================
--- grass/trunk/scripts/r.fillnulls/r.fillnulls.py 2013-07-05 10:51:09 UTC (rev 57019)
+++ grass/trunk/scripts/r.fillnulls/r.fillnulls.py 2013-07-05 11:43:12 UTC (rev 57020)
@@ -58,6 +58,24 @@
#% guisection: RST options
#%end
#%option
+#% key: npmin
+#% type: integer
+#% description: Minimum number of points for approximation in a segment (>segmax)
+#% required : no
+#% answer : 600
+#% options : 2-10000
+#% guisection: RST options
+#%end
+#%option
+#% key: segmax
+#% type: integer
+#% description: Maximum number of points in a segment
+#% required : no
+#% answer : 300
+#% options : 2-10000
+#% guisection: RST options
+#%end
+#%option
#% key: method
#% type: string
#% description: Interpolation method
@@ -97,6 +115,8 @@
smooth = options['smooth']
method = options['method']
edge = int(options['edge'])
+ segmax = int(options['segmax'])
+ npmin = int(options['npmin'])
quiet = True # FIXME
mapset = grass.gisenv()['MAPSET']
@@ -248,16 +268,6 @@
failed_list.append(holename)
continue
- grass.message(_("Note: The following warnings about number of points for interpolation may be ignored."))
-
- # set the max number before segmentation
- # npmin and segmax values were choosen by fair guess and thus are superior to all other values ;)
- segmax = 100
- npmin = 300
- if pointsnumber < 600:
- npmin = pointsnumber
- segmax = pointsnumber
-
# launch v.surf.rst
tmp_rmaps.append(holename + '_dem')
if grass.run_command('v.surf.rst', quiet = quiet, input = holename, elev = holename + '_dem',
More information about the grass-commit
mailing list