| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>d.vect</em> displays vector maps in the active frame on the |
| 4 |
graphics monitor. |
| 5 |
|
| 6 |
<h2>NOTES</h2> |
| 7 |
|
| 8 |
<em>d.vect</em> can simply be used typing <code>d.vect |
| 9 |
map=vector_map</code>. There are a large variety of optional parameters |
| 10 |
which allow the user to specify vector type, colors, data fields, SQL |
| 11 |
queries, label size and justification, etc. |
| 12 |
|
| 13 |
<p>When <em>d.vect</em> is used with <b>where</b> parameter on MS Windows |
| 14 |
Command Prompt, it is important to use <code>ˆ</code> |
| 15 |
caret symbol for escaping special characters <code>< > ( ) & | , ; "</code>. |
| 16 |
<div class="code"><pre> |
| 17 |
d.vect map=vector_map where="cat ˆ> 10 AND cat ˆ< 20" |
| 18 |
</pre></div> |
| 19 |
|
| 20 |
<p>By default <em>d.vect</em> areas are filled with <b>fill_color</b> and |
| 21 |
outlined with <b>color</b>. Area outlines can be suppressed with |
| 22 |
<div class="code"><pre> |
| 23 |
d.vect map=vector_map color=none |
| 24 |
</pre></div> |
| 25 |
and areas can be made transparent with |
| 26 |
<div class="code"><pre> |
| 27 |
d.vect map=vector_map fill_color=none |
| 28 |
</pre></div> |
| 29 |
|
| 30 |
<p>In order to display attributes in the map, <b>attribute_column</b> must |
| 31 |
be specified. |
| 32 |
|
| 33 |
<p>Feature colors may be specified |
| 34 |
by <em><a href="v.colors.html">v.colors</a></em> in a form of color |
| 35 |
table or in an attribute table column containing <code>RRR:GGG:BBB</code> |
| 36 |
values. |
| 37 |
|
| 38 |
<p>A table for a vector map might look like this: |
| 39 |
|
| 40 |
<div class="code"><pre> |
| 41 |
db.select sql="select * from testisola" |
| 42 |
cat|label|GRASSRGB |
| 43 |
0|no data|255:255:255 |
| 44 |
90|FRASSILONGO|23:245:67 |
| 45 |
104|LEVICO|23:145:67 |
| 46 |
139|PERGINE VALSUGANA|223:45:237 |
| 47 |
168|SANT'ORSOLA|223:45:67 |
| 48 |
190|TENNA|123:45:67 |
| 49 |
</pre></div> |
| 50 |
|
| 51 |
<p>To add the GRASSRGB color column, use <em><a href="v.db.addcolumn.html">v.db.addcolumn</a></em>: |
| 52 |
<div class="code"><pre> |
| 53 |
v.db.addcolumn map=testisola columns="GRASSRGB varchar(11)" |
| 54 |
</pre></div> |
| 55 |
|
| 56 |
<p>To add/change a color, use <em><a href="v.db.update.html">v.db.update</a></em>: |
| 57 |
<div class="code"><pre> |
| 58 |
v.db.update map=testisola column=GRASSRGB value="123:45:237" where="cat=139" |
| 59 |
</pre></div> |
| 60 |
|
| 61 |
<p>A much simpler method of color coding is by using the <b>-c</b> flag |
| 62 |
which displays vector elements of like category number with a random |
| 63 |
color. |
| 64 |
|
| 65 |
<p>This module can use FreeType/TrueType fonts if they have already been selected with |
| 66 |
<em><a href="d.font.html">d.font</a></em>. |
| 67 |
|
| 68 |
<p>Parameter <b>width</b> is set by default to '0'. XDRIVER specifies the |
| 69 |
precise behaviour for non-zero line width, but drivers have some |
| 70 |
freedom as to how zero-width lines are handled, so they can use the |
| 71 |
hardware's "thin line" drawing primitive, if it has one. A |
| 72 |
width of zero can potentially result in significantly faster operation. On |
| 73 |
drivers where there is no such thing as a "thin" line, the driver will |
| 74 |
use a sensible default (which might not be the same as '1'). |
| 75 |
|
| 76 |
<h2>EXAMPLES</h2> |
| 77 |
|
| 78 |
Spearfish examples: |
| 79 |
|
| 80 |
<div class="code"><pre> |
| 81 |
# display roads with category numbers: |
| 82 |
d.vect map=roads display=shape,cat label_color=green |
| 83 |
|
| 84 |
# display randomly colorized soils map with attributes |
| 85 |
d.vect -c map=soils attribute_column=label |
| 86 |
|
| 87 |
# display randomly colorized selected vectors from soils map |
| 88 |
d.vect -c map=soils where="label='VBF'" display=shape attribute_column=label |
| 89 |
</pre></div> |
| 90 |
|
| 91 |
<p>3D points, 3D lines and 3D polygons colorized according to z height |
| 92 |
(for 3D lines and polygons a z height is computed by a midpoint of |
| 93 |
line/area bounding box): |
| 94 |
|
| 95 |
<div class="code"><pre> |
| 96 |
g.region raster=elevation.10m |
| 97 |
r.random input=elevation.10m n=5000 vector=random3d -z |
| 98 |
d.mon start=x0 |
| 99 |
# display as black points |
| 100 |
d.vect map=random3d |
| 101 |
# display 3D points colorized according to z height |
| 102 |
d.vect map=random3d zcolor=gyr |
| 103 |
|
| 104 |
# 3D contour lines |
| 105 |
r.contour input=elevation.10m output=contour20m step=20 |
| 106 |
d.vect map=contour20m zcolor=gyr |
| 107 |
|
| 108 |
# generate 3D triangles |
| 109 |
v.delaunay input=random3d output=random3d_del |
| 110 |
# display 3D polygons colorized according to z height |
| 111 |
d.vect map=random3d_del type=area zcolor=gyr |
| 112 |
</pre></div> |
| 113 |
|
| 114 |
<h2>SEE ALSO</h2> |
| 115 |
|
| 116 |
<em> |
| 117 |
<a href="v.colors.html">v.colors</a>, |
| 118 |
<a href="d.erase.html">d.erase</a>, |
| 119 |
<a href="d.rast.html">d.rast</a>, |
| 120 |
<a href="v.colors.html">v.colors</a>, |
| 121 |
<a href="v.db.addcolumn.html">v.db.addcolumn</a>, |
| 122 |
<a href="v.db.update.html">v.db.update</a> |
| 123 |
</em> |
| 124 |
<p> |
| 125 |
<em> |
| 126 |
<a href="sql.html">GRASS SQL interface</a> |
| 127 |
</em> |
| 128 |
|
| 129 |
<h2>AUTHORS</h2> |
| 130 |
|
| 131 |
CERL<br> |
| 132 |
Radim Blazek, ITC-Irst, Trento, Italy<br> |
| 133 |
Support for color tables by Martin Landa, Czech Technical University in Prague (8/2011)<br> |
| 134 |
and many other GRASS developers |