
NAME
d.vect - Displays user-specified vector map in the active graphics frame.
KEYWORDS
display, vector
SYNOPSIS
d.vect
d.vect help
d.vect [-acizr] map=name layer=string display=string[,string,...] [type=string[,string,...]] [cats=range] [where=sql_query] [color=string] [fcolor=string] [rgb_column=name] [zcolor=style] [width=integer] [width_column=name] [width_scale=float] [icon=string] [size=float] [size_column=name] [rotation_column=name] [llayer=string] [attrcolumn=name] [lcolor=string] [bgcolor=string] [bcolor=string] [lsize=integer] [font=string] [encoding=string] [xref=string] [yref=string] [minreg=float] [maxreg=float] [--verbose] [--quiet]
Flags:
- -a
- Get colors from attribute table (see 'rgb_column' option)
- -c
- Random colors according to category number (or layer number if 'layer=-1' is given)
- -i
- Use values from 'cats' option as feature id
- -z
- Colorize features according to z-coordinate (only for 3D vector maps)
- -r
- Use square root of the value of size_column
- This makes circle areas proportionate to the size_column values instead of circle radius
- --verbose
- Verbose module output
- --quiet
- Quiet module output
Parameters:
- map=name [required]
- Name of vector map
- Or data source for direct OGR access
- layer=string [required]
- Layer number or name ('-1' for all layers)
- A single vector map can be connected to multiple database tables. This number determines which table to use. When used with direct OGR access this is the layer name.
- Default: -1
- display=string[,string,...] [required]
- Display
- Options: shape, cat, topo, dir, attr, zcoor
- Default: shape
- shape: Display geometry of features
- cat: Display category numbers of features
- topo: Display topology information (nodes, edges)
- dir: Display direction of linear features
- attr: Display selected attribute based on 'attrcolumn'
- zcoor: Display z-coordinate of features (only for 3D vector maps)
- type=string[,string,...]
- Feature type
- Options: point, line, boundary, centroid, area, face
- Default: point,line,boundary,centroid,area,face
- cats=range
- Category values
- Example: 1,3,7-9,13
- where=sql_query
- WHERE conditions of SQL statement without 'where' keyword
- Example: income < 1000 and inhab >= 10000
- color=string
- Feature color
- Either a standard GRASS color, R:G:B triplet, or "none"
- Default: black
- fcolor=string
- Area fill color
- Either a standard GRASS color, R:G:B triplet, or "none"
- Default: 200:200:200
- rgb_column=name
- Name of color definition column (for use with -a flag)
- Default: GRASSRGB
- zcolor=style
- Name of color table (for use with -z flag)
- Options: aspect, aspectcolr, bcyr, bgyr, byg, byr, celsius, corine, curvature, differences, elevation, etopo2, evi, gdd, grey, grey.eq, grey.log, grey1.0, grey255, gyr, haxby, ndvi, population, population_dens, precipitation, precipitation_monthly, rainbow, ramp, random, rstcurv, ryb, ryg, sepia, slope, srtm, terrain, wave
- Default: terrain
- aspect: aspect oriented grey colors
- aspectcolr: aspect oriented rainbow colors
- bcyr: blue through cyan through yellow to red
- bgyr: blue through green through yellow to red
- byg: blue through yellow to green
- byr: blue through yellow to red
- celsius: blue to red for degree Celsius temperature
- corine: EU Corine land cover colors
- curvature: for terrain curvatures (from v.surf.rst and r.slope.aspect)
- differences: differences oriented colors
- elevation: maps relative ranges of raster values to elevation color ramp
- etopo2: colors for ETOPO2 worldwide bathymetry/topography
- evi: enhanced vegetative index colors
- gdd: accumulated growing degree days
- grey: grey scale
- grey.eq: histogram-equalized grey scale
- grey.log: histogram logarithmic transformed grey scale
- grey1.0: grey scale for raster values between 0.0-1.0
- grey255: grey scale for raster values between 0-255
- gyr: green through yellow to red
- haxby: relative colors for bathymetry or topography
- ndvi: Normalized Difference Vegetation Index colors
- population: color table covering human population classification breaks
- population_dens: color table covering human population density classification breaks
- precipitation: precipitation color table (0..2000mm)
- precipitation_monthly: precipitation color table (0..1000mm)
- rainbow: rainbow color table
- ramp: color ramp
- random: random color table
- rstcurv: terrain curvature (from r.resamp.rst)
- ryb: red through yellow to blue
- ryg: red through yellow to green
- sepia: yellowish-brown through to white
- slope: r.slope.aspect-type slope colors for raster values 0-90
- srtm: color palette for Shuttle Radar Topography Mission elevation
- terrain: global elevation color table covering -11000 to +8850m
- wave: color wave
- width=integer
- Line width
- Default: 0
- width_column=name
- Name of numeric column containing line width
- These values will be scaled by width_scale
- width_scale=float
- Scale factor for width_column
- Default: 1
- icon=string
- Point and centroid symbol
- Options: basic/arrow1, basic/arrow2, basic/arrow3, basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3, basic/diamond, basic/marker, basic/octagon, basic/point, basic/pushpin, basic/star, basic/triangle, basic/x, demo/muchomurka, demo/smrk, extra/4pt_star, extra/adcp, extra/airport, extra/alpha_flag, extra/bridge, extra/compass, extra/dive_flag, extra/fancy_compass, extra/fiducial, extra/fish, extra/half-box, extra/half-circle, extra/n_arrow1, extra/n_arrow2, extra/n_arrow3, extra/n_arrow4, extra/offbox_ne, extra/offbox_nw, extra/offbox_se, extra/offbox_sw, extra/pentagon, extra/ping, extra/ring, extra/target, geology/half-arrow_left, geology/half-arrow_right, geology/strike_box, geology/strike_circle, geology/strike_half-bowtie, geology/strike_line, geology/strike_triangle
- Default: basic/x
- size=float
- Symbol size
- When used with the size_column option this becomes the scale factor
- Default: 5
- size_column=name
- Name of numeric column containing symbol size
- rotation_column=name
- Name of numeric column containing symbol rotation angle
- Measured in degrees CCW from east
- llayer=string
- Layer number or name
- Layer number for labels (default: the given layer number)
- Default: 1
- attrcolumn=name
- Name of column to be displayed
- lcolor=string
- Label color
- Either a standard color name or R:G:B triplet
- Default: red
- bgcolor=string
- Label background color
- Either a standard GRASS color, R:G:B triplet, or "none"
- Default: none
- bcolor=string
- Label border color
- Either a standard GRASS color, R:G:B triplet, or "none"
- Default: none
- lsize=integer
- Label size (pixels)
- Default: 8
- font=string
- Font name
- encoding=string
- Text encoding
- xref=string
- Label horizontal justification
- Options: left, center, right
- Default: left
- yref=string
- Label vertical justification
- Options: top, center, bottom
- Default: center
- minreg=float
- Minimum region size (average from height and width) when map is displayed
- maxreg=float
- Maximum region size (average from height and width) when map is displayed
DESCRIPTION
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.
By default d.vect fills in holes in polygons (islands). If
you only want to show active areas limit the features with, e.g.,
d.vect map=vector_map cats=1-999999
In order to display attributes in the map, display=attr must be
specified in addition to the column name (attrcolumn parameter).
Colors may be specified
by v.colors as a color table or
in an attribute table column named 'GRASSRGB' (which is
a varchar(11) column containing RRR:GGG:BBB values),
see the flag -a.
A table for a vector map might look like this:
db.select sql="select * from testisola"
cat|label|GRASSRGB
0|no data|255:255:255
90|FRASSILONGO|23:245:67
104|LEVICO|23:145:67
139|PERGINE VALSUGANA|223:45:237
168|SANT'ORSOLA|223:45:67
190|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 lcolor=green
# display randomly colorized soils map with attributes
d.vect -c map=soils display=attr attrcolumn=label
# display randomly colorized selected vectors from soils map
d.vect -c map=soils where="label='VBF'" display=shape,attr attrcolumn=label
3D points, 3D lines and 3D polygons colorized according to z height:
g.region rast=elevation.10m
r.random input=elevation.10m n=5000 vector=random3d -d
d.mon start=x0
# display as black points
d.vect map=random3d
# display 3D points colorized according to z height
d.vect -z map=random3d zcolor=gyr
# 3D contour lines
r.contour input=elevation.10m output=contour20m step=20
d.vect -z map=contour20m zcolor=gyr
# generate 3D triangles
v.delaunay input=random3d output=random3d_del
# display 3D polygons colorized according to z height
d.vect -z map=random3d_del type=area zcolor=gyr
SEE ALSO
v.colors,
d.erase,
d.rast,
v.colors,
v.db.addcolumn,
v.db.update
GRASS SQL interface
AUTHORS
CERL
Radim Blazek, ITC-Irst, Trento, Italy
Support for color tables by Martin Landa, Czech Technical University in Prague (8/2011)
and many other GRASS developers
Last changed: $Date: 2011-11-08 13:24:20 -0800 (Tue, 08 Nov 2011) $
Main index - Display index - Full index
© 2003-2012 GRASS Development Team