[GRASS-SVN] r42236 - grass/trunk/raster/r.watershed/front

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 12 05:34:13 EDT 2010


Author: mmetz
Date: 2010-05-12 05:34:13 -0400 (Wed, 12 May 2010)
New Revision: 42236

Modified:
   grass/trunk/raster/r.watershed/front/main.c
Log:
add new option to beautify flat areas to front

Modified: grass/trunk/raster/r.watershed/front/main.c
===================================================================
--- grass/trunk/raster/r.watershed/front/main.c	2010-05-12 09:33:34 UTC (rev 42235)
+++ grass/trunk/raster/r.watershed/front/main.c	2010-05-12 09:34:13 UTC (rev 42236)
@@ -61,6 +61,7 @@
     struct Flag *flag_flow;
     struct Flag *flag_seg;
     struct Flag *flag_abs;
+    struct Flag *flag_flat;
     struct GModule *module;
 
     G_gisinit(argv[0]);
@@ -213,6 +214,13 @@
     flag_abs->description =
 	_("See manual for a detailed description of flow accumulation output");
 
+    flag_flat = G_define_flag();
+    flag_flat->key = 'b';
+    flag_flat->label =
+	_("Beautify flat areas");
+    flag_flat->description =
+	_("Flow direction in flat areas is modified to look prettier");
+
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 
@@ -266,6 +274,12 @@
     if (flag_abs->answer)
 	new_argv[new_argc++] = "-a";
 
+    if (flag_flat->answer && !flag_seg->answer)
+	new_argv[new_argc++] = "-b";
+
+    if (flag_flat->answer && flag_seg->answer)
+	G_message(_("Beautify flat areas is not yet supported for disk swap mode"));
+
     do_opt(opt1);
     do_opt(opt2);
     do_opt(opt3);



More information about the grass-commit mailing list