Bug report #9481

Polygon labels cannot be centred over their polygons

Added by Tim Sutton over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:Larry Shaffer
Category:Labelling
Affected QGIS version:2.0.1 Regression?:No
Operating System:ALL Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18073

Description

When labelling polygons, using 'around centroid' the label placement uses the bottom left of the label instead of the true center of the label for its origin. This results in poor labelling (see attached screenshot) performance as many labels appear offset to the right instead of properly centered over their polygon. IMHO polygon labels should default to using the center of the label (in x and y directions) coinciding to the center of the polygon in order to get decent default placement in the majority of cases.

I attach a small test dataset that illustrates the issue (perhaps less dramatically than it might).

See also #9480

Screenshot_2014-02-03_21.55.20.png (51.6 KB) Tim Sutton, 2014-02-03 11:59 AM

issue-9481.zip (33.7 KB) Tim Sutton, 2014-02-03 11:59 AM

History

#1 Updated by Martin Dobias over 6 years ago

There is also "offset from centroid" option which does what you would expect - the labels are then positioned so that the centroid is in the center of the label. It would be probably better to have this option as default (the "around" option is more suited for points).

#2 Updated by Tim Sutton over 6 years ago

  • Status changed from Open to Closed

@martin Ah yes that gives me better output thanks!

#3 Updated by Etienne Tourigny over 6 years ago

I also find the wording confusing, I would expect "around centroid" place it right on the centroid, which "offset from centroid" does. Offset implies a displacement (x,y) from centroid. Also in favor of having "offset from centroid" as default, perhaps with another name...

#4 Updated by Larry Shaffer over 6 years ago

+1 for making Offset from Centroid the default. That just makes sense for polygons, possible even for points. This will change many existing project where users are expecting to see the previous results, but I guess that's always the case when changing a default.

How about On|At Centroid instead of Offset from? Of those two, I think On Centroid more accurately describes that the label is registered over the centroid.

Also available in: Atom PDF