In cartography, it is a frequent operation to set labels to fixed positions, together with the position of the fix point (left/middle/right, Top, Half, Bottom) that is kept constant in case of font change, rotation or zoom. Therefore, three new editing tools to manipulate text labels are now in the QGIS developer version:
- the move label tool drags text labels to a new position
- the rotate label tool is for interactive rotation of labels
- the label property tools opens a dialog that lets the user manipulate the data defined properties of a label (and also the text of the label attribute)
All three tools work on the new labeling engine and data defined labeling needs to be enabled for the layer (e.g. x coordinate attribute / y coordinate attribute for the move tool, rotation for the rotate tool). Additionally, the layer needs to be in edit mode. The new tools are well suited to mix fixed label positions and automated label opsitioning in the same or among several layers. If the x- or y attribute value is NULL, the position is set automatically by the pal library (http://pal.heig-vd.ch/). As soon as a position is manipulated by the move label tool, the position is written into the attribute field and the label position for this feature is fixed. So if a layer does not yet have attribute fields for x, y, you could create two new fields of type double (using the buttons in the vector properties dialog or in the attribute table). Initially, all values will be ‘NULL’ and all the label positions set automatically.
There are further plans to improve the user interface. It could be handy to have the properties dialog always open (non-modal), which would allow faster edits of a large number of labels. And a live text rotation preview is planned too. And yes, if someone likes making real icons, this would be highly appreciated (my graphical skills are somewhat limited…).
Finally I’d like to thank the city of Thun (Switzerland) for funding these tools and sharing it with the rest of the FOSSGIS world.