2

I have mutiple of 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 that the printed map is not good and not readable. I'm wondering if there is any possibitilty to manage them so that they would more clear and visible.

enter image description here

you can clearly see the mess on the map. I would be pleased to get some help from you.

1
  • are your symbols sizes scale-dependent (using map units) ? – snaileater Mar 1 '18 at 11:44
2

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
  • 1
    Maybe this another_layer could be a virtual layer made of the union of the geometries of all other point layers. – JGH Mar 1 '18 at 12:22
  • 2
    in the latest version of QGIS (>3.8.3), geomoverlaps has been renamed as overlaps – juminet Oct 16 '19 at 18:32

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.