「The Vector Properties Dialog:Labels Tab」の版間の差分

提供: OSGeo.JP Wiki
移動: 案内検索
(ページの作成: <H3> Labels Tab </H3> <P> The Labels tab allows you to enable labeling features and control a number of options related to fonts, placement, style, alignment and buffering. <P>…)
 
(ページの置換: '--~~~~このページは削除予定です。')
 
行1: 行1:
<H3>
+
--[[利用者:Sanak|Sanak]] 2009年10月4日 () 08:09 (UTC)このページは削除予定です。
Labels Tab
+
</H3>
+
 
+
<P>
+
The Labels tab allows you to enable labeling features and control a number of
+
options related to fonts, placement, style, alignment and buffering.
+
 
+
<P>
+
We will illustrate this by labelling the lakes shapefile of the
+
qgis_example_dataset:
+
 
+
<P>
+
 
+
<OL>
+
<LI>Load the Shapefile alaska.shp and GML file lakes.gml in QGIS.
+
</LI>
+
<LI>Zoom in a bit to your favorite area with some lake.
+
</LI>
+
<LI>Make the lakes layer active.
+
</LI>
+
<LI>Open the Layer Properties dialog.
+
</LI>
+
<LI>Click on the Labels tab.
+
</LI>
+
<LI>Check the Display labels checkbox to enable labeling.
+
</LI>
+
<LI>Choose the field to label with.
+
  We'll use Field containing labelNAMES.
+
</LI>
+
<LI>Enter a default for lakes that have no name. The default label will be
+
  used each time QGIS encounters a lake with no value in the NAMES field.
+
</LI>
+
<LI>If have labels extending over several lines, check Multiline labels?.
+
QGIS will check for a true line return in your label field and insert the line breaks accordingly.
+
A true line return is a <SPAN  CLASS="textbf">single</SPAN> character &#92;n,
+
(not two separate characters, like a backlash &#92;&nbsp;followed by the character n).
+
</LI>
+
<LI>Click Apply.
+
</LI>
+
</OL>
+
 
+
<P>
+
Now we have labels. How do they look? They are probably too big and poorly
+
placed in relation to the marker symbol for the lakes.
+
 
+
<P>
+
Select the Font entry and use the Font and Color
+
buttons to set the font and color. You can also change the angle and the
+
placement of the text-label.
+
 
+
<P>
+
To change the position of the text relative to the feature:
+
 
+
<P>
+
 
+
<OL>
+
<LI>Click on the Font entry.
+
</LI>
+
<LI>Change the placement by selecting one of the radio buttons
+
in the Placement group. To fix our labels, choose the
+
Right radio button.
+
</LI>
+
<LI>the Font size units allows you to select between
+
Points or Map units.
+
</LI>
+
<LI>Click Apply to see your changes without closing the dialog.
+
</LI>
+
</OL>
+
 
+
<P>
+
Things are looking better, but the labels are still too close to the marker. To
+
fix this we can use the options on the Position entry. Here we can add
+
offsets for the X and Y directions. Adding an X offset of 5 will move our
+
labels off the marker and make them more readable. Of course if your marker
+
symbol or font is larger, more of an offset will be required.
+
 
+
<P>
+
The last adjustment we'll make is to buffer the labels. This just means
+
putting a backdrop around them to make them stand out better. To buffer the
+
lakes labels:
+
 
+
<P>
+
 
+
<OL>
+
<LI>Click the Buffer tab.
+
</LI>
+
<LI>Click the Buffer Labels? checkbox to enable buffering.
+
</LI>
+
<LI>Choose a size for the buffer using the spin box.
+
</LI>
+
<LI>Choose a color by clicking on Color and choosing your
+
  favorite from the color selector. You can also set some transparency for the
+
  buffer if you prefer.
+
</LI>
+
<LI>Click Apply to see if you like the changes.
+
</LI>
+
</OL>
+
 
+
<P>
+
If you aren't happy with the results, tweak the settings and then test again
+
by clicking Apply.
+
 
+
<P>
+
A buffer of 1 points seems to give a good result.
+
Notice you can also specify the buffer size in map units if that works out
+
better for you.
+
 
+
<P>
+
The remaining entries inside the Label tab allow you control the appearance of the
+
labels using attributes stored in the layer. The entries beginning with Data defined allow you to
+
set all the parameters for the labels using fields in the layer.
+
 
+
<P>
+
Not that the Label tab provides a preview-box where your
+
selected label is shown.
+

2009年10月4日 (日) 17:09時点における最新版

--Sanak 2009年10月4日 (日) 08:09 (UTC)このページは削除予定です。