[GRASS-SVN] r71739 - grass-addons/grass7/raster/r.gsflow.hydrodem

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 15 22:34:20 PST 2017


Author: awickert
Date: 2017-11-15 22:34:20 -0800 (Wed, 15 Nov 2017)
New Revision: 71739

Modified:
   grass-addons/grass7/raster/r.gsflow.hydrodem/r.gsflow.hydrodem.py
Log:
r.gsflow.hydrodem: 2-part r.mapcalc overwrite for Windows


Modified: grass-addons/grass7/raster/r.gsflow.hydrodem/r.gsflow.hydrodem.py
===================================================================
--- grass-addons/grass7/raster/r.gsflow.hydrodem/r.gsflow.hydrodem.py	2017-11-15 21:05:15 UTC (rev 71738)
+++ grass-addons/grass7/raster/r.gsflow.hydrodem/r.gsflow.hydrodem.py	2017-11-16 06:34:20 UTC (rev 71739)
@@ -123,7 +123,8 @@
     #g.region(raster=dem)
     v.to_rast(input=streams, output=streams_MODFLOW, use='val', value=1.0,
               type='line', overwrite=gscript.overwrite(), quiet=True)
-    r.mapcalc(streams_MODFLOW+" = "+streams_MODFLOW+" * DEM", overwrite=True)
+    r.mapcalc('tmp'+" = "+streams_MODFLOW+" * DEM", overwrite=True)
+    g.rename(raster=('tmp',streams_MODFLOW), overwrite=True, quiet=True)
     #g.region(res=resolution, quiet=True)
     r.resamp_stats(input=streams_MODFLOW, output=streams_MODFLOW, 
                    method='minimum', overwrite=gscript.overwrite(), quiet=True)



More information about the grass-commit mailing list