[GRASS-SVN] r43878 - in grass/trunk/display: d.rast d.rgb d.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 12 08:04:31 EDT 2010


Author: martinl
Date: 2010-10-12 05:04:31 -0700 (Tue, 12 Oct 2010)
New Revision: 43878

Modified:
   grass/trunk/display/d.rast/main.c
   grass/trunk/display/d.rgb/main.c
   grass/trunk/display/d.vect/main.c
Log:
sync d.rast, d.vect and d.rgb descriptions
d.rgb: overlay by default (be in sync with d.rast)


Modified: grass/trunk/display/d.rast/main.c
===================================================================
--- grass/trunk/display/d.rast/main.c	2010-10-12 11:16:32 UTC (rev 43877)
+++ grass/trunk/display/d.rast/main.c	2010-10-12 12:04:31 UTC (rev 43878)
@@ -51,7 +51,8 @@
     module = G_define_module();
     G_add_keyword(_("display"));
     G_add_keyword(_("raster"));
-    module->description = _("Displays raster map layer.");
+    module->description = _("Displays user-specified raster map in the active "
+			    "graphics frame.");
     
     /* set up command line */
     map = G_define_standard_option(G_OPT_R_MAP);

Modified: grass/trunk/display/d.rgb/main.c
===================================================================
--- grass/trunk/display/d.rgb/main.c	2010-10-12 11:16:32 UTC (rev 43877)
+++ grass/trunk/display/d.rgb/main.c	2010-10-12 12:04:31 UTC (rev 43878)
@@ -1,4 +1,3 @@
-
 /****************************************************************************
  *
  * MODULE:       d.rgb
@@ -8,9 +7,10 @@
  *               Hamish Bowman <hamish_b yahoo.com>, 
  *               Markus Neteler <neteler itc.it>, 
  *               Radim Blazek <radim.blazek gmail.com>
- * PURPOSE:      combine three rasters to form a colour image using red, green,
+ *               Martin Landa <landa.martin gmail.com> (nulls opaque)
+ * PURPOSE:      Combine three rasters to form a colour image using red, green,
  *               and blue display channels
- * COPYRIGHT:    (C) 2001-2007 by the GRASS Development Team
+ * COPYRIGHT:    (C) 2001-2007, 2010 by the GRASS Development Team
  *
  *               This program is free software under the GNU General Public
  *               License (>=v2). Read the file COPYING that comes with GRASS
@@ -41,37 +41,35 @@
     struct band B[3];
     int row;
     int next_row;
+    int overlay;
     struct Cell_head window;
     struct GModule *module;
-    struct Flag *flag_o;
+    struct Flag *flag_n;
     int i;
 
     G_gisinit(argv[0]);
 
     module = G_define_module();
     G_add_keyword(_("display"));
+    G_add_keyword(_("raster"));
+    G_add_keyword(_("RGB"));
     module->description =
-	_("Displays three user-specified raster map layers "
+	_("Displays three user-specified raster maps "
 	  "as red, green, and blue overlays in the active graphics frame.");
 
-    flag_o = G_define_flag();
-    flag_o->key = 'o';
-    flag_o->description = _("Overlay (non-null values only)");
+    flag_n = G_define_flag();
+    flag_n->key = 'n';
+    flag_n->description = _("Make null cells opaque");
 
     for (i = 0; i < 3; i++) {
 	char buff[80];
 
-	sprintf(buff, _("Name of raster map to be used for <%s>"),
+	sprintf(buff, _("Name of raster map to be used for '%s'"),
 		color_names[i]);
 
-	B[i].opt = G_define_option();
+	B[i].opt = G_define_standard_option(G_OPT_R_MAP);
 	B[i].opt->key = G_store(color_names[i]);
-	B[i].opt->type = TYPE_STRING;
-	B[i].opt->answer = NULL;
-	B[i].opt->required = YES;
-	B[i].opt->gisprompt = "old,cell,raster";
 	B[i].opt->description = G_store(buff);
-	B[i].opt->key_desc = "name";
     }
 
     if (G_parser(argc, argv))
@@ -81,8 +79,10 @@
     if (D_open_driver() != 0)
 	G_fatal_error(_("No graphics device selected"));
 
+    overlay = !flag_n->answer;
+
     D_setup(0);
-    D_set_overlay_mode(flag_o->answer);
+    D_set_overlay_mode(overlay);
 
     for (i = 0; i < 3; i++) {
 	/* Get name of layer to be used */

Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c	2010-10-12 11:16:32 UTC (rev 43877)
+++ grass/trunk/display/d.vect/main.c	2010-10-12 12:04:31 UTC (rev 43878)
@@ -116,7 +116,8 @@
     module = G_define_module();
     G_add_keyword(_("display"));
     G_add_keyword(_("vector"));
-    module->description = _("Displays vector map layer in the active map display window.");
+    module->description = _("Displays user-specified vector map "
+			    "in the active graphics frame.");
     
     map_opt = G_define_standard_option(G_OPT_V_MAP);
 



More information about the grass-commit mailing list