[GRASS-SVN] r59710 - grass-addons/grass7/raster/r.basin

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Apr 13 07:14:10 PDT 2014


Author: madi
Date: 2014-04-13 07:14:10 -0700 (Sun, 13 Apr 2014)
New Revision: 59710

Modified:
   grass-addons/grass7/raster/r.basin/r.basin.py
Log:
beautify messages to user

Modified: grass-addons/grass7/raster/r.basin/r.basin.py
===================================================================
--- grass-addons/grass7/raster/r.basin/r.basin.py	2014-04-13 14:06:30 UTC (rev 59709)
+++ grass-addons/grass7/raster/r.basin/r.basin.py	2014-04-13 14:14:10 UTC (rev 59710)
@@ -589,7 +589,7 @@
                                                         elevation = 'r_elevation_crop' )
         
                                                         
-        print "##################################"         
+        print " ------------------------------ "         
         print "Output of r.stream.stats: "
         print  stream_stats
        
@@ -713,9 +713,9 @@
             writer.writerow(['Slope ratio (Horton) '] + [Slope_ratio])
         
         grass.message( "\n" ) 
-        grass.message( "##################################" )
+        grass.message( "----------------------------------" )
         grass.message( "Morphometric parameters of basin :" )
-        grass.message( "##################################\n" )	
+        grass.message( "----------------------------------\n" )	
         grass.message( "Easting Centroid of basin : %s " % basin_east )
         grass.message( "Northing Centroid of Basin : %s " % basin_north )
         grass.message( "Rectangle containing basin N-W : %s , %s " % nw ) 
@@ -748,18 +748,17 @@
         grass.message( "Length Ratio (Horton) : %s " % Len_ratio )
         grass.message( "Area ratio (Horton) : %s " % Area_ratio )
         grass.message( "Slope ratio (Horton): %s " % Slope_ratio )
-        grass.message( "##################################" ) 
+        grass.message( "------------------------------" ) 
         grass.message( "\n" )
         grass.message( "Done!")
         
     except:
 	    grass.message( "\n" )
-	    grass.message( "##################################" ) 
+	    grass.message( "------------------------------" ) 
 	    grass.message( "\n" ) 
-	    grass.message( "An error occurred with the parameters calculation." )
-	    grass.message( "Please note that outlet coordinates must belong to the river network." )
-	    grass.message( "You might want to run r.stream.extract and choose coordinates matching with the extracted stream map." )
-	    grass.message( "Please report to the authors any other problem not related with coordinates outlet." )
+	    grass.message( "An ERROR occurred running r.basin" )
+	    grass.message( "Please try with another pairs of outlet coordinates" )
+
 	    
     # Set region to original 
     grass.read_command('g.region', flags = 'p', region = 'original')



More information about the grass-commit mailing list