Bug report #12217

Labels with data-defined rotation and offset from point are misplaced

Added by Oskar Karlin about 9 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Labelling
Affected QGIS version:2.6.1 Regression?:No
Operating System:Mac OS X Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:20405

Description

I'm trying to place some labels using an attribute field showing the rotation in degrees and the actuall rotation works fine. What doesn't work is the placement of some of the labels. It seems like if they are rotated in some angles the labels end up on the spot but some doesn't. I think it has something to do with the value of the angles. The labels that are rotated more than 180 degrees tend to get misplaced. The ones with less than 180 is fine.

Attached image shows some rotated labels. Notice the red dot wich is the point of the shape file where the label should start.

Screen_Shot_2015-02-17_at_15.25.59.png (622 KB) Oskar Karlin, 2015-02-17 06:38 AM

Associated revisions

Revision fe2db526
Added by Nyall Dawson almost 9 years ago

Possible fix for placement of labels with offset from point mode and rotation (refs #12217)

History

#1 Updated by Oskar Karlin about 9 years ago

Oh one more thing. It uses placements with Offset from point taken from the attribute table. When using Around point it all looks fine. The only problem then is that some of the labels should have an other offset than standard (left, right, centered, above etc).

#2 Updated by Anita Graser about 9 years ago

  • Subject changed from Problems with rotated labels to Labels with data-defined rotation and offset from point are misplaced
  • Category set to Labelling

#3 Updated by Mathieu Pellerin - nIRV almost 9 years ago

Oskar, allow me to be totally off topic here and say how great the map you've attached looks like :)

If you have a minute, upload it to the flickr QGIS group here: https://www.flickr.com/groups/qgis/ -- beautiful maps always welcome there.

#4 Updated by Nyall Dawson almost 9 years ago

This pull request should fix this issue: https://github.com/qgis/QGIS/pull/1951

Can you please check whether the described solution would fix your problem?

#5 Updated by Oskar Karlin almost 9 years ago

Nyall Dawson wrote:

This pull request should fix this issue: https://github.com/qgis/QGIS/pull/1951

Can you please check whether the described solution would fix your problem?

I'm trying to understand the description but it's hard for me to figure out without testing it and I've never built QGIS from scratch, I've always used the builds from Kyngchaos.

#6 Updated by Nyall Dawson almost 9 years ago

  • Status changed from Open to Feedback

I've pushed this fix to master - you should be able to test after the next round of nightlies are built. Can you confirm whether this fixes the issue?

#7 Updated by Oskar Karlin almost 9 years ago

Yes! It works like a charm! Thanks!

#8 Updated by Nyall Dawson almost 9 years ago

  • Resolution set to fixed/implemented
  • Status changed from Feedback to Closed

Great, thank you!

Also available in: Atom PDF