[Qgis-user] What does the Automated Placement Settings do for labels?

Larry Shaffer larrys at dakotacarto.com
Fri Mar 14 14:56:36 PDT 2014


Hi David,

On Fri, Mar 14, 2014 at 3:07 PM, Chrest, David <davidc at rti.org> wrote:

> In the Labels section of a layer properties window, there is a button in
> the upper left called "Automated placement settings (apply to all layers)."
>
> What exactly does this do? Search method, Number of candidates, show all
> labels and features for all layers, show candidates (for debugging), show
> shadow rectangles (for debugging)? I couldn't find much documentation on
> this. Thanks for any help.
>

All of those settings relate to the automated label placement (PAL) library
[0] used to automatically derive optimal label (and diagram) placements,
except 'Show shadow rectangles' which is just for debugging. There are
definitely some missing descriptions in the online docs for these settings.

* Search method - is the method (i.e. algorithm) used by PAL to arrive at a
placement solution. Play around with these to see possibly different
results or performance by placement engine.

* Number of candidates - are the total possible candidates for a
label/diagram placement (per spatial geometry type) before cost analysis is
applied and overlaps calculated. More candidates will decrease performance,
but provide a wider range of placements, with less candidates resulting in
the opposite. The defaults may not be adequate for your project.

* Show partial labels - is a newer setting (QGIS 2.0+) that allows labels
that extend beyond the map canvas extent (i.e. partially showing inside it)
to be drawn. If unchecked, any label touched by the extent will not be
shown. This aids the production of map raster tiles, where you don't want a
partial label to show up on different part of different tiles. However, the
current implementation does not increase the number of candidates, i.e. it
will not move a extent-bisecting label to just within the extent; so, those
labels will just not be shown, resulting in fewer labels.

* Show all labels and features for all layers - will turn off PAL's hiding
of labels deemed of low cost or that have too many overlaps. All labels,
regardless of whether they collide (overlap) will be shown. Sometimes you
just want to show all labels. This is also available as a per-layer option
in the Labeling dialog of QGIS 2.0+.

* Show candidates - will show the rectangles of possible label placement
candidates (relative to number chosen). With curved labels this shows
rectangles per character. When labeling doesn't work as expected, turn this
on to see where labels might show up. There is currently no means of
forcing a label to use a particular candidate however. You can 'pin' the
label and/or move it to a preferred location when using data defined
labeling tools.

* Show shadow rectangles - is a newer setting (QGIS 2.0+) that will draw
the bounding box of any drop shadow created for a label component. This
helps debug the code that creates the shadows, which are auto-generated
raster images. If your drop shadows exhibit odd artifacts or are unduly
clipped, turning this on and providing a screenshot will help debug the
error.

Note that prior to QGIS 2.0 these settings were global (app-wide), then
with 2.0 and 2.2 they are capable of being saved with the project (as well
as global), and with 2.3+ they are only per project, since there is no
longer an app-wide QgsPalLabeling instance (only instantiated when a
sequential or parallel rendering job is run with the new multi-threaded
rendering engine).

[0] https://github.com/qgis/QGIS/tree/master/src/core/pal

Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota


> David Chrest
>
> Research GIS Analyst
>
> RTI International
>
> 3040 Cornwallis Rd, PO Box 12194
>
> Research Triangle Park, NC  27709-2194
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140314/0824e186/attachment.html>


More information about the Qgis-user mailing list