[SoC] QGIS label placement, week 6

Martin Dobias wonder.sk at gmail.com
Sun Jul 5 13:29:06 EDT 2009


Hi all,

since the qgis site seems to be down, I'm posting the the report here
and will update the wiki page later.

I've been poking a bit more into the PAL library and allowed retrieval
of candidate label positions, In engine configuration there's now an
option that displays all candidates as frames when the labeling is
done. It helps to see what is actually going on in the library. I've
created a simple map canvas tool that allows inspection of costs of
the label candidates. When the tool is active, clicking a candidate
shows its cost in a tooltip. This helped to find some problems, e.g.
incorrect cost calculation for polygons with numerically small
coordinates (e.g. degrees).

Another new features are scale-based visibility of labeling and
support for buffer (mask) around the rendered font for better
readability. With the increased number of settings, I've expanded
labeling configuration dialog. Finally, some bugs were fixed here and
there.

Screenshot showing the candidate labels:
http://www.mapserver.sk/~wonder/qgis/qgis-pal-candidates.png

We're going to need some more changes in PAL library, mainly to have
better control when creating candidate labels. The PAL code probably
should get some refactoring: there are quite many places where
classes/functions access directly private members of other classes
making the code harder to understand and modify.

Next week I'd like to continue with adding features to point and line labeling.

Cheers
Martin


More information about the SoC mailing list