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.

About these ads

About pvanb

I am a tropical forest ecologist with a focus on spatial and temporal patterns and processes at population and ecosystem level. I am furthermore very interested in issues related to conservation and sustainable use of biodiversity and natural resources under current and future climates. I have worked in the Middle East (Syria and Lebanon) and South America (Brazil) and in Eastern Africa (Kenya).
This entry was posted in GIS software, QGIS and tagged , , , . Bookmark the permalink.

7 Responses to Improved labeling tool in QGIS

  1. M Stevens says:

    Thanks for this info.
    One question though, what data type did you take for those x, y and rotation columns?

  2. Mike D says:

    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?

    • pvanb says:

      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.

  3. jpp says:

    Thanks! It was useful

  4. filippov70 says:

    Я давно пытался понять, как двигать подписи в QGIS так же как в, MapInfo.
    Спасибо!

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s