[Qgis-developer] Chopped labels

Tim Sutton lists at linfiniti.com
Tue Apr 23 14:47:19 PDT 2013


Hi

On Tue, Apr 23, 2013 at 11:29 AM, Alexander Bruy
<alexander.bruy at gmail.com> wrote:
> Hi all.
>
> I think many of us used labels to style maps and know that currently
> QGIS chopped-off labels near map boundaries. This issue already
> mentioned in your roadmap in wiki [0]: "Add option to have boundaries of map canvas's current extent act as obstacles to labels".
>
> We (me and my colleague) tried to fix this issue. Our patch simply
> test labels for intersection with current extent and drops any
> items that not completely within extent. Also added UI for controlling this behavior. Code can be found at GitHub [1]
>
> We tested it with our data and seems all works fine. Only one thing
> is missed now — support in QGIS mapserver.
>

This sounds good. The original discussion we had was for the view
extent to be treated as a collection of linear features that a label
placement request would collide with. This would cause chopped labels
to be shifted inwards away from the boundary if there is a valid label
placement available to them. In your implementation I guess the label
is just dropped even though there may be space on map for it? If I
understand this correctly then your approach seems a good start though
I think the second way I mentioned would be better in the long term.

> I already talked about this issue and patch with Larry, but want to put it for wider discussion. Any opinions? Should we accept this
> patch or it is better to wait for 2.1, or maybe look for completely
> different solution?

+1 to patch 2.0 with it.

>
> [0] http://hub.qgis.org/wiki/quantum-gis/New_Labeling_changes_and_roadmap#Placement-options
> [1] https://github.com/yellow-sky/Quantum-GIS/commits/show_partial_labels
>

Regards

Tim

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



--
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Visit http://linfiniti.com to find out about:
 * QGIS programming and support services
 * Mapserver and PostGIS based hosting plans
 * FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================


More information about the Qgis-developer mailing list