Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 2225

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: v.label</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>v.label</b></em>  - Creates paint labels for a vector map from attached attributes.
<h2>KEYWORDS</h2>
vector, paint labels
<h2>SYNOPSIS</h2>
<b>v.label</b><br>
<b>v.label help</b><br>
<b>v.label</b> [-<b>ac</b>]  [<b>labels</b>=<em>name</em>]  <b>map</b>=<em>name</em> <b>column</b>=<em>name</em>  [<b>type</b>=<em>string</em>[,<i>string</i>,...]]   [<b>layer</b>=<em>integer</em>]   [<b>where</b>=<em>sql_query</em>]   [<b>xoffset</b>=<em>float</em>]   [<b>yoffset</b>=<em>float</em>]   [<b>reference</b>=<em>string</em>[,<i>string</i>,...]]   [<b>font</b>=<em>string</em>]   [<b>size</b>=<em>float</em>]   [<b>space</b>=<em>float</em>]   [<b>fontsize</b>=<em>integer</em>]   [<b>color</b>=<em>name</em>]   [<b>rotation</b>=<em>angle</em>]   [<b>width</b>=<em>float</em>]   [<b>hcolor</b>=<em>name</em>]   [<b>hwidth</b>=<em>float</em>]   [<b>background</b>=<em>name</em>]   [<b>border</b>=<em>name</em>]   [<b>opaque</b>=<em>yes|no</em>]   [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>-a</b></DT>
<DD>Rotate labels to align with lines</DD>

<DT><b>-c</b></DT>
<DD>Curl labels along lines</DD>

<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>labels</b>=<em>name</em></DT>
<DD>Name for new paint-label file</DD>
<DD>If not given the name of the input map is used</DD>

<DT><b>map</b>=<em>name</em></DT>
<DD>Name of input vector map</DD>

<DT><b>column</b>=<em>name</em></DT>
<DD>Name of attribute column to be used for labels</DD>

<DT><b>type</b>=<em>string[,<i>string</i>,...]</em></DT>
<DD>Type</DD>
<DD>Feature type(s)</DD>
<DD>Options: <em>point,line,boundary,centroid</em></DD>
<DD>Default: <em>point,line,boundary,centroid</em></DD>

<DT><b>layer</b>=<em>integer</em></DT>
<DD>Layer number</DD>
<DD>A single vector map can be connected to multiple database tables. This number determines which table to use.</DD>
<DD>Default: <em>1</em></DD>

<DT><b>where</b>=<em>sql_query</em></DT>
<DD>WHERE conditions of SQL statement without 'where' keyword</DD>
<DD>Example: income &lt; 1000 and inhab &gt;= 10000</DD>

<DT><b>xoffset</b>=<em>float</em></DT>
<DD>Offset label in x-direction</DD>
<DD>Default: <em>0</em></DD>

<DT><b>yoffset</b>=<em>float</em></DT>
<DD>Offset label in y-direction</DD>
<DD>Default: <em>0</em></DD>

<DT><b>reference</b>=<em>string[,<i>string</i>,...]</em></DT>
<DD>Reference position</DD>
<DD>Options: <em>center,left,right,upper,lower</em></DD>
<DD>Default: <em>center</em></DD>

<DT><b>font</b>=<em>string</em></DT>
<DD>Font name</DD>
<DD>Default: <em>standard</em></DD>

<DT><b>size</b>=<em>float</em></DT>
<DD>Label size (in map-units)</DD>
<DD>Default: <em>100</em></DD>

<DT><b>space</b>=<em>float</em></DT>
<DD>Space between letters for curled labels (in map-units)</DD>

<DT><b>fontsize</b>=<em>integer</em></DT>
<DD>Label size (in points)</DD>
<DD>Options: <em>1-1000</em></DD>

<DT><b>color</b>=<em>name</em></DT>
<DD>Text color</DD>
<DD>Either a standard color name or R:G:B triplet</DD>
<DD>Default: <em>black</em></DD>

<DT><b>rotation</b>=<em>angle</em></DT>
<DD>Rotation angle (degrees counter-clockwise)</DD>
<DD>Options: <em>0-360</em></DD>
<DD>Default: <em>0</em></DD>

<DT><b>width</b>=<em>float</em></DT>
<DD>Border width</DD>
<DD>Options: <em>0-25</em></DD>
<DD>Default: <em>1</em></DD>

<DT><b>hcolor</b>=<em>name</em></DT>
<DD>Highlight color for text</DD>
<DD>Either a standard GRASS color, R:G:B triplet, or "none"</DD>
<DD>Default: <em>none</em></DD>

<DT><b>hwidth</b>=<em>float</em></DT>
<DD>Width of highlight coloring</DD>
<DD>Default: <em>0</em></DD>

<DT><b>background</b>=<em>name</em></DT>
<DD>Background color</DD>
<DD>Either a standard GRASS color, R:G:B triplet, or "none"</DD>
<DD>Default: <em>none</em></DD>

<DT><b>border</b>=<em>name</em></DT>
<DD>Border color</DD>
<DD>Either a standard GRASS color, R:G:B triplet, or "none"</DD>
<DD>Default: <em>none</em></DD>

<DT><b>opaque</b>=<em>yes|no</em></DT>
<DD>Opaque to vector (only relevant if background color is selected)</DD>
<DD>Options: <em>yes,no</em></DD>
<DD>Default: <em>yes</em></DD>

</DL>
<H2>DESCRIPTION</H2>

<EM>v.label</EM> 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.


<H2>NOTES</H2>

If the <em>fontsize</em> option is given then the <em>space</em> option
is determined automatically <em>from the current display window</em>, 
otherwise the <em>space</em> option should be set roughly the same
as the <em>size</em> option.
<P>

<BR>
A description of the labels file follows.<P> 
The file is located in <tt>$MAPSET/paint/labels/</tt>.
The file is a plain-text ASCII file containing the following fields:
<BR>
<h4>Caution: The following information may be incomplete, out of date, 
and wrong!</h4>
<P>
The label information that must be provided in the <em>labels</em> file is:

<DL>
<DT><B>TEXT</B>:

<DD><!--Up to four lines of 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 '<b><tt>\n</tt></b>'.<BR>
(e.g. <tt>SPEARFISH<b>\n</b>SOUTH DAKOTA)</tt>.


<!-- I don't think it exists. -HB 6/2005
<DT><B>SKIP</B>:

<DD>yes|no. If <EM>no</EM>, label will be printed.  If
<EM>yes</EM>, the label will be retained in the file but
not printed.
-->

<DT><B>LOCATION</B>:

<DD>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 
<a href="d.labels.html"><i>d.labels</i></a> the offset is 
measured in screen pixels, and in <a href="ps.map.html"><i>ps.map</i></a> 
the offset is measured in PostScript points (i.e. 1/72" steps).


<DT><B>PLACEMENT</B>:

<DD>Determines which part of the label to which the
location refers.  If placement is unspecified, the label is
centered (<EM>center</EM>), by default.  Label placement
may be specified as:

<PRE>
	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)

</PRE>


<DT><B>FONT</B>:

<DD>This specifies the font to use.
<P>
The following fonts are available for use with
  <a href="d.labels.html"><i>d.labels</i></a>:
<P><pre>
  cyrilc gothgbt gothgrt gothitt greekc greekcs greekp greeks
  italicc italiccs italict romanc romancs romand romans romant
  scriptc scripts
</pre>
<P>
Alternatively the path to a FreeType (.ttf) font may be given.
(for <em>d.labels</em> only)
<P>
The word <EM>standard</EM> can be used to specify the default font 
(which is <EM>romans</EM>).
<P>
Note <a href="ps.map.html"><em>ps.map</em></a> can override this setting
to use other fonts. Its default font is Helvetica.


<DT><B>TEXT SIZE</B>:

<DD>This determines the size of the letters. The <em>size</em>
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 <em>fontsize</em> can set the font size in normal font points.


<DT><A NAME="textcolor"><B>TEXT COLOR</B></A>:

<DD>This selects the text color.  If unspecified, the
label's text is drawn in <EM>black</EM>, by default.  The
text color can be specified in one of several ways:

<OL>
<LI>By color name:

<BR>
<tt>aqua black blue brown cyan gray green grey indigo
magenta orange purple red violet white yellow</tt>

<LI>As red, green, blue component values. (0-255)<BR>
for example: <tt>128:100:200</tt>

<!-- eh?
<LI>As red, green, blue percentages.
for example: .5 .4 .7
<BR>
(This form is not supported by 
<EM><A HREF="d.labels.html">d.labels</A></EM>.)

<LI>By printer color number to get the exact printer color.
<BR>
(This form is not supported by 
<EM><A HREF="d.labels.html">d.labels</A></EM>.)
-->

<LI>Specify "<tt>none</tt>" to suppress the lettering.
</OL>


<DT><B>WIDTH</B>:

<DD>This determines the line thickness of the border box.<BR>
The maximum value is 25.0.

<DT><B>HIGHLIGHT COLOR</B>:

<DD>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
("<tt>none</tt>") is used by default, if unspecified by the
user.  To specify use of no highlight color, specify
"<tt>none</tt>".
(See <A HREF="#textcolor">TEXT COLOR</A>
above for a list of permissible color names.)


<DT><B>HIGHLIGHT WIDTH</B>:

<DD>Specifies how far from the text lines (in units of
pixels) the highlight color should extend.  The default
highlight width is set to <EM>0</EM> (i.e., no highlight
color).


<DT><B>BACKGROUND COLOR</B>:

<DD>Text may be boxed in a solid color by specifying a background color.
Specify "<tt>none</tt>" for no background.  The default background color
setting, if unspecified by the user, is <EM>white</EM>.
(See <A HREF="#textcolor">TEXT COLOR</A>
above for a list of permissible color names.)


<DT><B>BORDER COLOR</B>:

<DD>Select a color for the border around the background.
Specify "<tt>none</tt>" to suppress the border.
The default border color used, if unspecified, is <EM>black</EM>.
(See <A HREF="#textcolor">TEXT COLOR</A>
above for a list of permissible color names.)


<DT><B>OPAQUE TO VECTORS</B>:

<DD><EM>yes|no</EM>.  This field only has meaning if a
background color is selected.  <EM>yes</EM> will prevent
vector lines from entering the background.  <EM>no</EM>
will allow vector lines to enter the background.  The
default setting, if unspecified by the user, is
<EM>yes</EM>.

</DL>
<BR>


<H2>EXAMPLE</H2>

Spearfish example with TrueType font (path may differ):

<div class="code"><pre>
v.label -a map=roads column=label labels=lroads \
        font=/usr/X11R6/lib/X11/fonts/TTF/luximri.ttf
d.vect roads
d.labels lroads
</pre></div>

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 <b>where</b> option.
This example uses the standard UNIX <tt>cat</tt> program.

<div class="code"><pre>
cd $MAPSET/paint/labels/
cat file1 file2 file3 file4 > file_all
</pre></div>



<H2>SEE ALSO</H2>
<EM>
<A HREF="d.labels.html">d.labels</A><br>
<A HREF="ps.map.html">ps.map</A>
</EM>
<br>


<H2>AUTHORS</H2>

Philip Verhagen (original s.label)<br>
Radim Blazek (GRASS 6 port)<br>
Hamish Bowman (enhancements)<BR>

<p>
<i>Last changed: $Date: 2007-11-29 14:27:05 +0100 (Thu, 29 Nov 2007) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="vector.html">vector index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>