Improved labeling tool in QGIS

I just downloaded and installed the latest version of QGIS, version 1.6. It isn’t officially out yet, but it should be released any time soon now. For the impatient ones, you can download the source code and compile it yourself.

It has a bunch of welcome new features and improvements. One that is particularly useful if you want to make nice (printed) maps is the improved labeling tool. It now comes with a new toolbar and options to set your labels to a fixed position and optionally rotate the text.

labeling toolbar in QGIS

The new feature is explained on this webpage. However, it still wasn’t immediately apparent to me was how to ‘move’ or ‘rotate’ labels (second and third button on the toolbar).

The trick is to first create columns for x, y and optionally rotation in the attribute table. You can do this using the buttons in the vector properties dialog or in the attribute table. Then, you go to the label property dialog (first button on the toolbar) and select the third tab (Data defined settings). Here you can define which columns should define the x- and y-coordinates (and a number of other fields defining the position of the label).

After this, you can use the ‘move’ or ‘rotate’ buttons to move and rotate your labels one by one. Each time you move a label, the corresponding fields will be updated, a very nifty feature.


7 thoughts on “Improved labeling tool in QGIS

  1. Mike D

    I was pretty excited to find this new feature. One bummer/bug seems to be that if you save the shapefile you are editing, the automatic label locater relocates your hand-placed labels. Has anyone noticed this problem and figured out a fix?

    1. pvanb

      By hand placed labels, you mean the coordinates of your labels are stored in a X and Y column, right? I had something similar (after adding a column to the table). Just define again the X and Y columns for label placement. As these (should) have already the coordinates, the labels will be placed correctly again.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s