[GRASS-SVN] r57472 - grass-addons/grass7/raster/r.fidimo
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 20 02:35:46 PDT 2013
Author: jradinger
Date: 2013-08-20 02:35:46 -0700 (Tue, 20 Aug 2013)
New Revision: 57472
Modified:
grass-addons/grass7/raster/r.fidimo/r.fidimo.py
Log:
Small changes related to small (1-cell) tributaries:
Now segment-output from r.watershed (thinned river segements) is used as river_raster (ignoring intial small tributaries)
Modified: grass-addons/grass7/raster/r.fidimo/r.fidimo.py
===================================================================
--- grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2013-08-19 15:59:23 UTC (rev 57471)
+++ grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2013-08-20 09:35:46 UTC (rev 57472)
@@ -469,6 +469,12 @@
stream_rwatershed_tmp = "stream_rwatershed_tmp_%d" % os.getpid(),
drainage_tmp = "drainage_tmp_%d" % os.getpid())
+ # Stream segments depicts new river_raster (corrected for small tributaries of 1 cell)
+ grass.mapcalc("$river_raster_tmp = if($stream_segments_tmp,$res*1.0)",
+ river_raster_tmp = "river_raster_tmp_%d" % os.getpid(),
+ stream_segments_tmp = "stream_segments_tmp_%d" % os.getpid(),
+ res = res)
+
#Calculation of stream order (Shreve/Strahler)
grass.run_command("r.stream.order",
More information about the grass-commit
mailing list