Browse Source

v.colors: manual updated

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47608 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 years ago
parent
commit
1290960418
2 changed files with 27 additions and 5 deletions
  1. 3 2
      vector/v.colors/main.c
  2. 24 3
      vector/v.colors/v.colors.html

+ 3 - 2
vector/v.colors/main.c

@@ -61,13 +61,14 @@ int main(int argc, char *argv[])
     opt.field = G_define_standard_option(G_OPT_V_FIELD);
     opt.field = G_define_standard_option(G_OPT_V_FIELD);
 
 
     opt.attrcol = G_define_standard_option(G_OPT_DB_COLUMN);
     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.colr = G_define_standard_option(G_OPT_M_COLR);
     
     
     opt.rgbcol = G_define_standard_option(G_OPT_DB_COLUMN);
     opt.rgbcol = G_define_standard_option(G_OPT_DB_COLUMN);
     opt.rgbcol->key = "rgb_column";
     opt.rgbcol->key = "rgb_column";
     opt.rgbcol->label = _("Name of color column to populate RGB values");
     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 = G_define_standard_option(G_OPT_R_INPUT);
     opt.rast->key = "raster";
     opt.rast->key = "raster";

+ 24 - 3
vector/v.colors/v.colors.html

@@ -2,7 +2,7 @@
 
 
 <em>v.colors</em> allows the user to create and/or modify the color
 <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
 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>
 <p>
 The <b>rast</b> option allows user to specify a raster map <i>name</i>
 The <b>rast</b> option allows user to specify a raster map <i>name</i>
@@ -47,6 +47,28 @@ For details see <em><a href="r.colors.html">r.colors</a></em> manual page.
 
 
 <h2>EXAMPLES</h2>
 <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>
 <h2>SEE ALSO</h2>
 
 
 <em>
 <em>
@@ -62,8 +84,7 @@ tables</a> (from GRASS User Wiki)
 
 
 <h2>AUTHORS</h2>
 <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>
 <p>
 <i>Last changed: $Date$</i>
 <i>Last changed: $Date$</i>