[Qgis-developer] Different label distances for point feature labelling

Nyall Dawson nyall.dawson at gmail.com
Mon Jul 20 03:59:31 PDT 2015


On 19 July 2015 at 23:30, Andreas Neumann <a.neumann at carto.net> wrote:
> Hi,
>
> I have another label question:
>
> For labeling point features when using the "Around point" placement option,
> I noticed that I would need different label distances depending on the
> position the automatic labelling engine uses. As an example, while the label
> distance is ok for a "top-right" position, it would have to be bigger for a
> "right" position, as the label is still too close to the point symbol in
> this case. The top-middle and bottom-middle positions would also need yet
> another label distance.
>
> Would it be possible to add position-dependent label offsets in the future
> while still letting QGIS place the labels automatically?

I've hit this recently too, but I'm not sure what the best solution
is. There's a few complications. The biggest is that the "around
point" mode actually places candidates in a circular radius around
point features. By default QGIS is set to use 8 candidates for point
features, so the result is that labels are placed in the 8 quadrants
around points (above, top right, right, bottom right, etc...). But if
someone has bumped up the number of candidates, then the labels will
no longer fall on these quadrants and instead be placed at say 10
degrees, 20 degrees, etc. In this case the position dependant
distances become much more complicated.

I've been thinking about changing how "around point" works to
basically hard-code in the 8 candidates, so that labels will ALWAYS
fall on the 8 corner/mid points. I'm not sure how many people would be
negatively affected by this (ie, how many people intentionally change
the number of candidates), but there's a number of benefits which
would arise. One would be that we could prioritise certain placements
- eg, following this [1] kind of priority for placements. This could
even be configurable by the user. Another benefit would be that we
could tweak the relative distances for each placement too.

Anyone have any thoughts on this?

Nyall


[1] http://www.svgopen.org/2002/papers/dahinden__good_map_graphics/labeling.png


>
> Thanks,
> Andreas
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list