[GRASS-SVN] r41175 - grass/trunk/display/d.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 24 06:10:52 EST 2010


Author: martinl
Date: 2010-02-24 06:10:52 -0500 (Wed, 24 Feb 2010)
New Revision: 41175

Modified:
   grass/trunk/display/d.vect/d.vect.html
   grass/trunk/display/d.vect/main.c
Log:
d.vect: attrcol -> attrcolumn
manual page updated, note width '0'


Modified: grass/trunk/display/d.vect/d.vect.html
===================================================================
--- grass/trunk/display/d.vect/d.vect.html	2010-02-24 08:50:03 UTC (rev 41174)
+++ grass/trunk/display/d.vect/d.vect.html	2010-02-24 11:10:52 UTC (rev 41175)
@@ -5,27 +5,32 @@
 
 <h2>NOTES</h2>
 
-<em>d.vect</em> can simply be used typing <tt><b>d.vect map=</b>vector_map</tt>. 
-There are a large variety of optional parameters which allow the user to
-specify vector type, colors, data fields, SQL queries, label size and 
-justification, etc.
-<P>
-By default <em>d.vect</em> fills in holes in polygons (islands).
-If you only want to show active areas limit the features with, e.g.,
-"<tt>d.vect&nbsp;cats=1-999999</tt>".
-<P>
-In order to display attributes in the map, <em>display=attr</em> must be
-specified in addition to the column name (<em>attrcol</em> parameter).
+<em>d.vect</em> can simply be used typing <tt>d.vect
+map=vector_map</tt>.  There are a large variety of optional parameters
+which allow the user to specify vector type, colors, data fields, SQL
+queries, label size and justification, etc.
 
+<p>
+By default <em>d.vect</em> fills in holes in polygons (islands).  If
+you only want to show active areas limit the features with, e.g.,
+<div class="code"><pre>
+d.vect map=vector_map cats=1-999999
+</pre></div>
+
+<p>
+In order to display attributes in the map, <tt>display=attr</tt> must be
+specified in addition to the column name (<b>attrcolumn</b> parameter).
+
+<p>
+Colors may be specified in an attribute table column named 'GRASSRGB'
+(which is a <tt>varchar(11)</tt> column
+containing <tt>RRR:GGG:BBB</tt> values), see the flag <b>-a</b>.
+
 <P>
-Colors may be specified in an attribute table column
-named 'GRASSRGB' (which is a <tt>varchar(11)</tt> column containing <tt>RRR:GGG:BBB</tt> values),
-see the flag <em>-a</em>.
-<P>
 A table for a vector map might look like this:
 
 <div class="code"><pre>
-echo "select * from testisola" | db.select
+db.select sql="select * from testisola"
 cat|label|GRASSRGB
 0|no data|255:255:255
 90|FRASSILONGO|23:245:67
@@ -34,64 +39,77 @@
 168|SANT'ORSOLA|223:45:67
 190|TENNA|123:45:67
 </pre></div>
-<P>
-To add the GRASSRGB color column, use <em>v.db.addcolumn</em>:
+
+<p>
+To add the GRASSRGB color column, use <em><a href="v.db.addcolumn.html">v.db.addcolumn</a></em>:
 <div class="code"><pre>
-v.db.addcolumn testisola col="GRASSRGB varchar(11)"
+v.db.addcolumn map=testisola columns="GRASSRGB varchar(11)"
 </pre></div>
-<P>
-To add/change a color, use <em>v.db.update</em>:
+
+<p>
+To add/change a color, use <em><a href="v.db.update.html">v.db.update</a></em>:
 <div class="code"><pre>
-v.db.update testisola col=GRASSRGB val="123:45:237" where="cat=139"
+v.db.update map=testisola column=GRASSRGB value="123:45:237" where="cat=139"
 </pre></div>
-<P>
-A much simpler method of color coding is by using the <em>-c</em> flag which 
-displays vector elements of like category number with a random color.
-<P>
+
+<p>
+A much simpler method of color coding is by using the <b>-c</b> flag
+which displays vector elements of like category number with a random
+color.
+
+<p>
 This module can use FreeType/TrueType fonts if they have already been selected with
-<em>d.font</em>.
+<em><a href="d.font.html">d.font</a></em>.
 
+<p>
+Parameter <b>width</b> is set by default to '0'. XDRIVER specifies the
+precise behaviour for non-zero line width, but drivers have some
+freedom as to how zero-width lines are handled, so they can use the
+hardware's &quot;thin line&quot; drawing primitive, if it has one. A
+width of zero can potentially result in significantly faster operation. On
+drivers where there is no such thing as a "thin" line, the driver will
+use a sensible default (which might not be the same as '1').
+
 <h2>EXAMPLES</h2>
 
 Spearfish examples:
 
 <div class="code"><pre>
 # display roads with category numbers:
-d.vect roads display=shape,cat lcolor=green
+d.vect map=roads display=shape,cat lcolor=green
 
 # display randomly colorized soils map with attributes
-d.vect -c soils disp=attr attrcol=label
+d.vect -c map=soils display=attr attrcolumn=label
 
 # display randomly colorized selected vectors from soils map
-d.vect -c soils where="label='VBF'" display=shape,attr attrcol=label
+d.vect -c map=soils where="label='VBF'" display=shape,attr attrcolumn=label
 </pre></div>
 
 <p>
 3D points, 3D lines and 3D polygons colorized according to z height:
 <div class="code"><pre>
 g.region rast=elevation.10m
-r.random elevation.10m n=5000 vector=random3d -d
-d.mon x0
+r.random input=elevation.10m n=5000 vector=random3d -d
+d.mon start=x0
 # display as black points
-d.vect random3d
+d.vect map=random3d
 # display 3D points colorized according to z height
-d.vect -z random3d zcol=gyr
+d.vect -z map=random3d zcolor=gyr
 
 # 3D contour lines
-r.contour elevation.10m out=contour20m step=20
-d.vect -z contour20m zcol=gyr
+r.contour input=elevation.10m output=contour20m step=20
+d.vect -z map=contour20m zcolor=gyr
 
 # generate 3D triangles
-v.delaunay random3d out=random3d_del
+v.delaunay input=random3d output=random3d_del
 # display 3D polygons colorized according to z height
-d.vect -z random3d_del type=area zcol=gyr
+d.vect -z map=random3d_del type=area zcolor=gyr
 </pre></div>
 
 <h2>SEE ALSO</h2>
 
 <em>
 <a HREF="d.erase.html">d.erase</a>,
-<a HREF="d.what.vect.html">d.what.vect</a>,
 <a HREF="d.rast.html">d.rast</a>,
 <a HREF="v.colors.html">v.colors</a>,
 <a HREF="v.db.addcolumn.html">v.db.addcolumn</a>,

Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c	2010-02-24 08:50:03 UTC (rev 41174)
+++ grass/trunk/display/d.vect/main.c	2010-02-24 11:10:52 UTC (rev 41175)
@@ -245,7 +245,7 @@
 	_("Layer number for labels (default: the given layer number)");
     
     attrcol_opt = G_define_standard_option(G_OPT_DB_COLUMN);
-    attrcol_opt->key = "attrcol";
+    attrcol_opt->key = "attrcolumn";
     attrcol_opt->multiple = NO;	/* or fix attr.c, around line 102 */
     attrcol_opt->guisection = _("Labels");
     attrcol_opt->description = _("Name of column to be displayed");



More information about the grass-commit mailing list