[GRASS-SVN] r47608 - grass/trunk/vector/v.colors

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 13 12:46:49 EDT 2011


Author: martinl
Date: 2011-08-13 09:46:48 -0700 (Sat, 13 Aug 2011)
New Revision: 47608

Modified:
   grass/trunk/vector/v.colors/main.c
   grass/trunk/vector/v.colors/v.colors.html
Log:
v.colors: manual updated


Modified: grass/trunk/vector/v.colors/main.c
===================================================================
--- grass/trunk/vector/v.colors/main.c	2011-08-13 13:51:12 UTC (rev 47607)
+++ grass/trunk/vector/v.colors/main.c	2011-08-13 16:46:48 UTC (rev 47608)
@@ -61,13 +61,14 @@
     opt.field = G_define_standard_option(G_OPT_V_FIELD);
 
     opt.attrcol = G_define_standard_option(G_OPT_DB_COLUMN);
-    opt.attrcol->description = _("Name of column containing numeric data");
+    opt.attrcol->label = _("Name of column containing numeric data");
+    opt.attrcol->description = _("If not given categories are used");
     opt.colr = G_define_standard_option(G_OPT_M_COLR);
     
     opt.rgbcol = G_define_standard_option(G_OPT_DB_COLUMN);
     opt.rgbcol->key = "rgb_column";
     opt.rgbcol->label = _("Name of color column to populate RGB values");
-    opt.rgbcol->description = _("If no column given, write color table instead");
+    opt.rgbcol->description = _("If not given writes color table");
 
     opt.rast = G_define_standard_option(G_OPT_R_INPUT);
     opt.rast->key = "raster";

Modified: grass/trunk/vector/v.colors/v.colors.html
===================================================================
--- grass/trunk/vector/v.colors/v.colors.html	2011-08-13 13:51:12 UTC (rev 47607)
+++ grass/trunk/vector/v.colors/v.colors.html	2011-08-13 16:46:48 UTC (rev 47608)
@@ -2,7 +2,7 @@
 
 <em>v.colors</em> allows the user to create and/or modify the color
 table for a vector map. The vector map (specified on the command line
-by <b>map=</b>) must exist in the user's current mapset search path.
+by <b>map</b>) must exist in the user's current mapset search path.
 
 <p>
 The <b>rast</b> option allows user to specify a raster map <i>name</i>
@@ -47,6 +47,28 @@
 
 <h2>EXAMPLES</h2>
 
+Define color table <tt>wave</tt> based on categories from layer 1
+
+<div class="code"><pre>
+v.colors map=soils_general layer=1 color=wave
+</pre></div>
+
+Define color table <tt>ryg</tt> based on values from attribute
+column <tt>AREA</tt>. Attribute table is linked to layer 1.
+
+<div class="code"><pre>
+v.to.db map=soils_general layer=1 option=area column=AREA
+v.colors map=soils_general layer=1 color=wave column=AREA
+</pre></div>
+
+Write color values to the attribute table (column <tt>GRASSRGB</tt>)
+instead of creating color table.
+
+<div class="code"><pre>
+v.db.addcolumn map=soils_general column="GRASSRGB varchar(12)"
+v.colors map=soils_general layer=1 color=wave column=AREA rgb_column=GRASSRGB
+</pre></div>
+
 <h2>SEE ALSO</h2>
 
 <em>
@@ -62,8 +84,7 @@
 
 <h2>AUTHORS</h2>
 
-Adopted <a href="r.colors.html">r.colors</a> by Martin Landa, Czech
-Technical University in Prague, Czech Republic
+Martin Landa, Czech Technical University in Prague, Czech Republic
 
 <p>
 <i>Last changed: $Date$</i>



More information about the grass-commit mailing list