[GRASS-SVN] r42507 - grass/trunk/display/d.rast
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jun 8 09:07:03 EDT 2010
Author: hamish
Date: 2010-06-08 09:07:03 -0400 (Tue, 08 Jun 2010)
New Revision: 42507
Modified:
grass/trunk/display/d.rast/d.rast.html
grass/trunk/display/d.rast/main.c
Log:
merge vallist option into catlist option, small msg cleanup
Modified: grass/trunk/display/d.rast/d.rast.html
===================================================================
--- grass/trunk/display/d.rast/d.rast.html 2010-06-08 12:30:14 UTC (rev 42506)
+++ grass/trunk/display/d.rast/d.rast.html 2010-06-08 13:07:03 UTC (rev 42507)
@@ -1,22 +1,23 @@
<h2>DESCRIPTION</h2>
-<em>d.rast</em> displays raster map layer(s) <em>name</em>
+<em>d.rast</em> displays the specified raster map layer
in the active display frame on the graphics monitor.
-<h2>NOTES</h2>
+<!-- specify format of values=1,3,5,7,12-34,101-inf -->
-To overlay raster maps option (<b>-o</b>) may be used.
<h2>SEE ALSO</h2>
<em><a HREF="d.erase.html">d.erase</a></em><br>
<em><a HREF="d.vect.html">d.vect</a></em><br>
-<em><a HREF="d.what.rast.html">d.what.rast</a></em><br>
+<!-- <em><a HREF="d.what.rast.html">d.what.rast</a></em><br> -->
+
<h2>AUTHOR</h2>
James Westervelt,
U.S. Army Construction Engineering
Research Laboratory
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>
Modified: grass/trunk/display/d.rast/main.c
===================================================================
--- grass/trunk/display/d.rast/main.c 2010-06-08 12:30:14 UTC (rev 42506)
+++ grass/trunk/display/d.rast/main.c 2010-06-08 13:07:03 UTC (rev 42507)
@@ -40,7 +40,6 @@
int invert, fp;
struct GModule *module;
struct Option *map;
- struct Option *catlist;
struct Option *vallist;
struct Option *bg;
struct Flag *flag_n;
@@ -52,36 +51,24 @@
module = G_define_module();
G_add_keyword(_("display"));
G_add_keyword(_("raster"));
- module->description = _("Displays raster map layer in the active map display window.");
+ module->description = _("Displays raster map layer.");
/* set up command line */
map = G_define_standard_option(G_OPT_R_MAP);
map->description = _("Raster map to be displayed");
- catlist = G_define_option();
- catlist->key = "catlist";
- catlist->key_desc = "cat[-cat]";
- catlist->type = TYPE_STRING;
- catlist->required = NO;
- catlist->multiple = YES;
- catlist->description = _("List of categories to be displayed (INT maps)");
- catlist->guisection = _("Selection");
-
vallist = G_define_option();
- vallist->key = "vallist";
- vallist->key_desc = "val[-val]";
+ vallist->key = "values";
+ vallist->key_desc = "value[,value[-value]]";
vallist->type = TYPE_STRING;
vallist->required = NO;
vallist->multiple = YES;
- vallist->description = _("List of values to be displayed (FP maps)");
+ vallist->description = _("List of categories or values to be displayed");
vallist->guisection = _("Selection");
- bg = G_define_option();
- bg->key = "bg";
+ bg = G_define_standard_option(G_OPT_C_BG);
bg->key_desc = "color";
- bg->type = TYPE_STRING;
bg->gisprompt = "old_color,color,color";
- bg->required = NO;
bg->description = _("Background color (for null)");
flag_n = G_define_flag();
@@ -90,7 +77,7 @@
flag_i = G_define_flag();
flag_i->key = 'i';
- flag_i->description = _("Invert catlist");
+ flag_i->description = _("Invert value list");
flag_i->guisection = _("Selection");
if (G_parser(argc, argv))
@@ -104,18 +91,12 @@
G_fatal_error(_("No graphics device selected"));
fp = Rast_map_is_fp(name, "");
- if (catlist->answer) {
+ if (vallist->answer) {
if (fp)
- G_warning(_("Ignoring catlist: map is floating point (please use 'val=')"));
+ parse_vallist(vallist->answers, &d_mask);
else
parse_catlist(catlist->answers, &mask);
}
- if (vallist->answer) {
- if (!fp)
- G_warning(_("Ignoring vallist: map is integer (please use 'cat=')"));
- else
- parse_vallist(vallist->answers, &d_mask);
- }
/* use DCELL even if the map is FCELL */
@@ -218,7 +199,7 @@
if (where)
fprintf(stderr, "%s: ", where);
G_usage();
- G_fatal_error("%s: illegal category spec", catlist);
+ G_fatal_error(_("[%s]: illegal category specified"), catlist);
}
return 0;
@@ -249,7 +230,7 @@
if (where)
fprintf(stderr, "%s: ", where);
G_usage();
- G_fatal_error("%s: illegal value spec", vallist);
+ G_fatal_error(_("[%s]: illegal value specified"), vallist);
}
return 0;
More information about the grass-commit
mailing list