I'm using the atlas to generate 50-75 page map packages. All pages are at about the same scale but some areas are much denser and have many more labels on a page to display. I am running into the issues of labels not displaying or overlapping if I turn on colliding labels. I have to have all of these labels being displayed and they are all rule based labels already so it is only displaying the important information.

I have lines, points, and polygons. The polygons I can use free placement so they place fine. Lines and points only have options for an offset which forces them to be very far away from the items. Is there an expression that can be used to set the distance to 1 unit away but if there is a conflict then 2 units and so on and so on. All the ways to check overlaps was for the geometry and not the labels. Some items have the callouts but the same issue with them having a set distance not a variable distance.

  • 1
    Do you have to label everything? Or could you number items and have a table? – Ian Turton Jul 20 '20 at 18:45
  • Numbering items and having a table may work. I know how to add tables but they are mostly just attribute tables. Can you have labels generate in table format? – Andrew Jul 20 '20 at 19:01

Not an answer on the desired expression - I'm pretty sure it would require some scripting rather than expression editing. But here's some advice for label decluttering:

  • For point features perhaps generating callouts is an option to avoid overlapping

  • For polygons use free placement (you did that)

  • For line features depending on complexity consider callouts as well

  • Symbology tweaking:

Generally you should always rethink the label's information: Is there a way to implement a label's information into the feature's symbology? This applies especially for multipolygons/multilines. For example you have pipeline A labeled 'A' and it has some branches labeled 'A subbranch 1', 'A bypass 2' and so on it would be efficient to add a rule based symbology on the piplines and make the legend do the labeling

  • Attribute table with abreviated labels:

If symbology tweaking is not that much of an option for you, be it that the labels are all different/unique you can still generate a table like Ian Turton already commented: label your features with 1,2,3 a,b,c and so on and add the table (1: name of feature labeled '1') to the layout.

  • Overlapping lables:

Last but not least you could try enabeling overlapping labels for some layers and tweak the opacity and blending options for fill and outline for these overlapping labels. This might require some tinkering to eventually look satisfactory but I personally had good experiences with this technique.

  • Yeah I have done everything except changing the symbology of some lines so that information is included in them. Its using fibre cables so they have a lot of information they need to display. Tried getting some scrips written but without making all the labels geometry there isn't much you can do. With the geometry it has to check so many things it runs very slow. – Andrew Jul 31 '20 at 18:25

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.