[GRASS-SVN] r50796 - grass/trunk/scripts/r.fillnulls

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 13 10:01:05 EST 2012


Author: mmetz
Date: 2012-02-13 07:01:04 -0800 (Mon, 13 Feb 2012)
New Revision: 50796

Modified:
   grass/trunk/scripts/r.fillnulls/r.fillnulls.py
Log:
restore real region at the end, do not change input raster geometry

Modified: grass/trunk/scripts/r.fillnulls/r.fillnulls.py
===================================================================
--- grass/trunk/scripts/r.fillnulls/r.fillnulls.py	2012-02-13 14:55:21 UTC (rev 50795)
+++ grass/trunk/scripts/r.fillnulls/r.fillnulls.py	2012-02-13 15:01:04 UTC (rev 50796)
@@ -203,9 +203,6 @@
 			    se = 3 * reg['ewres'], sn = 3 * reg['nsres'], 
 			    flags = 'n')
 
-    # restore the real region
-    grass.del_temp_region()
-
     # restoring user's mask, if present:
     if grass.find_file(usermask, mapset = mapset)['file']:
 	grass.message(_("Restoring user mask (MASK)..."))
@@ -216,6 +213,9 @@
     # we can use --o here as g.parser already checks on startup
     grass.run_command('r.patch', input = (input,tmp1 + '_filled'), output = output, overwrite = True)
 
+    # restore the real region
+    grass.del_temp_region()
+
     grass.message(_("Filled raster map is: %s") % output)
 
     # write cmd history:



More information about the grass-commit mailing list