4

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

4

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 line connected to text fully integrated in QGIS and many way to make some layer blocking labels.

Second solution : use label tools and share style across project

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

enter image description here

Every time you use one of the tool in the label toolbar a link is built between your layer and the table which store 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 accross 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 could 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 start with auxiliarry storage.
  2. In a new QGIS project you could open this layer and paste the style you have made before.
  3. Use the label tool to continue the edition of label position 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 '21 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 '21 at 13:08
  • I think I was using QGIS 2.18 for the test. Check with this version may be. It doesn't work for every features ? Which fields are added ? Jun 29 '21 at 3:36

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.