6

I have multiple points layers that I want to represent in a map. Because of the reality of the field and some errors of mapping, some layers are overlaying so the printed map is not good and not readable.

I'm wondering if it is possible to manage them so that they would be clearer and more visible?

enter image description here

1
  • are your symbols sizes scale-dependent (using map units) ?
    – Snaileater
    Commented Mar 1, 2018 at 11:44

2 Answers 2

5

First I mistook this was a common question... what makes this unique is, that these overlapping points are on different layers.

If we can use refFunctions plugin:

(1) Open Layer Properties | Style tab and highlight Simple marker. Scroll down to Offset X,Y and click on Data defined override (epsilon icon) and select Edit.

(2) In the Expression window, write:

CASE 
WHEN count_distinct(geomoverlaps('another_layer', $geometry)) = 0
THEN to_string(rand(-5, 5))  + ',' + to_string(rand(-5, 5)) 
ELSE '0.0,0.0'
END

Above example will offset your points by up to 5 mm (if your Offset X,Y unit is set to [Millimeter]) randomly, if they overlaps with those of another_layer.

enter image description here

This approach does have a limitation, as you see, that it works among 2 layers only. Sorry... :(

2
  • 2
    Maybe this another_layer could be a virtual layer made of the union of the geometries of all other point layers.
    – JGH
    Commented Mar 1, 2018 at 12:22
  • 2
    in the latest version of QGIS (>3.8.3), geomoverlaps has been renamed as overlaps
    – juminet
    Commented Oct 16, 2019 at 18:32
0

If you are facing symbols overlapping in print layout, just change the size of print layout from A4 to A1 OR A3.

Your Answer

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

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