v.label(1)
π v.label β the GRASS GIS manual, but make it make sense π
okay bestie, gather round, because v.label is literally the moment. she's a GRASS GIS module (manual page v.label(1), iykyk) and her whole job is: creates paint labels for a vector map from attached attributes. that's it. that's the girl. β¨
π KEYWORDS π
vector, paint labels
πΈ SYNOPSIS πΈ
no cap, here's exactly how you summon her:
v.label
v.label --help
v.label [-ac] [labels=name] map=name column=name
[type=string[,string,...]] [layer=string] [where=sql_query]
[xoffset=float] [yoffset=float] [reference=string[,string,...]]
[font=string] [size=float] [space=float] [fontsize=integer]
[color=name] [rotation=angle] [width=float] [highlight_color=name]
[highlight_width=float] [bgcolor=name] [border=name]
[opaque=yes|no] [--help] [--verbose] [--quiet] [--ui]
π Flags:
-aβ Rotate labels to align with lines. she's matching the vibe of the line, periodt.-cβ Curl labels along lines. yes, curl. like a little cursive moment.--helpβ Print usage summary--verboseβ Verbose module output--quietβ Quiet module output--uiβ Force launching GUI dialog
π¦ Parameters:
labels=nameβ Name for new paint-label file. If not given the name of the input map is used.map=name[required] β Name of vector map. Or data source for direct OGR access.column=name[required] β Name of attribute column to be used for labels. this is the actual tea, bestie.type=string[,string,...]β Input feature type. Options:point,line,boundary,centroid. Default:point,line,boundary,centroidlayer=stringβ Layer number or name. Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name. Default:1where=sql_queryβ WHERE conditions of SQL statement without 'where' keyword. Example:income < 1000 and population >= 10000xoffset=floatβ Offset label in x-direction. Default:0yoffset=floatβ Offset label in y-direction. Default:0reference=string[,string,...]β Reference position. Options:center,left,right,upper,lower. Default:centerfont=stringβ Font name. Default:standardsize=floatβ Label size (in map-units). Default:100space=floatβ Space between letters for curled labels (in map-units)fontsize=integerβ Label size (in points). Options:1-1000color=nameβ Text color. Either a standard color name orR:G:Btriplet. Default:blackrotation=angleβ Rotation angle in degrees (counter-clockwise). Options:0-360. Default:0width=floatβ Border width. Options:0-25. Default:1highlight_color=nameβ Highlight color for text. Either a standard color name,R:G:Btriplet, or"none". Default:nonehighlight_width=floatβ Width of highlight coloring. Default:0bgcolor=nameβ Background color. Either a standard color name,R:G:Btriplet, or"none". Default:noneborder=nameβ Border color. Either a standard color name,R:G:Btriplet, or"none". Default:noneopaque=yes|noβ Opaque to vector (only relevant if background color is selected). Options:yes,no. Default:yes
β¨ DESCRIPTION β¨
v.label makes a label-file from a GRASS vector map with labels created from attributes in the attached table. and if you don't give her a label file name? she just uses the name of the source map. lowkey efficient, highkey iconic. π
π NOTES π
okay so, if the fontsize option is given then the space option is determined automatically from the current display window. otherwise? you gotta set the space option roughly the same as the size option. those are the rules, bestie. π
A description of the labels file follows. π«Ά
The file is located in $MAPSET/paint/labels/. The file is a plain-text ASCII file containing the following fields:
β οΈ Caution: The following information may be incomplete, out of date, and wrong!
bestie. she SAID what she said. proceed with love but also with caution. π
The label information that must be provided in the labels file is:
TEXT:
Lines in multiple line labels will appear one above the next. More than one line of text can be specified by notating the end of a line with a '\n'. (e.g. SPEARFISH\nSOUTH DAKOTA). yes, the classic two-line moment. π
LOCATION:
Determines where the text will be located on the image. The user specifies the easting and northing, and (optionally) specifies a vertical and horizontal offset from the specified easting/northing. These offsets are provided to allow finer placement of labels and are measured in local pixels. Thus in d.labels the offset is measured in screen pixels, and in ps.map the offset is measured in PostScript points (i.e. 1/72" steps).
PLACEMENT:
Determines which part of the label to which the location refers. If placement is unspecified, the label is centered (center), by default. Label placement may be specified as:
lower left(lower left corner of the text)lower right(lower right corner of the text)lower center(bottom center of the text)upper left(upper left corner of the text)upper right(upper right corner of the text)upper center(top center of the text)center(center of the text)
FONT:
This specifies the font to use.
The following fonts are available for use with d.labels:
cyrilc gothgbt gothgrt gothitt greekc greekcs greekp greeks
italicc italiccs italict romanc romancs romand romans romant
scriptc scripts
Alternatively the path to a FreeType (.ttf) font may be given. (for d.labels only)
The word standard can be used to specify the default font (which is romans).
Note ps.map can override this setting to use other fonts. Its default font is Helvetica.
TEXT SIZE:
This determines the size of the letters. The size specifies the vertical height of the letters in meters on the ground. Thus text will grow or shrink depending on the scale at which the map is drawn. Alternatively fontsize can set the font size in normal font points. it's giving responsive design, honestly. π
TEXT COLOR:
This selects the text color. If unspecified, the label's text is drawn in black, by default. The text color can be specified in one of several ways:
- By color name:
aqua black blue brown cyan gray green grey indigo magenta orange
purple red violet white yellow
- As red, green, blue component values. (
0-255) for example:128:100:200 - Specify
"none"to suppress the lettering.
WIDTH:
This determines the line thickness of the border box. The maximum value is 25.0.
HIGHLIGHT COLOR:
The text can be highlighted in another color so that it appears to be in two colors. The text is drawn first in this color at a wider line width, and then redrawn in the text color at the regular line width. No highlight color ("none") is used by default, if unspecified by the user. To specify use of no highlight color, specify "none". (See TEXT COLOR above for a list of permissible color names.) not me giving the text a glow-up π
HIGHLIGHT WIDTH:
Specifies how far from the text lines (in units of pixels) the highlight color should extend. The default highlight width is set to 0 (i.e., no highlight color).
BACKGROUND COLOR:
Text may be boxed in a solid color by specifying a background color. Specify "none" for no background. The default background color setting, if unspecified by the user, is white. (See TEXT COLOR above for a list of permissible color names.)
BORDER COLOR:
Select a color for the border around the background. Specify "none" to suppress the border. The default border color used, if unspecified, is black. (See TEXT COLOR above for a list of permissible color names.)
OPAQUE TO VECTORS:
yes|no. This field only has meaning if a background color is selected. yes will prevent vector lines from entering the background. no will allow vector lines to enter the background. The default setting, if unspecified by the user, is yes.
π EXAMPLE π
Spearfish example with TrueType font (path may differ):
v.label -a map=roads column=label labels=lroads \
font=/usr/X11R6/lib/X11/fonts/TTF/luximri.ttf
d.vect roads
d.labels lroads
Since the label files are simple text files, you can merge them together if you like. For example if you set the label colors based on database attributes using multiple runs with the where option. This example uses the standard UNIX cat program.
cd $MAPSET/paint/labels/
cat file1 file2 file3 file4 > file_all
fr fr, cat is that girl and she never misses. π
π SEE ALSO π
d.labels, ps.map
π AUTHORS π
- Philip Verhagen (original
s.label) - Radim Blazek (GRASS 6 port)
- Hamish Bowman (enhancements)
π₯ SOURCE CODE π₯
Available at: v.label source code (history)
Accessed: Saturday Jan 17 05:41:23 2026
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page, bestie π«Ά this was v.label(1) from the GRASS GIS 8.4.2 Reference Manual, version GRASS 8.4.2, Β© 2003-2025 GRASS Development Team. she ate and left no crumbs. go label something. ππ
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms