[Qgis-developer] Rotation of Labels

Bernhard Ströbl bernhard.stroebl at jena.de
Wed Nov 13 23:19:36 PST 2013


Hi Larry,

description of problem:
I have label points and rotation angles ranging from 0 to 360 degrees. 
The label point is the lower left corner of the _rotated_ label.
Current behaviour is:
If I set a quadrangle the label is displaced and rotated, the lable's 
center being the rotation centre. I see from your answer that this is 
the intended behaviour because, as you write, "otherwise, applying a 
rotation would break the concept of choosing a quadrant."
My expectation was:
The centre of rotation is the feature point to be labeled. Thus choosing 
the right quadrant and roting with 90 degrees would result in a label 
being straight upward from the feature point. I would call this 
intuitive but the current behaviour is intuitive, too :-)
My current workaround:
Set the quadrant data defined from the rotation angle (CASE), results are ok

regards

Bernhard

Am 13.11.2013 21:02, schrieb Larry Shaffer:
> Hi Bernhard,
>
> On Wed, Nov 13, 2013 at 8:12 AM, Bernhard Ströbl
> <bernhard.stroebl at jena.de>wrote:
>
>> Hi,
>>
>> I am wondering if the rotation of labels is as it should be. I am using a
>> point layer containing text strings and rotation angles.
>> When setting the "Quadrant" of the label (option "Offset from point") the
>> label is first displaced from the point and then rotated around _the
>> label's centre_. IMHO the behaviour should be to rotate the label around
>> _the label point_.
>> Opinions?
>>
>
> The default placement for "Offset from point" is the center of the label
> registered over the point (or Quadrant wouldn't make much sense). Applying
> a rotation that rotates the label around a different point seems
> unintuitive to me, but maybe I am not understanding your alternative.
>
> Can you show this graphically, along with the settings that would produce
> the individual graphics? And, maybe expand more upon the general use case?
>
> I am unclear what you mean by _the label point_. Do you mean the label's
> default rotation origin (lower left), or do you mean the feature point?
>
> I also chose rotating around the center of the label to ensure the label
> stays 'contained' within the specified quadrant. There is extra code to
> ensure the label's location is shifted to keep the overall label inside the
> quadrant; otherwise, applying a rotation would break the concept of
> choosing a quadrant.
>
> Regards,
>
> Larry


__________ Information from ESET Mail Security, version of virus signature database 9045 (20131113) __________

The message was checked by ESET Mail Security.
http://www.eset.com




More information about the Qgis-developer mailing list