[GRASS-SVN] r57483 - grass-addons/grass6/raster/r.fidimo

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 22 01:56:26 PDT 2013


Author: jradinger
Date: 2013-08-22 01:56:25 -0700 (Thu, 22 Aug 2013)
New Revision: 57483

Modified:
   grass-addons/grass6/raster/r.fidimo/r.fidimo.py
Log:
Solving minor syntax error in mapcalc expression

Modified: grass-addons/grass6/raster/r.fidimo/r.fidimo.py
===================================================================
--- grass-addons/grass6/raster/r.fidimo/r.fidimo.py	2013-08-22 06:59:52 UTC (rev 57482)
+++ grass-addons/grass6/raster/r.fidimo/r.fidimo.py	2013-08-22 08:56:25 UTC (rev 57483)
@@ -455,7 +455,7 @@
 							drainage_tmp = "drainage_tmp_%d" % os.getpid())
 
 	# Stream segments depicts new river_raster (corrected for small tributaries of 1 cell)	
-	grass.mapcalc("$river_raster_combine_tmp = if($stream_segments_tmp && $river_raster_tmp,$res*1.0)",
+	grass.mapcalc("$river_raster_combine_tmp = if(!isnull($stream_segments_tmp) && !isnull($river_raster_tmp),$res*1.0,null())",
 							river_raster_combine_tmp =  "river_raster_combine_tmp_%d" % os.getpid(),
 							river_raster_tmp =  "river_raster_tmp_%d" % os.getpid(),
 							stream_segments_tmp = "stream_segments_tmp_%d" % os.getpid(),



More information about the grass-commit mailing list