How can I manually position these numbers for a better position in a polygon layer?

enter image description here

  • 7
    Have a look at this post along with the links: Move label in QGIS? – Joseph May 24 '16 at 12:48
  • 3
    Go with Joseph's answer above rather then the rule based approach below. – ndawson May 24 '16 at 14:48
  • 1
    @ndawson Can you expand on why you prefer that approach? I'm genuinely interested – JonasPedersen May 24 '16 at 18:10
  • 1
    Jonas it is interesting your suggestion but must be created a rule for each polygon. It might be useful, but the suggestion of @Joseph it's easier because I just have to use one tool directly on the problematic tags and see the result immediately. – Carlos Pires May 24 '16 at 19:14

Following the suggestion of @Joseph, I solved the question by this way:

Assuming that there are already defined labels.

Step 1: created two fields; xLabel and YLabel, decimal type, length 20, precision 4.

Step 2: Layer Properties > Labels > Placement > Data defined, maped the X and Y fields in 'Attribute field' to match with the fields previously created xLabel and YLabel.

Step 3: (the only action to repeat for each problematic label - activate Edit): With the Move label tool dragged the label to the desired position. The new position is automatically recorded in the xLabel and YLabel fields.


You could use the easy custom label plugin to move them where you want. See my blog post for a longer example of how this works.

  • The last one, feel free to edit. – Ian Turton May 25 '16 at 8:55

I suggest that you use a custom rule-based placement for each feature label. You do this by creating a label-placement rule associated a unique value that the feature contains (e.g a id, gid or any other field which is unique).

  1. Go to properties for the layer (right click layer and choose properties) and pick the 'Labels' tab.
  2. Choose rule-based labelling in the dropdown, and press the '+' icon. enter image description here
  3. Filter on the unique value (in the example it is the field "id" and the integer 1). Choose offset from centroid and play around with the x,y values and quadrant placement until it looks good. enter image description here

Repeat this for each point for which you want to manually place. With enough fiddling it should work.

  • 1
    the problem with this approach is that there needs to be one rule per feature. You could use 'single symbol' and add two fields (one for offset, e.g. "10,0" and one for quadrant), then use these as expressions. But both these approaches are more effort than using the built-in Move Label tool. (I've tried this approach, and it does work in some very specific situations, but those could use the new Cartographic Placement option in 2.14 instead) – Steven Kay May 24 '16 at 20:28
  • Thanks for the clarification. Was not aware of the 'Move Label' tool until today. – JonasPedersen May 25 '16 at 7:52

Create a polygon centroid, and then move the centroids where you want.

Not the answer you're looking for? Browse other questions tagged or ask your own question.