[GRASS-SVN] r63124 - in grass/trunk/raster: r.info r.slope.aspect

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 26 08:43:10 PST 2014


Author: neteler
Date: 2014-11-26 08:43:10 -0800 (Wed, 26 Nov 2014)
New Revision: 63124

Modified:
   grass/trunk/raster/r.info/r.info.html
   grass/trunk/raster/r.slope.aspect/main.c
   grass/trunk/raster/r.slope.aspect/r.slope.aspect.html
Log:
r.slope.aspect: min_slp_allowed -> min_slope (r63053)

Modified: grass/trunk/raster/r.info/r.info.html
===================================================================
--- grass/trunk/raster/r.info/r.info.html	2014-11-26 16:41:56 UTC (rev 63123)
+++ grass/trunk/raster/r.info/r.info.html	2014-11-26 16:43:10 UTC (rev 63124)
@@ -68,7 +68,7 @@
  |   Comments:                                                                |
  |    slope map elev = elev_ned10m                                            |
  |    zfactor = 1.00 format = degrees                                         |
- |    min_slp_allowed = 0.000000                                              |
+ |    min_slope = 0.000000                                              |
  |                                                                            |
  +----------------------------------------------------------------------------+
 </pre></div>

Modified: grass/trunk/raster/r.slope.aspect/main.c
===================================================================
--- grass/trunk/raster/r.slope.aspect/main.c	2014-11-26 16:41:56 UTC (rev 63123)
+++ grass/trunk/raster/r.slope.aspect/main.c	2014-11-26 16:43:10 UTC (rev 63124)
@@ -44,7 +44,7 @@
  * or tangential curvature filename required
  * usage: r.slope.aspect [-av] elevation=input slope=output1 aspect=output2
  *	pcurv=output3 tcurv=output4 format=name prec=name zfactor=value
- *	min_slp_allowed=value dx=output5 dy=output6 dxx=output7 
+ *	min_slope=value dx=output5 dy=output6 dxx=output7 
  *      dyy=output8 dxy=output9
  * -a don't align window
  * -q quiet
@@ -128,7 +128,7 @@
     double tan_ans;
     double key;
     double slp_in_perc, slp_in_deg;
-    double min_slp = 900., max_slp = 0., min_slp_allowed;
+    double min_slp = 900., max_slp = 0., min_slope;
     int low, hi, test = 0;
     int deg = 0;
     int perc = 0;
@@ -137,7 +137,7 @@
     struct
     {
 	struct Option *elevation, *slope_fmt, *slope, *aspect, *pcurv, *tcurv,
-	    *zfactor, *min_slp_allowed, *out_precision,
+	    *zfactor, *min_slope, *out_precision,
 	    *dx, *dy, *dxx, *dyy, *dxy;
     } parm;
     struct
@@ -244,14 +244,14 @@
     parm.zfactor->answer = "1.0";
     parm.zfactor->guisection = _("Settings");
 
-    parm.min_slp_allowed = G_define_option();
-    parm.min_slp_allowed->key = "min_slope";
-    parm.min_slp_allowed->description =
+    parm.min_slope = G_define_option();
+    parm.min_slope->key = "min_slope";
+    parm.min_slope->description =
 	_("Minimum slope value (in percent) for which aspect is computed");
-    parm.min_slp_allowed->type = TYPE_DOUBLE;
-    parm.min_slp_allowed->required = NO;
-    parm.min_slp_allowed->answer = "0.0";
-    parm.min_slp_allowed->guisection = _("Settings");
+    parm.min_slope->type = TYPE_DOUBLE;
+    parm.min_slope->required = NO;
+    parm.min_slope->answer = "0.0";
+    parm.min_slope->guisection = _("Settings");
 
     flag.a = G_define_flag();
     flag.a->key = 'a';
@@ -314,11 +314,11 @@
 		      parm.zfactor->key, parm.zfactor->answer);
     }
 
-    if (sscanf(parm.min_slp_allowed->answer, "%lf", &min_slp_allowed) != 1 ||
-	min_slp_allowed < 0.0) {
+    if (sscanf(parm.min_slope->answer, "%lf", &min_slope) != 1 ||
+	min_slope < 0.0) {
 	G_fatal_error(_("%s=%s - must be a non-negative number"),
-		      parm.min_slp_allowed->key,
-		      parm.min_slp_allowed->answer);
+		      parm.min_slope->key,
+		      parm.min_slope->answer);
     }
 
     slope_fmt = parm.slope_fmt->answer;
@@ -746,7 +746,7 @@
 		if (max_slp < slp_in_perc)
 		    max_slp = slp_in_perc;
 	    }
-	    if (slp_in_perc < min_slp_allowed)
+	    if (slp_in_perc < min_slope)
 		slp_in_perc = 0.;
 
 	    if (deg && out_type == CELL_TYPE) {
@@ -808,7 +808,7 @@
 
 		/* if it's not the case that the slope for this cell 
 		   is below specified minimum */
-		if (!((slope_fd > 0) && (slp_in_perc < min_slp_allowed))) {
+		if (!((slope_fd > 0) && (slp_in_perc < min_slope))) {
 		    if (out_type == CELL_TYPE)
 			*((CELL *) asp_ptr) = (CELL) (aspect + .5);
 		    else
@@ -1040,7 +1040,7 @@
 	Rast_short_history(aspect_name, "raster", &hist);
 	Rast_append_format_history(&hist, "aspect map elev = %s", elev_name);
 	Rast_append_format_history(&hist, "zfactor = %.2f", zfactor);
-	Rast_append_format_history(&hist, "min_slp_allowed = %f", min_slp_allowed);
+	Rast_append_format_history(&hist, "min_slope = %f", min_slope);
 	Rast_format_history(&hist, HIST_DATSRC_1, "raster elevation file %s", elev_name);
 	Rast_command_history(&hist);
 	Rast_write_history(aspect_name, &hist);
@@ -1150,7 +1150,7 @@
 	Rast_append_format_history(&hist, "slope map elev = %s", elev_name);
 	Rast_append_format_history(&hist, "zfactor = %.2f format = %s", zfactor,
 		parm.slope_fmt->answer);
-	Rast_append_format_history(&hist, "min_slp_allowed = %f", min_slp_allowed);
+	Rast_append_format_history(&hist, "min_slope = %f", min_slope);
 	Rast_format_history(&hist, HIST_DATSRC_1, "raster elevation file %s", elev_name);
 	Rast_command_history(&hist);
 	Rast_write_history(slope_name, &hist);
@@ -1222,7 +1222,7 @@
 	Rast_short_history(pcurv_name, "raster", &hist);
 	Rast_append_format_history(&hist, "profile curve map elev = %s", elev_name);
 	Rast_append_format_history(&hist, "zfactor = %.2f", zfactor);
-	Rast_append_format_history(&hist, "min_slp_allowed = %f", min_slp_allowed);
+	Rast_append_format_history(&hist, "min_slope = %f", min_slope);
 	Rast_format_history(&hist, HIST_DATSRC_1, "raster elevation file %s", elev_name);
 	Rast_command_history(&hist);
 	Rast_write_history(pcurv_name, &hist);
@@ -1249,7 +1249,7 @@
 	Rast_short_history(tcurv_name, "raster", &hist);
 	Rast_append_format_history(&hist, "tangential curve map elev = %s", elev_name);
 	Rast_append_format_history(&hist, "zfactor = %.2f", zfactor);
-	Rast_append_format_history(&hist, "min_slp_allowed = %f", min_slp_allowed);
+	Rast_append_format_history(&hist, "min_slope = %f", min_slope);
 	Rast_format_history(&hist, HIST_DATSRC_1, "raster elevation file %s", elev_name);
 	Rast_command_history(&hist);
 	Rast_write_history(tcurv_name, &hist);
@@ -1274,7 +1274,7 @@
 	Rast_short_history(dx_name, "raster", &hist);
 	Rast_append_format_history(&hist, "E-W slope map elev = %s", elev_name);
 	Rast_append_format_history(&hist, "zfactor = %.2f", zfactor);
-	Rast_append_format_history(&hist, "min_slp_allowed = %f", min_slp_allowed);
+	Rast_append_format_history(&hist, "min_slope = %f", min_slope);
 	Rast_format_history(&hist, HIST_DATSRC_1, "raster elevation file %s", elev_name);
 	Rast_command_history(&hist);
 	Rast_write_history(dx_name, &hist);
@@ -1299,7 +1299,7 @@
 	Rast_short_history(dy_name, "raster", &hist);
 	Rast_append_format_history(&hist, "N-S slope map elev = %s", elev_name);
 	Rast_append_format_history(&hist, "zfactor = %.2f", zfactor);
-	Rast_append_format_history(&hist, "min_slp_allowed = %f", min_slp_allowed);
+	Rast_append_format_history(&hist, "min_slope = %f", min_slope);
 	Rast_format_history(&hist, HIST_DATSRC_1, "raster elevation file %s", elev_name);
 	Rast_command_history(&hist);
 	Rast_write_history(dy_name, &hist);
@@ -1324,7 +1324,7 @@
 	Rast_short_history(dxx_name, "raster", &hist);
 	Rast_append_format_history(&hist, "DXX map elev = %s", elev_name);
 	Rast_append_format_history(&hist, "zfactor = %.2f", zfactor);
-	Rast_append_format_history(&hist, "min_slp_allowed = %f", min_slp_allowed);
+	Rast_append_format_history(&hist, "min_slope = %f", min_slope);
 	Rast_format_history(&hist, HIST_DATSRC_1, "raster elevation file %s", elev_name);
 	Rast_command_history(&hist);
 	Rast_write_history(dxx_name, &hist);
@@ -1349,7 +1349,7 @@
 	Rast_short_history(dyy_name, "raster", &hist);
 	Rast_append_format_history(&hist, "DYY map elev = %s", elev_name);
 	Rast_append_format_history(&hist, "zfactor = %.2f", zfactor);
-	Rast_append_format_history(&hist, "min_slp_allowed = %f", min_slp_allowed);
+	Rast_append_format_history(&hist, "min_slope = %f", min_slope);
 	Rast_format_history(&hist, HIST_DATSRC_1, "raster elevation file %s", elev_name);
 	Rast_command_history(&hist);
 	Rast_write_history(dyy_name, &hist);
@@ -1374,7 +1374,7 @@
 	Rast_short_history(dxy_name, "raster", &hist);
 	Rast_append_format_history(&hist, "DXY map elev = %s", elev_name);
 	Rast_append_format_history(&hist, "zfactor = %.2f", zfactor);
-	Rast_append_format_history(&hist, "min_slp_allowed = %f", min_slp_allowed);
+	Rast_append_format_history(&hist, "min_slope = %f", min_slope);
 	Rast_format_history(&hist, HIST_DATSRC_1, "raster elevation file %s", elev_name);
 	Rast_command_history(&hist);
 	Rast_write_history(dxy_name, &hist);

Modified: grass/trunk/raster/r.slope.aspect/r.slope.aspect.html
===================================================================
--- grass/trunk/raster/r.slope.aspect/r.slope.aspect.html	2014-11-26 16:41:56 UTC (rev 63123)
+++ grass/trunk/raster/r.slope.aspect/r.slope.aspect.html	2014-11-26 16:43:10 UTC (rev 63124)
@@ -28,9 +28,9 @@
 45, ..., 360 in <b>aspect</b> output.
 It is possible to reduce the bias in these directions
 by filtering out the aspect in areas where the terrain is almost flat.
-A option <b>min_slp_allowed</b> can be used to specify the minimum slope
+A option <b>min_slope</b> can be used to specify the minimum slope
 for which aspect is computed. The aspect for all cells with
-slope < <b>min_slp_allowed</b> is set to <i>null</i> (no-data).
+slope < <b>min_slope</b> is set to <i>null</i> (no-data).
 
 <center>
   <img src="aspect_diagram.png" border="0">



More information about the grass-commit mailing list