0

I'm trying to manually move labels in qgis.

I've added the two extra columns to the attribute data, X and Y, bothh decimal numer (real).

When I load the layer with the labels on, through the rendering button and selecting all labels to show, these all appear on the screen.

However, when I move down to the data defined placement, I select the X and Y. Then press apply, and all the labels disappear off the map. Though the move label button does appear at the top of the screen, but there are no labels to move?

  • 1
    Can you provide screenshots of what you are experiencing? – whyzar Sep 14 '17 at 15:12
  • 2
    your x and y must be null, if they're 0 they've been moved to your 0,0 coordinates – Elio Diaz Sep 14 '17 at 16:24
3

Use the field calculator to fill the X and Y columns with the current point locations. enter image description here

NOTE: Changes to the label location are stored as changes to the layer attributes, not as part of the project. This means you must hit the Save Layer Edits button in the Digitizing toolbar. Saving the project will NOT save these changes. You'll know your changes have not been saved if you see this popup when you try to close QGIS:enter image description here

  • Hi, thanks for this, this does work now! But for clarification, do I need to save the changes or is this done when I save the Project, so when the project is loaded up again, the label positions will remain the same? And is it possible to change the position of the labels as per this method in the print composer window? – Jonathan Hall Sep 14 '17 at 17:11
  • I edited my answer to respond to the question about saving. This method doesn't work in the print composer window, only in the main map. – csk Sep 14 '17 at 17:28
  • This isn't true - it's valid to have null values in the X and y columns, as it means "use the automatic placement for this label". There must be another factor at play here... – ndawson Sep 14 '17 at 20:44
  • @ndawson I just tested this in QGIS 2.18 and 2.14, and you're correct. Null values in the X and Y columns don't cause labels to disappear. I edited my answer to reflect this. Thanks! – csk Sep 15 '17 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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