d.vect1grass
Displays user-specified vector map in the active graphics frame.
Usage
d.vect
d.vect --help
d.vect [-cirs]
map=name
[layer=string]
display=string
[,string, ...]
[type=string
[,string, ...]]
[cats=range]
[where=sql_query]
[color=name]
[fill_color=name]
[rgb_column=name]
[zcolor=style]
[width=integer]
[width_column=name]
[width_scale=float]
[icon=string]
[size=float]
[size_column=name]
[rotation_column=name]
[icon_area=string]
[icon_line=string]
[legend_label=string]
[label_layer=string]
[attribute_column=name]
[label_color=name]
[label_bgcolor=name]
[label_bcolor=name]
[label_size=integer]
[font=string]
[encoding=string]
[xref=string]
[yref=string]
[minreg=float]
[maxreg=float]
[--help]
[--verbose]
[--quiet]
[--ui]
Keywords
display, graphics, vector, level1
Overview
d.vect displays vector maps in the active frame on the graphics monitor.
Notes
d.vect can simply be used typing d.vect map=vector_map. 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.
When d.vect is used with where parameter on MS Windows Command Prompt, it is important to use ˆ carret symbol for escaping special characters < > ( ) & | , ; ".
d.vect map=vector_map where="cat ˆ> 10 AND cat ˆ< 20"
By default d.vect areas are filled with fill_color and outlined with color. Area outlines can be suppressed with
d.vect map=vector_map color=none
and areas can be made transparent with
d.vect map=vector_map fill_color=none
In order to display attributes in the map, attribute_column must be specified.
Feature colors may be specified by v.colors in a form of color table or in an attribute table column containing RRR:GGG:BBB values.
A table for a vector map might look like this:
db.select sql="select * from testisola"cat|label|GRASSRGB0|no data|255:255:25590|FRASSILONGO|23:245:67104|LEVICO|23:145:67139|PERGINE VALSUGANA|223:45:237168|SANT’ORSOLA|223:45:67190|TENNA|123:45:67
To add the GRASSRGB color column, use v.db.addcolumn:
v.db.addcolumn map=testisola columns="GRASSRGB varchar(11)"
To add/change a color, use v.db.update:
v.db.update map=testisola column=GRASSRGB value="123:45:237" where="cat=139"
A much simpler method of color coding is by using the -c flag which displays vector elements of like category number with a random color.
This module can use FreeType/TrueType fonts if they have already been selected with d.font.
Parameter width 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 "thin line" 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’).
Examples
Spearfish examples:
# display roads with category numbers:d.vect map=roads display=shape,cat label_color=green# display randomly colorized soils map with attributesd.vect -c map=soils attribute_column=label# display randomly colorized selected vectors from soils mapd.vect -c map=soils where="label=’VBF’" display=shape attribute_column=label
3D points, 3D lines and 3D polygons colorized according to z height (for 3D lines and polygons a z height is computed by a midpoint of line/area bounding box):
g.region raster=elevation.10mr.random input=elevation.10m n=5000 vector=random3d -dd.mon start=x0# display as black pointsd.vect map=random3d# display 3D points colorized according to z heightd.vect map=random3d zcolor=gyr# 3D contour linesr.contour input=elevation.10m output=contour20m step=20d.vect map=contour20m zcolor=gyr# generate 3D trianglesv.delaunay input=random3d output=random3d_del# display 3D polygons colorized according to z heightd.vect map=random3d_del type=area zcolor=gyr
Source code
Available at: d.vect source code (history)
Accessed: Monday Feb 24 17:50:28 2025
Main index | Display index | Topics index | Keywords index | Graphical index | Full index
© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual
Releases
10 releases since Debian 4.0 (Etch); the text changed 9 times.