[GRASS-SVN] r62490 - grass-addons/grass7/raster/r.rock.stability

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 30 05:05:09 PDT 2014


Author: kikapu
Date: 2014-10-30 05:05:09 -0700 (Thu, 30 Oct 2014)
New Revision: 62490

Modified:
   grass-addons/grass7/raster/r.rock.stability/r.rock.stability.py
Log:
r.rock.stability: upgrade

Modified: grass-addons/grass7/raster/r.rock.stability/r.rock.stability.py
===================================================================
--- grass-addons/grass7/raster/r.rock.stability/r.rock.stability.py	2014-10-30 10:45:03 UTC (rev 62489)
+++ grass-addons/grass7/raster/r.rock.stability/r.rock.stability.py	2014-10-30 12:05:09 UTC (rev 62490)
@@ -15,8 +15,9 @@
 #
 ##############################################################################
 #%Module
-#%  description: Calculates SMR index for a slope area.
-#%  keywords: rock mass, planar failure, toppling
+#% description: Calculates SMR index for a slope area.
+#% keywords: rock mass, planar failure, toppling
+#% overwrite: yes
 #%End
 #%option
 #% key: dem
@@ -57,7 +58,6 @@
 #%option
 #% key: prefix
 #% type: string
-#% gisprompt: new,raster,raster
 #% description: Prefix for output maps
 #% required: yes
 #%end
@@ -206,14 +206,12 @@
         SMRsciv = prefix + '_SMRsciv' ,
         RMR = RMR ,
         F4 = f4 ,
-        overwrite = True ,
         quiet = True)
 
     grass.mapcalc("$SMRrib = Irib + $RMR + $F4" ,
         SMRrib = prefix + '_SMRrib' ,
         RMR = RMR ,
         F4 = f4 ,
-        overwrite = True ,
         quiet = True)
 ########################################################
 ############################SMR_wedge###################
@@ -306,7 +304,9 @@
             overwrite = True ,
             quiet = True)
         grass.run_command('g.remove' , 
-            rast=(
+            flags = 'f' ,
+            type = 'rast' ,
+            name = (
                 'Asci' ,
                 'Arib' ,
                 'F1sci_' ,
@@ -415,7 +415,9 @@
             quiet = True)
 #elimino mappe
         grass.run_command('g.remove' , 
-            rast=(
+            flags = 'f' ,
+            type = 'rast' ,
+            name = (
                 'slopes_' ,
                 'aspects_' ,
                 'aspects_1' ,
@@ -449,8 +451,10 @@
                 'cinem_rib') ,
             quiet = True)
     else:
-        grass.run_command('g.remove' , 
-            rast=(
+        grass.run_command('g.remove', 
+            flags = 'f', 
+            type = 'rast', 
+            name = (
                 'slopes_' ,
                 'aspects_' ,
                 'aspects_1' ,
@@ -468,6 +472,7 @@
                 'Isciv' ,
                 'Irib' ) ,
             quiet = True)
+
     grass.message("Done!")
 if __name__ == "__main__":
     options, flags = grass.parser()



More information about the grass-commit mailing list