[GRASS-SVN] r44136 - grass/trunk/raster/r.colors.out
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 1 03:41:17 EDT 2010
Author: martinl
Date: 2010-11-01 00:41:16 -0700 (Mon, 01 Nov 2010)
New Revision: 44136
Modified:
grass/trunk/raster/r.colors.out/main.c
grass/trunk/raster/r.colors.out/r.colors.out.html
Log:
r.colors.out: cosmetics in parameters/messages/manual
Modified: grass/trunk/raster/r.colors.out/main.c
===================================================================
--- grass/trunk/raster/r.colors.out/main.c 2010-11-01 07:33:57 UTC (rev 44135)
+++ grass/trunk/raster/r.colors.out/main.c 2010-11-01 07:41:16 UTC (rev 44136)
@@ -7,11 +7,11 @@
*
* PURPOSE: Allows export of the color table for a raster map layer.
*
- * COPYRIGHT: (C) 2008 Glynn Clements and the GRASS Development Team
+ * COPYRIGHT: (C) 2008, 2010 Glynn Clements and the GRASS Development Team
*
- * This program is free software under the GNU General Public
- * License (>=v2). Read the file COPYING that comes with GRASS
- * for details.
+ * This program is free software under the GNU General
+ * Public License (>=v2). Read the file COPYING that
+ * comes with GRASS for details.
*
***************************************************************************/
@@ -61,17 +61,17 @@
module = G_define_module();
G_add_keyword(_("raster"));
+ G_add_keyword(_("export"));
G_add_keyword(_("color table"));
module->description =
_("Exports the color table associated with a raster map layer.");
opt.map = G_define_standard_option(G_OPT_R_MAP);
- opt.map->required = YES;
opt.file = G_define_standard_option(G_OPT_F_OUTPUT);
opt.file->key = "rules";
- opt.file->required = NO;
- opt.file->description = _("Path to rules file (\"-\" to write rules to stdout)");
+ opt.file->label = _("Path to output rules file");
+ opt.file->description = _("\"-\" to write to stdout");
flag.p = G_define_flag();
flag.p->key = 'p';
@@ -85,7 +85,7 @@
perc = flag.p->answer ? 1 : 0;
if (Rast_read_colors(name, "", &colors) < 0)
- G_fatal_error(_("Can't read color table for <%s>"));
+ G_fatal_error(_("Unable to read color table for raster map <%s>"));
Rast_read_fp_range(name, "", &range);
Rast_get_fp_range_min_max(&range, &min, &max);
@@ -136,7 +136,6 @@
fprintf(fp, "default %d:%d:%d\n", r, g, b);
}
-
if (fp != stdout)
fclose(fp);
Modified: grass/trunk/raster/r.colors.out/r.colors.out.html
===================================================================
--- grass/trunk/raster/r.colors.out/r.colors.out.html 2010-11-01 07:33:57 UTC (rev 44135)
+++ grass/trunk/raster/r.colors.out/r.colors.out.html 2010-11-01 07:41:16 UTC (rev 44136)
@@ -1,16 +1,22 @@
<h2>DESCRIPTION</h2>
-<i>r.colors.out</i> allows the user to export the color table for a
-raster map layer to a file which is suitable as input to <em>
-<a href="r.colors.html">r.colors</a></em>.
+<em>r.colors.out</em> allows the user to export the color table for a
+raster map to a file which is suitable as input
+to <em><a href="r.colors.html">r.colors</a></em>.
+<h2>EXAMPLES</h2>
+
+<div class="code"><pre>
+r.colors.out map=el_D782_6m rules=rules.txt
+r.colors map=el_D783_6m rules=rules.txt
+</pre></div>
+
<h2>SEE ALSO</h2>
<em>
-<a href="r.colors.html">r.colors</a>,
+ <a href="r.colors.html">r.colors</a>
</em>
-
<h2>AUTHOR</h2>
Glynn Clements
More information about the grass-commit
mailing list