[Qgis-user] Enhanced labels in 1.7.0

Andreas Neumann a.neumann at carto.net
Thu Mar 24 14:09:32 PDT 2011


Hi Andrew,

On 3/24/11 9:15 PM, Andrew Chapman wrote:
> I've been looking at the labelling in trunk... and feel that there is a lot
> of power and features that I don't fully understand.
> 1) We now have the "Labels" dialog under layer properties and the "Layer
> labelling setting" dialog accessed via the "ABC" tool. To what extent do the
> settings via these dialogs interact, or should they be used as an "all or
> nothing" choice?
currently you should only use the "ABC" tool, which is the new 
generation. The other one is still for backwards compatibility. The 
first generation will disappear with QGIS 2.0 - so please use the new 
generation with the "ABC" button.
> 2) Via the "Labels" dialog Advanced tab there are interesting settings that
> can be defined by attribute, but their accepted parameters aren't (at least
> to me), immediately apparent. It seems that if anything is defined on the
> Advanced tab then the settings on the Label Properties tab are ignored - is
> this correct?
>    - Placement: Is this numeric, or some sort of predefined constants?
>    - Angle: This seems to be decimal (0 to 360... or is it MOD 360?), with
> zero due east and rotating anticlockwise.
>    - Font family: I assume that this is just the name of an installed font,
> e.g. Arial.
>    - Bold, Italic, Underline, Strikeout: This I assume to be a boolean, but
> null or any value, 0 or 1, false or true... ?
>    - Size: This seems to take the font size choice (In points / In map units)
> from the Label Properties Tab.
>    - Size units: Again, is this defined by string or numeric values?
>    - Color: I assume that this is a RGB value, but in what format?
>    - Data defined position: X&  Y coordinates - I assume these are in the
> form of the current CRS. The X&  Y offsets (from their names) are presumably
> signed values. If I size my text in map units, does this mean that I cannot
> have an offset in map units too?
Please use only the "ABC" tool - your above questions seem to relate to 
the old version.

It is right that often it is not obvious what to use. There should be 
tooltips or it should be mentioned in the manual. I try to answer a few 
of the questions, but I relate them to the new generation:

Size and Buffer Size: numeric. You can select units - either pt or map 
units. The former is always the same size, the latter changes size with 
zooming
Color and Buffer color: a hexadecimal color value, e.b. #FF0000 for red, 
datatype string
Font-Family: String containing the font-name - should correspond to the 
family name you see in the qt-font dialogues
bold, italic, underline, etc. - I am not sure what should be used here - 
maybe a boolean?
Label Distance: numeric - either in mm or in map units. For text along 
linear features, this is an offset from the center line
Rotation: numeric. 0 is horizontal, negative is counter clockwise, 
positive is clockwise
X-Coordinate/Y-Coordinate: numeric, in map units
Horizontal Alignment: string value, any of "Left|Center|Right"
Vertical Alignment: string value, any of "Top|Cap|Half|Base|Bottom"


Hope this helps a bit. I agree, it could be more obvious what values 
there should be and it is not ideal that there is an old and new generation.

Andreas







More information about the Qgis-user mailing list