logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

v.label.sa - Create optimally placed labels for vector map(s)

Author

       Wolf Bergenheim

Description

v.label.sa makes a label-file from a GRASS vector map with labels created from attributes in the attached
       table.  The  labels are placed in as optimal place as possible. The label file has the same syntax as the
       one created by v.label

Example

       North Carolina example:

       # get font names:
       d.font -L
       v.label.sa roadsmajor labels=roads_labels column=ROAD_NAME color=red \
                  background=white size=250 font=Vera
       # set region:
       g.region raster=lsat7_2002_10 -p
       # display:
       d.rgb b=lsat7_2002_10 g=lsat7_2002_20 r=lsat7_2002_30
       d.vect roadsmajor col=yellow
       d.labels roads_labels

       Roadlabelingwithv.label.sa(Raleigh,NorthCarolina,USA,area)

Keywords

       vector, paint labels

Name

v.label.sa  - Create optimally placed labels for vector map(s)

References

       Edmondson, Christensen, Marks and Shieber: A General Cartographic Labeling Algorithm, Cartographica, Vol.
       33, No. 4, Winter 1996, pp. 13-23 The algorithm works by the principle of Simulated Annealing.

See Also

d.labeld.labelsps.mapWikipediaarticleonsimulatedannealing

Source Code

       Available at: v.label.sa source code (history)

       Accessed: Friday Apr 04 01:20:22 2025

       Main index | Vector index | Topics index | Keywords index | Graphical index | Full index

       © 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

GRASS 8.4.1                                                                                   v.label.sa(1grass)

Synopsis

v.label.sav.label.sa--helpv.label.samap=name   [type=string[,string,...]]   [layer=string]  column=stringlabels=namefont=string
       [size=float]    [isize=float]    [charset=string]    [color=string]    [hcolor=string]     [hwidth=float]
       [background=string]     [opaque=yes|no]     [border=string]     [width=float]     [--help]    [--verbose]
       [--quiet]  [--ui]

   Flags:--help
           Print usage summary

       --verbose
           Verbose module output

       --quiet
           Quiet module output

       --ui
           Force launching GUI dialog

   Parameters:map=name[required]
           Name of vector map
           Or data source for direct OGR access

       type=string[,string,...]
           Input feature type
           Options: point,line,area
           Default: point,line,arealayer=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: 1column=string[required]
           Name of attribute column to be used for labels

       labels=name[required]
           Name for new paint-label file

       font=string[required]
           Name of TrueType font (as listed in the fontcap)

       size=float
           Label size (in map-units)
           Default: 100isize=float
           Icon size of point features (in map-units)
           Default: 10charset=string
           Character encoding (default: UTF-8)
           Default: UTF-8color=string
           Text color
           Options:  aqua,black,blue,brown,cyan,gray,green,grey,indigo,magenta,orange,purple,red,violet,white,yellow
           Default: blackhcolor=string
           Highlight color for text
           Options: none,aqua,black,blue,brown,cyan,gray,green,grey,indigo,magenta,orange,purple,red,violet,white,yellow
           Default: nonehwidth=float
           Width of highlight coloring
           Default: 0background=string
           Background color
           Options:  none,aqua,black,blue,brown,cyan,gray,green,grey,indigo,magenta,orange,purple,red,violet,white,yellow
           Default: noneopaque=yes|no
           Opaque to vector (only relevant if background color is selected)
           Options: yes,no
           Default: yesborder=string
           Border color
           Options: none,aqua,black,blue,brown,cyan,gray,green,grey,indigo,magenta,orange,purple,red,violet,white,yellow
           Default: nonewidth=float
           Border width (only for ps.map output)
           Default: 0

See Also