by MartinDobias

Note: This document is a draft

This page should contain various information about overall design and usage of map labeling that will be implemented in QGIS. New labeling system should bring much more flexibility and offer easy to use interface.

For information on the current development status compare: Label Placement GSoC 2009

Features

Most important additions:
  • collision detection for labels to protect them against overlapping
  • splining labels to follow paths
  • manual editing of labeling - changing position, size, direction ...
  • reducing manual editing time with automatic label placement
Types of automatic label placement:
  • static (high-quality) - after defining placement rules, labeling is computed once and labels get static positions. User can later tweak the labeling for his needs
  • dynamic (low-quality) - placement is being calculated with every change of the view, speed of the placement is more important than the quality of the resulting labeling. This option is better choice for those who just want to browse the maps without much configuration.

User interface

TODO: how to develop easy to use interface?

Design

TODO: ideas how to incorporate the system in the QGIS
  • represent labeling as a special vector layer?
  • only one common layer for all labels or multi-layer approach?
  • should be labeling "always on top" or can get behind another layer? comment by regis 26 11 2011: I confirm that users need this. We often use mask layers to highlight an interest area. _ _Being able to draw labels under mask layer would be perfect. The opposite solution would be too allow some layers to draw on to of all graphics and labels._
  • how to incorporate with the new legend?

References

Comments by Tim

Label PLacement

For non automated label placement, one thing to consider is a 'click to label' feature that works in a similar way to the identify tool but rather places a lable onto the map at that point. The placed lable could have slection handles that allow rotation of the label. A round dot placed in the center of the label will allow you to grab and shift the label position when it it selected.

For storing label placements you could consider three approaches (possiby implementing both)
  1. Store lable placement and properties in the project file
  2. Store label placement in a simple xml file or sqlite file associated with a layer. Sqlite may be a bterrer option in that yuo can perform a spatial query efficiently so that at render time you can easily extract only lables in the current AOI
  3. Store the labels by adding attribute fields to the dataset itself and then populating these fields when label placement is carried out.

Multipart Features

Currently multipart features are not labelled. Could you add sorting that out to your todo list?