Browse Source

r.fillnulls: added memory parameter for internal r.resamp.bspline call

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73549 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 6 years ago
parent
commit
dfaf2e402e
1 changed files with 13 additions and 1 deletions
  1. 13 1
      scripts/r.fillnulls/r.fillnulls.py

+ 13 - 1
scripts/r.fillnulls/r.fillnulls.py

@@ -14,7 +14,7 @@
 # PURPOSE:      fills NULL (no data areas) in raster maps
 # PURPOSE:      fills NULL (no data areas) in raster maps
 #               The script respects a user mask (MASK) if present.
 #               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
 #               This program is free software under the GNU General Public
 #               License (>=v2). Read the file COPYING that comes with GRASS
 #               License (>=v2). Read the file COPYING that comes with GRASS
@@ -97,6 +97,15 @@
 #% answer: 0.01
 #% answer: 0.01
 #% guisection: Spline options
 #% guisection: Spline options
 #%end
 #%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
 import sys
@@ -142,6 +151,7 @@ def main():
     segmax = int(options['segmax'])
     segmax = int(options['segmax'])
     npmin = int(options['npmin'])
     npmin = int(options['npmin'])
     lambda_ = float(options['lambda'])
     lambda_ = float(options['lambda'])
+    memory = options['memory']
     quiet = True  # FIXME
     quiet = True  # FIXME
     mapset = grass.gisenv()['MAPSET']
     mapset = grass.gisenv()['MAPSET']
     unique = str(os.getpid())  # Shouldn't we use temp name?
     unique = str(os.getpid())  # Shouldn't we use temp name?
@@ -463,6 +473,7 @@ def main():
                     ew_step=3 * reg['ewres'],
                     ew_step=3 * reg['ewres'],
                     ns_step=3 * reg['nsres'],
                     ns_step=3 * reg['nsres'],
                     lambda_=lambda_,
                     lambda_=lambda_,
+                    memory=memory,
                     flags='n',
                     flags='n',
                     stderr=subprocess.PIPE,
                     stderr=subprocess.PIPE,
                     env=new_env)
                     env=new_env)
@@ -483,6 +494,7 @@ def main():
                     ew_step=3 * reg['ewres'],
                     ew_step=3 * reg['ewres'],
                     ns_step=3 * reg['nsres'],
                     ns_step=3 * reg['nsres'],
                     lambda_=lambda_,
                     lambda_=lambda_,
+                    memory=memory,
                     flags='n',
                     flags='n',
                     stderr=subprocess.PIPE,
                     stderr=subprocess.PIPE,
                     env=new_env)
                     env=new_env)