[GRASS-SVN] r64893 - grass-addons/grass7/raster/r.valley.bottom

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 21 16:02:09 PDT 2015


Author: hellik
Date: 2015-03-21 16:02:09 -0700 (Sat, 21 Mar 2015)
New Revision: 64893

Modified:
   grass-addons/grass7/raster/r.valley.bottom/r.valley.bottom.py
Log:
slope calculation: r.slope.aspect -> r.resamp.rst slope (avoid region extent shrinking)

Modified: grass-addons/grass7/raster/r.valley.bottom/r.valley.bottom.py
===================================================================
--- grass-addons/grass7/raster/r.valley.bottom/r.valley.bottom.py	2015-03-21 10:43:17 UTC (rev 64892)
+++ grass-addons/grass7/raster/r.valley.bottom/r.valley.bottom.py	2015-03-21 23:02:09 UTC (rev 64893)
@@ -89,12 +89,11 @@
     grass.message( "----" )
     grass.message( "Step 1: Calculation of slope" )
     grass.message( "..." )	
-    grass.run_command('r.slope.aspect', elevation = r_elevation,
+    grass.run_command('r.resamp.rst', input = r_elevation,
                                      slope = r_slope_degree, 
-                                     format = "degrees",
-                                     precision = "DCELL",
-                                     zscale = 1.0,
-                                     overwrite = True)
+                                     ew_res = Xres_base,
+                                     ns_res = Yres_base,
+                                     quiet = True)
 
     grass.message( "..." )
 									 
@@ -315,12 +314,11 @@
 	# Calculate slope step 3
     grass.message( "Step 3: Calculation of slope" )
     grass.message( "..." )	
-    grass.run_command('r.slope.aspect', elevation = "DEM_smoothed_step3",
+    grass.run_command('r.resamp.rst', input = "DEM_smoothed_step3",
                                      slope = "DEM_smoothed_step3_slope_degree", 
-                                     format = "degrees",
-                                     precision = "DCELL",
-                                     zscale = 1.0,
-                                     overwrite = True)
+                                     ew_res = Xres_base,
+                                     ns_res = Yres_base,
+                                     quiet = True)
 
     grass.message( "..." )
 									 
@@ -498,12 +496,11 @@
 	# Calculate slope step 4
     grass.message( "Step 4: Calculation of slope" )
     grass.message( "..." )	
-    grass.run_command('r.slope.aspect', elevation = "DEM_smoothed_step4",
+    grass.run_command('r.resamp.rst', input = "DEM_smoothed_step4",
                                      slope = "DEM_smoothed_step4_slope_degree", 
-                                     format = "degrees",
-                                     precision = "DCELL",
-                                     zscale = 1.0,
-                                     overwrite = True)
+                                     ew_res = X_step3,
+                                     ns_res = Y_step3,
+                                     quiet = True)
 
     grass.message( "..." )
 									 



More information about the grass-commit mailing list