d.vect(1grass)

🌈 d.vect 🌈

okay bestie, this is the d.vect page straight out of the GRASS User's Manual, and she is a whole main character. buckle up. πŸŽ€


✨ NAME ✨

d.vect β€” displays user-specified vector map in the active graphics frame. that's the whole assignment and she ate. πŸ’…

πŸ”‘ KEYWORDS πŸ”‘

display, graphics, vector, level1

πŸ“œ SYNOPSIS πŸ“œ

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]

like, look at all those options. she's thriving. πŸ¦‹


🚩 Flags

  • -c β€” Random colors according to category number (or layer number if 'layer=-1' is given) 🎨
  • -i β€” Use values from 'cats' option as feature id
  • -r β€” Use square root of the value of size_column This makes circle areas proportionate to the size_column values instead of circle radius. lowkey a math slay. πŸ“
  • -s β€” Do not show this layer in vector legend (shy layer energy, we respect it πŸ™ˆ)
  • --help β€” Print usage summary
  • --verbose β€” Verbose module output (she will NOT stop talking and honestly? iconic)
  • --quiet β€” Quiet module output
  • --ui β€” Force launching GUI dialog

πŸŽ€ Parameters

  • map=name [required] β€” Name of vector map Or data source for direct OGR access
  • layer=string β€” 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, vert, dir, zcoor Default: shape
    • shape: Display geometry of features
    • cat: Display category numbers of features
    • topo: Display topology information (nodes, edges)
    • vert: Display vertices of features
    • dir: Display direction of linear features
    • zcoor: Display z-coordinate of features (only for 3D vector maps)
  • type=string[,string,...] β€” Input feature type Options: point, line, boundary, centroid, area, face Default: point,line,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 population >= 10000
  • color=name β€” Feature color Either a standard color name, R:G:B triplet, or "none" Default: 0:29:57
  • fill_color=name β€” Area fill color Either a standard color name, R:G:B triplet, or "none" Default: 0:103:204
  • rgb_column=name β€” Colorize features according to color definition column Color definition in R:G:B form
  • zcolor=style β€” Colorize point or area features according to z-coordinate. get ready, this list is a journey. 😭 Options: aspect, aspectcolr, bcyr, bgyr, blues, byg, byr, celsius, corine, curvature, differences, elevation, etopo2, evi, fahrenheit, forest_cover, gdd, grass, greens, grey, grey.eq, grey.log, grey1.0, grey255, gyr, haxby, inferno, kelvin, magma, ndvi, ndwi, nlcd, oranges, plasma, population, population_dens, precipitation, precipitation_daily, precipitation_monthly, rainbow, ramp, random, reds, roygbiv, rstcurv, ryb, ryg, sepia, slope, soilmoisture, srtm, srtm_percent, srtm_plus, terrain, viridis, water, wave
    • aspect: aspect oriented grey colors [range: map values]
    • aspectcolr: aspect oriented rainbow colors [range: 0 to 360]
    • bcyr: blue through cyan through yellow to red [range: map values]
    • bgyr: blue through green through yellow to red [range: map values]
    • blues: white to blue [range: map values]
    • byg: blue through yellow to green [range: map values]
    • byr: blue through yellow to red [range: map values]
    • celsius: blue to red for degree Celsius temperature [range: -80 to 80]
    • corine: EU Corine land cover colors [range: 111 to 995]
    • curvature: for terrain curvatures (from v.surf.rst and r.slope.aspect) [range: map values]
    • differences: differences oriented colors [range: map values]
    • elevation: maps relative ranges of raster values to elevation color ramp [range: map values]
    • etopo2: colors for ETOPO2 worldwide bathymetry/topography [range: -11000 to 8850]
    • evi: enhanced vegetative index colors [range: -1 to 1]
    • fahrenheit: blue to red for Fahrenheit temperature [range: -112 to 176]
    • forest_cover: percentage of forest cover [range: 0 to 100]
    • gdd: accumulated growing degree days [range: 0 to 6000]
    • grass: GRASS green (perceptually uniform) [range: map values]
    • greens: white to green [range: map values]
    • grey: grey scale [range: map values]
    • grey.eq: histogram-equalized grey scale [range: map values]
    • grey.log: histogram logarithmic transformed grey scale [range: map values]
    • grey1.0: grey scale for raster values between 0.0-1.0 [range: 0 to 1]
    • grey255: grey scale for raster values between 0-255 [range: 0 to 255]
    • gyr: green through yellow to red [range: map values]
    • haxby: relative colors for bathymetry or topography [range: map values]
    • inferno: perceptually uniform sequential color table inferno [range: map values]
    • kelvin: blue to red for temperature in Kelvin scale [range: 193.15 to 353.15]
    • magma: perceptually uniform sequential color table magma [range: map values]
    • ndvi: Normalized Difference Vegetation Index colors [range: -1 to 1]
    • ndwi: Normalized Difference Water Index colors [range: -200 to 200]
    • nlcd: US National Land Cover Dataset colors [range: 0 to 95]
    • oranges: white to orange [range: map values]
    • plasma: perceptually uniform sequential color table plasma [range: map values]
    • population: color table covering human population classification breaks [range: 0 to 2e+09]
    • population_dens: color table covering human population density classification breaks [range: 0 to 1e+09]
    • precipitation: precipitation color table (0..2000mm) [range: 0 to 7000]
    • precipitation_daily: precipitation color table (0..1000mm) [range: 0 to 10000]
    • precipitation_monthly: precipitation color table (0..1000mm) [range: 0 to 1000]
    • rainbow: rainbow color table [range: map values]
    • ramp: color ramp [range: map values]
    • random: random color table [range: map values]
    • reds: white to red [range: map values]
    • roygbiv: [range: map values] (yes bestie, she has no description. she simply is. πŸ’€)
    • rstcurv: terrain curvature (from r.resamp.rst) [range: map values]
    • ryb: red through yellow to blue [range: map values]
    • ryg: red through yellow to green [range: map values]
    • sepia: yellowish-brown through to white [range: map values]
    • slope: r.slope.aspect-type slope colors for raster values 0-90 [range: 0 to 90]
    • soilmoisture: soilmoisture color table (0.0-1.0) [range: 0 to 1]
    • srtm: color palette for Shuttle Radar Topography Mission elevation [range: -11000 to 8850]
    • srtm_percent: color palette for Shuttle Radar Topography Mission using relative elevation [range: map values]
    • srtm_plus: color palette for Shuttle Radar Topography Mission elevation (with seafloor colors) [range: -11000 to 8850]
    • terrain: global elevation color table covering -11000 to +8850m [range: -11000 to 8850]
    • viridis: perceptually uniform sequential color table viridis [range: map values]
    • water: water depth [range: map values]
    • wave: color wave [range: map values]
  • 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/arrow, basic/arrow1, basic/arrow2, basic/arrow3, basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3, basic/diamond, basic/hexagon, basic/marker, basic/octagon, basic/pin, basic/pin_dot, 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/dim_arrow, extra/dive_flag, extra/fiducial, extra/fish, extra/half-box, extra/half-circle, extra/offbox_ne, extra/offbox_nw, extra/offbox_se, extra/offbox_sw, extra/pentagon, extra/ping, extra/ring, extra/simple_zia, extra/target, geology/circle_cross, geology/half-arrow_left, geology/half-arrow_right, geology/strike_box, geology/strike_circle, geology/strike_cleavage, geology/strike_half-bowtie, geology/strike_line, geology/strike_parallel, geology/strike_triangle, legend/area, legend/area_curved, legend/line, legend/line_crooked, n_arrows/basic_compass, n_arrows/fancy_compass, n_arrows/n_arrow1a, n_arrows/n_arrow1b, n_arrows/n_arrow2, n_arrows/n_arrow3, n_arrows/n_arrow4, n_arrows/n_arrow5, n_arrows/n_arrow6, n_arrows/n_arrow7a, n_arrows/n_arrow7b, n_arrows/n_arrow8a, n_arrows/n_arrow8b, n_arrows/n_arrow9 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

πŸ¦‹ and bestie… there's more coming. don't you dare close the tab.

  • icon_area=string β€” the area/boundary symbol for your legend, bestie πŸ’…

Options: basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3, basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3, basic/diamond, basic/hexagon, basic/marker, basic/octagon, basic/pin, basic/pin_dot, 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/dim_arrow, extra/dive_flag, extra/fiducial, extra/fish, extra/half-box, extra/half-circle, extra/offbox_ne, extra/offbox_nw, extra/offbox_se, extra/offbox_sw, extra/pentagon, extra/ping, extra/ring, extra/simple_zia, extra/target, geology/circle_cross, geology/half-arrow_left, geology/half-arrow_right, geology/strike_box, geology/strike_circle, geology/strike_cleavage, geology/strike_half-bowtie, geology/strike_line, geology/strike_parallel, geology/strike_triangle, legend/area, legend/area_curved, legend/line, legend/line_crooked, n_arrows/basic_compass, n_arrows/fancy_compass, n_arrows/n_arrow1a, n_arrows/n_arrow1b, n_arrows/n_arrow2, n_arrows/n_arrow3, n_arrows/n_arrow4, n_arrows/n_arrow5, n_arrows/n_arrow6, n_arrows/n_arrow7a, n_arrows/n_arrow7b, n_arrows/n_arrow8a, n_arrows/n_arrow8b, n_arrows/n_arrow9

Default: legend/area

  • icon_line=string β€” the line symbol for your legend, icon behavior fr fr ✨

Options: basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3, basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3, basic/diamond, basic/hexagon, basic/marker, basic/octagon, basic/pin, basic/pin_dot, 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/dim_arrow, extra/dive_flag, extra/fiducial, extra/fish, extra/half-box, extra/half-circle, extra/offbox_ne, extra/offbox_nw, extra/offbox_se, extra/offbox_sw, extra/pentagon, extra/ping, extra/ring, extra/simple_zia, extra/target, geology/circle_cross, geology/half-arrow_left, geology/half-arrow_right, geology/strike_box, geology/strike_circle, geology/strike_cleavage, geology/strike_half-bowtie, geology/strike_line, geology/strike_parallel, geology/strike_triangle, legend/area, legend/area_curved, legend/line, legend/line_crooked, n_arrows/basic_compass, n_arrows/fancy_compass, n_arrows/n_arrow1a, n_arrows/n_arrow1b, n_arrows/n_arrow2, n_arrows/n_arrow3, n_arrows/n_arrow4, n_arrows/n_arrow5, n_arrows/n_arrow6, n_arrows/n_arrow7a, n_arrows/n_arrow7b, n_arrows/n_arrow8a, n_arrows/n_arrow8b, n_arrows/n_arrow9

Default: legend/line

  • legend_label=string β€” the label that shows up after the symbol in your vector legend πŸŽ€
  • label_layer=string β€” which layer number the labels live on (default: whatever layer number you gave). Vector features can hold category values in different layers, and this number is the one that decides which layer gets used. When you're doing direct OGR access, this is the layer name instead.

Default: 1

  • attribute_column=name β€” name of the column you wanna show as a label πŸ‘‘
  • label_color=name β€” label color. Either a standard color name or an R:G:B triplet.

Default: red

  • label_bgcolor=name β€” label background color. Either a standard color name, an R:G:B triplet, or "none".

Default: none

  • label_bcolor=name β€” label border color. Either a standard color name, an R:G:B triplet, or "none".

Default: none

  • label_size=integer β€” label size in 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 the map is displayed
  • maxreg=float β€” maximum region size (average from height and width) when the map is displayed

πŸ’– DESCRIPTION πŸ’–

d.vect displays vector maps in the active frame on the graphics monitor. That's the whole vibe. πŸ¦‹


🌸 NOTES 🌸

Okay so, you can absolutely just type d.vect map=vector_map and call it a day. But there are a huge variety of optional parameters that let you specify vector type, colors, data fields, SQL queries, label size and justification, etc. The customization potential is genuinely unreal πŸ’…

Heads up bestie: when you're using d.vect with the where parameter on the MS Windows Command Prompt, you need to use the Λ† caret symbol to escape special characters < > ( ) & | , ; ". No cap.
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. So if you're not feeling the outline, you can suppress it with:

d.vect map=vector_map color=none

And if you want those areas see-through, make them transparent with:

d.vect map=vector_map fill_color=none

In order to display attributes in the map, attribute_column must be specified. Yes, it's mandatory for that feature, no shortcuts πŸ™ˆ

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. Both? Both. ✨

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. Chaotic? A little. Iconic? Absolutely. πŸ”₯

This module can use FreeType/TrueType fonts β€” if they've already been selected with d.font. So go pick your font first, bestie.

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'). So basically β€” zero width is speedy, but don't assume it looks identical everywhere. πŸ’€


⭐ EXAMPLES ⭐

Spearfish examples:

# display roads with category numbers:
d.vect map=roads display=shape,cat label_color=green
# display randomly colorized soils map with attributes
d.vect -c map=soils attribute_column=label
# display randomly colorized selected vectors from soils map
d.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.10m
r.random input=elevation.10m n=5000 vector=random3d -z
d.mon start=x0
# display as black points
d.vect map=random3d
# display 3D points colorized according to z height
d.vect map=random3d zcolor=gyr
# 3D contour lines
r.contour input=elevation.10m output=contour20m step=20
d.vect map=contour20m zcolor=gyr
# generate 3D triangles
v.delaunay input=random3d output=random3d_del
# display 3D polygons colorized according to z height
d.vect 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

The way that's a whole community effort πŸ˜­πŸ’œ


🌈 SOURCE CODE 🌈

Available at: d.vect source code (history)

Latest change: Saturday Aug 09 12:50:00 2025 in commit 1ccfa1e6cb078a19a188bef52cc155fc3d47aa06

Main index | Display index | Topics index | Keywords index | Graphical index | Full index


okay that's the whole page bestie, you're officially a d.vect main character now πŸ‘‘βœ¨ this is GRASS 8.5.0, Β© 2003-2026 GRASS Development Team, and the man page itself is dated like the rest of the 8.5.0 Reference Manual β€” go make something gorgeous, periodt πŸ’–πŸ¦‹

πŸ“¦ where this page comes from