.TH v.label 1grass "" "GRASS 7.8.5" "GRASS GIS User's Manual" .SH NAME \fI\fBv.label\fR\fR \- Creates paint labels for a vector map from attached attributes. .SH KEYWORDS vector, paint labels .SH SYNOPSIS \fBv.label\fR .br \fBv.label \-\-help\fR .br \fBv.label\fR [\-\fBac\fR] [\fBlabels\fR=\fIname\fR] \fBmap\fR=\fIname\fR \fBcolumn\fR=\fIname\fR [\fBtype\fR=\fIstring\fR[,\fIstring\fR,...]] [\fBlayer\fR=\fIstring\fR] [\fBwhere\fR=\fIsql_query\fR] [\fBxoffset\fR=\fIfloat\fR] [\fByoffset\fR=\fIfloat\fR] [\fBreference\fR=\fIstring\fR[,\fIstring\fR,...]] [\fBfont\fR=\fIstring\fR] [\fBsize\fR=\fIfloat\fR] [\fBspace\fR=\fIfloat\fR] [\fBfontsize\fR=\fIinteger\fR] [\fBcolor\fR=\fIname\fR] [\fBrotation\fR=\fIangle\fR] [\fBwidth\fR=\fIfloat\fR] [\fBhighlight_color\fR=\fIname\fR] [\fBhighlight_width\fR=\fIfloat\fR] [\fBbgcolor\fR=\fIname\fR] [\fBborder\fR=\fIname\fR] [\fBopaque\fR=\fIyes|no\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-a\fR" 4m .br Rotate labels to align with lines .IP "\fB\-c\fR" 4m .br Curl labels along lines .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBlabels\fR=\fIname\fR" 4m .br Name for new paint\-label file .br If not given the name of the input map is used .IP "\fBmap\fR=\fIname\fR \fB[required]\fR" 4m .br Name of vector map .br Or data source for direct OGR access .IP "\fBcolumn\fR=\fIname\fR \fB[required]\fR" 4m .br Name of attribute column to be used for labels .IP "\fBtype\fR=\fIstring[,\fIstring\fR,...]\fR" 4m .br Input feature type .br Options: \fIpoint, line, boundary, centroid\fR .br Default: \fIpoint,line,boundary,centroid\fR .IP "\fBlayer\fR=\fIstring\fR" 4m .br Layer number or name .br 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. .br Default: \fI1\fR .IP "\fBwhere\fR=\fIsql_query\fR" 4m .br WHERE conditions of SQL statement without \(cqwhere\(cq keyword .br Example: income < 1000 and population >= 10000 .IP "\fBxoffset\fR=\fIfloat\fR" 4m .br Offset label in x\-direction .br Default: \fI0\fR .IP "\fByoffset\fR=\fIfloat\fR" 4m .br Offset label in y\-direction .br Default: \fI0\fR .IP "\fBreference\fR=\fIstring[,\fIstring\fR,...]\fR" 4m .br Reference position .br Options: \fIcenter, left, right, upper, lower\fR .br Default: \fIcenter\fR .IP "\fBfont\fR=\fIstring\fR" 4m .br Font name .br Default: \fIstandard\fR .IP "\fBsize\fR=\fIfloat\fR" 4m .br Label size (in map\-units) .br Default: \fI100\fR .IP "\fBspace\fR=\fIfloat\fR" 4m .br Space between letters for curled labels (in map\-units) .IP "\fBfontsize\fR=\fIinteger\fR" 4m .br Label size (in points) .br Options: \fI1\-1000\fR .IP "\fBcolor\fR=\fIname\fR" 4m .br Text color .br Either a standard color name or R:G:B triplet .br Default: \fIblack\fR .IP "\fBrotation\fR=\fIangle\fR" 4m .br Rotation angle in degrees (counter\-clockwise) .br Options: \fI0\-360\fR .br Default: \fI0\fR .IP "\fBwidth\fR=\fIfloat\fR" 4m .br Border width .br Options: \fI0\-25\fR .br Default: \fI1\fR .IP "\fBhighlight_color\fR=\fIname\fR" 4m .br Highlight color for text .br Either a standard color name, R:G:B triplet, or \(dqnone\(dq .br Default: \fInone\fR .IP "\fBhighlight_width\fR=\fIfloat\fR" 4m .br Width of highlight coloring .br Default: \fI0\fR .IP "\fBbgcolor\fR=\fIname\fR" 4m .br Background color .br Either a standard color name, R:G:B triplet, or \(dqnone\(dq .br Default: \fInone\fR .IP "\fBborder\fR=\fIname\fR" 4m .br Border color .br Either a standard color name, R:G:B triplet, or \(dqnone\(dq .br Default: \fInone\fR .IP "\fBopaque\fR=\fIyes|no\fR" 4m .br Opaque to vector (only relevant if background color is selected) .br Options: \fIyes, no\fR .br Default: \fIyes\fR .SH DESCRIPTION \fIv.label\fR makes a label\-file from a GRASS vector map with labels created from attributes in the attached table. If no label file name is given, the name of the source map is used. .SH NOTES If the \fIfontsize\fR option is given then the \fIspace\fR option is determined automatically \fIfrom the current display window\fR, otherwise the \fIspace\fR option should be set roughly the same as the \fIsize\fR option. .PP A description of the labels file follows. .PP The file is located in $MAPSET/paint/labels/. The file is a plain\-text ASCII file containing the following fields: .SS Caution: The following information may be incomplete, out of date, and wrong! The label information that must be provided in the \fIlabels\fR file is: .IP "\fBTEXT\fR: " 4m .br 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 \(cq\fB\(rsn\fR\(cq. .br (e.g. SPEARFISH\fB\(rsn\fRSOUTH DAKOTA). .IP "\fBLOCATION\fR: " 4m .br 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 \fId.labels\fR the offset is measured in screen pixels, and in \fIps.map\fR the offset is measured in PostScript points (i.e. 1/72\(dq steps). .IP "\fBPLACEMENT\fR: " 4m .br Determines which part of the label to which the location refers. If placement is unspecified, the label is centered (\fIcenter\fR), by default. Label placement may be specified as: .br .nf \fC 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) \fR .fi .IP "\fBFONT\fR: " 4m .br This specifies the font to use. .PP The following fonts are available for use with \fId.labels\fR: .PP .br .nf \fC cyrilc gothgbt gothgrt gothitt greekc greekcs greekp greeks italicc italiccs italict romanc romancs romand romans romant scriptc scripts \fR .fi .PP Alternatively the path to a FreeType (.ttf) font may be given. (for \fId.labels\fR only) .PP The word \fIstandard\fR can be used to specify the default font (which is \fIromans\fR). .PP Note \fIps.map\fR can override this setting to use other fonts. Its default font is Helvetica. .IP "\fBTEXT SIZE\fR: " 4m .br This determines the size of the letters. The \fIsize\fR 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 \fIfontsize\fR can set the font size in normal font points. .IP "\fBTEXT COLOR\fR: " 4m .br This selects the text color. If unspecified, the label\(cqs text is drawn in \fIblack\fR, by default. The text color can be specified in one of several ways: .IP .IP \fB1\fR By color name: .br aqua black blue brown cyan gray green grey indigo magenta orange purple red violet white yellow .IP \fB2\fR As red, green, blue component values. (0\-255) .br for example: 128:100:200 .IP \fB3\fR Specify \(dqnone\(dq to suppress the lettering. .PP .IP "\fBWIDTH\fR: " 4m .br This determines the line thickness of the border box. .br The maximum value is 25.0. .IP "\fBHIGHLIGHT COLOR\fR: " 4m .br 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 (\(dqnone\(dq) is used by default, if unspecified by the user. To specify use of no highlight color, specify \(dqnone\(dq. (See TEXT COLOR above for a list of permissible color names.) .IP "\fBHIGHLIGHT WIDTH\fR: " 4m .br Specifies how far from the text lines (in units of pixels) the highlight color should extend. The default highlight width is set to \fI0\fR (i.e., no highlight color). .IP "\fBBACKGROUND COLOR\fR: " 4m .br Text may be boxed in a solid color by specifying a background color. Specify \(dqnone\(dq for no background. The default background color setting, if unspecified by the user, is \fIwhite\fR. (See TEXT COLOR above for a list of permissible color names.) .IP "\fBBORDER COLOR\fR: " 4m .br Select a color for the border around the background. Specify \(dqnone\(dq to suppress the border. The default border color used, if unspecified, is \fIblack\fR. (See TEXT COLOR above for a list of permissible color names.) .IP "\fBOPAQUE TO VECTORS\fR: " 4m .br \fIyes|no\fR. This field only has meaning if a background color is selected. \fIyes\fR will prevent vector lines from entering the background. \fIno\fR will allow vector lines to enter the background. The default setting, if unspecified by the user, is \fIyes\fR. .SH EXAMPLE Spearfish example with TrueType font (path may differ): .br .nf \fC v.label \-a map=roads column=label labels=lroads \(rs font=/usr/X11R6/lib/X11/fonts/TTF/luximri.ttf d.vect roads d.labels lroads \fR .fi 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 \fBwhere\fR option. This example uses the standard UNIX cat program. .br .nf \fC cd $MAPSET/paint/labels/ cat file1 file2 file3 file4 > file_all \fR .fi .SH SEE ALSO \fI d.labels, ps.map \fR .SH AUTHORS Philip Verhagen (original s.label) .br Radim Blazek (GRASS 6 port) .br Hamish Bowman (enhancements) .SH SOURCE CODE .PP Available at: v.label source code (history) .PP Main index | Vector index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual