[GRASS-SVN] r57484 - grass-addons/grass7/raster/r.fidimo
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 22 01:56:48 PDT 2013
Author: jradinger
Date: 2013-08-22 01:56:47 -0700 (Thu, 22 Aug 2013)
New Revision: 57484
Modified:
grass-addons/grass7/raster/r.fidimo/r.fidimo.py
Log:
Solving minor syntax error in mapcalc expression
Modified: grass-addons/grass7/raster/r.fidimo/r.fidimo.py
===================================================================
--- grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2013-08-22 08:56:25 UTC (rev 57483)
+++ grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2013-08-22 08:56:47 UTC (rev 57484)
@@ -470,12 +470,11 @@
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(),
res = res)
-
grass.run_command("g.copy",
overwrite=True,
rast = "river_raster_combine_tmp_%d" % os.getpid() + "," "river_raster_tmp_%d" % os.getpid())
More information about the grass-commit
mailing list