5

I created callouts for line layer with geometry generator with expression:

make_line (
     make_point ("auxiliary_storage_labeling_positionx",  
                 "auxiliary_storage_labeling_positiony"),
     line_interpolate_point($geometry,length ($geometry)/2)
     )

Then I created labels, style of lines etc. Then I started manually moving labels with callouts. Then I created new layer by exporting selection of this line layer and loading this new layer to QGIS.

Then I copied all style from the old layer to the new one (copy/paste all style categories).

Then I again wanted to start manually moving labels with callouts. Problem is, I cannot move labels manually.

As I understand it, "auxiliary_storage_labeling_positionx" and "auxiliary_storage_labeling_positiony" from previous layer are not copied to the new layer and I need to create new necessary auxiliary storage fields. Where is the problem?

enter image description here

2 Answers 2

6

The problem you are facing is related to the workflow of labelling.

First solution (the best) : Don't use label toolbar.

The best solution will be to not use the manual labelling and find a way to make it automatic. There is a solution to create lines connected to text fully integrated in QGIS and many ways to make some layer blocking labels.

Second solution : use label tools and share style across project

Easy labelling was a plugin and now easy labelling is integrated in qgis. For this reason, the labelling tools still use auxiliarry storage linked to your layer. This auxiliary storage is stored in a .qgd file, more information could be found in Layer properties > Auxiliary storage.

enter image description here

Every time you use one of the tools in the label toolbar, a link is built between your layer and the table which stores the position of your label, the rotation and more in the .qgd file as auxiliary storage.

enter image description here enter image description here

Auxiliary storage is related to your project and is linked with a layer. Then if you duplicate a layer it will not work well.

If you do need to move your label by hand anyway and share it across projects then store your data outside the auxiliary storage :

  1. Do the moves you need to do with the label tool, it will create a field joined with your layer that will store the position x and y. This field can not be seen in the attribute table but can be exported.

enter image description here

  1. Save your layer in a new file as you want. Keep the field that starts with auxiliarry storage.
  2. In a new QGIS project you can open this layer and paste the style you have made before.
  3. Use the label tool to continue the edition of label positions. It will not ask for auxiliary storage because you have field for this and will use the field integrated in your layer.

enter image description here

3
  • Thanks for the explanation, the aux storage functionality always felt non-intuitive.
    – itsgupta
    Jun 9, 2021 at 0:51
  • i tried to follow your answer but it doenst work. I saved my layer with auxiliarry storage. I opened that layer and pasted the style but still I cannot move the labels. Can you advice what mistake do I do?
    – pazelvak
    Jun 28, 2021 at 13:08
  • I think I was using QGIS 3.18 for the test. Check with this version may be. It doesn't work for every features ? Which fields are added ? @pazelvak Jul 20, 2022 at 7:50
0

This page contains the answer to your question. https://github.com/qgis/qgis/issues/47917

1
  • 2
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Feb 20 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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