[GRASS-SVN] r73550 - grass/branches/releasebranch_7_6/scripts/r.fillnulls

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 15 02:27:46 PDT 2018


Author: neteler
Date: 2018-10-15 02:27:46 -0700 (Mon, 15 Oct 2018)
New Revision: 73550

Modified:
   grass/branches/releasebranch_7_6/scripts/r.fillnulls/r.fillnulls.py
Log:
r.fillnulls: added memory parameter for internal r.resamp.bspline call (trunk, r73549)

Modified: grass/branches/releasebranch_7_6/scripts/r.fillnulls/r.fillnulls.py
===================================================================
--- grass/branches/releasebranch_7_6/scripts/r.fillnulls/r.fillnulls.py	2018-10-15 09:27:12 UTC (rev 73549)
+++ grass/branches/releasebranch_7_6/scripts/r.fillnulls/r.fillnulls.py	2018-10-15 09:27:46 UTC (rev 73550)
@@ -14,7 +14,7 @@
 # PURPOSE:      fills NULL (no data areas) in raster maps
 #               The script respects a user mask (MASK) if present.
 #
-# COPYRIGHT:    (C) 2001-2016 by the GRASS Development Team
+# COPYRIGHT:    (C) 2001-2018 by the GRASS Development Team
 #
 #               This program is free software under the GNU General Public
 #               License (>=v2). Read the file COPYING that comes with GRASS
@@ -97,6 +97,15 @@
 #% answer: 0.01
 #% guisection: Spline options
 #%end
+#%option
+#% key: memory
+#% type: integer
+#% required: no
+#% multiple: no
+#% label: Maximum memory to be used (in MB)
+#% description: Cache size for raster rows
+#% answer: 300
+#%end
 
 
 import sys
@@ -141,6 +150,7 @@
     segmax = int(options['segmax'])
     npmin = int(options['npmin'])
     lambda_ = float(options['lambda'])
+    memory = options['memory']
     quiet = True  # FIXME
     mapset = grass.gisenv()['MAPSET']
     unique = str(os.getpid())  # Shouldn't we use temp name?
@@ -450,12 +460,12 @@
             grass.run_command('r.resamp.bspline', input=input, mask=usermask,
                               output=prefix + 'filled', method=method,
                               ew_step=3 * reg['ewres'], ns_step=3 * reg['nsres'],
-                              lambda_=lambda_, flags='n')
+                              lambda_=lambda_, memory=memory, flags='n')
         else:
             grass.run_command('r.resamp.bspline', input=input,
                               output=prefix + 'filled', method=method,
                               ew_step=3 * reg['ewres'], ns_step=3 * reg['nsres'],
-                              lambda_=lambda_, flags='n')
+                              lambda_=lambda_, memory=memory, flags='n')
 
     # restoring user's mask, if present:
     if usermask:



More information about the grass-commit mailing list