3

I have a layer with points located close to each other. Symbols which I have to set for each of point are overlapping. I would like to hide (or remove) those points which overlap (in other words I'd like to make a generalization). For example I have input layer:

enter image description here

And my expected result is something like this:

Result

At the beginning I was using method described here: Joining two or more overlapping buffers using MMQgis plugin?, but it makes one point by dissolving all buffers and then getting the centroid. In my example its possible to get more than 1 point without overlapping others so I'd like to ask if its possible to get the result which I described.

6
  • 1
    I'd like to solve: What are clusters?
    – Erik
    Commented Jun 17, 2020 at 11:36
  • related Unions of SVG Point Markers In QGIS?
    – JGH
    Commented Jun 17, 2020 at 11:54
  • 2
    Have you tried the point cluster style?
    – JGH
    Commented Jun 17, 2020 at 11:55
  • @JGH Point cluster would be nice if i had 1 type of symbols, but on 1 layer I have some points with different symbols. After using point cluser i would need to set style for each type pf symbol separately, but in this tool is possible to set only one style (cluster symbol). Commented Jun 17, 2020 at 13:19
  • @Erik sorry, i don't understand what you mean? Commented Jun 17, 2020 at 13:45

1 Answer 1

3

You can use the point cluster style, it will aggregate multiple points together.

There is a hack to have multiple cluster symbols by creating one "super" style having all sub-styles, and to enable/disable each individual components.

To do so, create the point cluster, select the (unique) symbol and choose to customize symbol.

Add each desired components (in my example, a square, a star and the default circle). For each of them, click the data defined override symbol (the epsilon symbol) for the size and write a conditional statement: if the field value is what you want, set a size of 6, else, use a size of 0 to hide it.

if (my_field = 123, 6, 0) 

For the default style, you can either remove it or exclude the already styled clusters

if (my_field not in (123,456), 6, 0)

enter image description here

3
  • To automatically adjust the colors, refer to gis.stackexchange.com/questions/362355/…
    – JGH
    Commented Jun 17, 2020 at 14:04
  • Cool, thats what i wanted to get. But still i have some questions: 1. Can i set distance of points clustering in the same layer depending on map scale? E.g. in 1:10000 scale, distance will be 16 map units, but in 1:25000 (when my symbols grows) distance will be 30 map units? 2. Can i set labels for each of cluster? Commented Jun 18, 2020 at 7:12
  • @DanielSobolewski for the variable distance I don't think so (not under 3.10 at least). For the labeling please ask a new question with enough detail (what should be displayed in the label etc) and see this post
    – JGH
    Commented Jun 18, 2020 at 12:12

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.