1

I'm hoping to set-up layer styling in order to show all labels but without overlap. I'd ideally like to do this where label move further away from the symbol if there is no space close to the symbol. Currently I'm doing it by hand.

enter image description here

enter image description here

I believe there might be a custom expression to perform in rendering of the label under either 'data defined --> always show' or in the 'Overlapping labels' expression option.

enter image description here

5
  • Maybe this can help? gis.stackexchange.com/a/447302/88814
    – Babel
    Commented Nov 21, 2023 at 20:29
  • 2
    Even if it is technically possible, you should really think about if it desirable. From a cartographer's standpoint, it is bad style. The map is too fraught - labelling every 10th or every 50st point would be much clearer. For an interactive map, scale dependent visibility would be an option or maptips or an action (click on a feature to show the label). Maybe you should think again about the very use case for your map.
    – Babel
    Commented Nov 21, 2023 at 20:44
  • In this case it is neccesary to have all points labeled. Thank you for the stack exchange link @babel, the rand funciton is working ok but still messy. I'm curious if anyone has been able to pair that with a function in the overlapping labels to force the label to move or a funciton that would label by fid alternating, so odd numbers would appear in the top left and evens in the bottom right. Commented Nov 21, 2023 at 20:57
  • 1
    Alternatively, you can adjust the distance based on conditions. For example, if your number ends with 1, then distance = 20, if your number ends with 2, then distance = 40, etc. Commented Nov 22, 2023 at 0:31
  • That's a cool idea. do you know the python code for that? Thanky-you! Commented Nov 23, 2023 at 19:50

0

Your Answer

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

Browse other questions tagged or ask your own question.