[GRASS-SVN] r65816 - grass-addons/grass7/raster/r.fidimo
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Aug 3 01:16:34 PDT 2015
Author: jradinger
Date: 2015-08-03 01:16:34 -0700 (Mon, 03 Aug 2015)
New Revision: 65816
Modified:
grass-addons/grass7/raster/r.fidimo/r.fidimo.py
Log:
Allow input river raster to be >=0 (incl. 0), background = NULL
Modified: grass-addons/grass7/raster/r.fidimo/r.fidimo.py
===================================================================
--- grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2015-08-03 05:58:32 UTC (rev 65815)
+++ grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2015-08-03 08:16:34 UTC (rev 65816)
@@ -19,7 +19,7 @@
#% key: river
#% type: string
#% gisprompt: old,cell,raster
-#% description: River network (raster-file, e.g. output from r.stream.extract or fidimo.river)
+#% description: River network (raster, e.g. output from r.watershed)
#% required: no
#% guisection: Stream parameters
#%end
@@ -389,12 +389,13 @@
# Populate input-river (raster) with value of resolution
# *1.0 to get float raster instead of integer
- grass.mapcalc("$river_raster = if($river,$res*1.0)",
+ grass.mapcalc("$river_raster = if(!isnull($river),$res*1.0,null())",
river_raster = "river_raster_tmp_%d" % os.getpid(),
river = river,
- res = res)
+ res = res,
+ overwrite=True)
+
-
# Converting river_raster to river_vector
grass.run_command("r.to.vect",
overwrite = True,
More information about the grass-commit
mailing list