[GRASS-SVN] r59235 - grass/trunk/scripts/r.grow
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Mar 11 09:58:50 PDT 2014
Author: marisn
Date: 2014-03-11 09:58:46 -0700 (Tue, 11 Mar 2014)
New Revision: 59235
Modified:
grass/trunk/scripts/r.grow/r.grow.py
Log:
Stop on failure of r.grow.distance
Modified: grass/trunk/scripts/r.grow/r.grow.py
===================================================================
--- grass/trunk/scripts/r.grow/r.grow.py 2014-03-11 16:18:55 UTC (rev 59234)
+++ grass/trunk/scripts/r.grow/r.grow.py 2014-03-11 16:58:46 UTC (rev 59235)
@@ -105,10 +105,11 @@
#check if input file exists
if not grass.find_file(input)['file']:
- grass.fatal(_("<%s> does not exist.") % input)
+ grass.fatal(_("Map <%s> does not exist.") % input)
- grass.run_command('r.grow.distance', input = input, metric = metric,
- distance = temp_dist, value = temp_val)
+ if grass.run_command('r.grow.distance', input = input, metric = metric,
+ distance = temp_dist, value = temp_val) != 0:
+ grass.fatal(_("Growing failed. Removing temporary maps."))
grass.mapcalc(
"$output = if(!isnull($input),$old,if($dist < $radius,$new,null()))",
More information about the grass-commit
mailing list