0

I have several layers which overlap sometimes. I want the symbol visualized on top to be based on the smaller value between the three layers. How can I do that?

1
  • 2
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Maybe a screenshot will help.
    – sys49152
    Commented May 23 at 12:06

1 Answer 1

0

If you are ok with creating a new layer you can Union (multiple) with one layer as Input Layer and the other two as Overlay layers.

This will create one output layer with all geometries and attributes from the three layers.

I have field named value in each of the three layers. The output attribute table will have all fields. Since all my three fields are named value the output fields will be named value, value_2, value_3: enter image description here

Style the output layer with the expression: array_min(array(coalesce("value", 999),coalesce("value_2", 999),coalesce ("value_3", 999))), change the three field names to match yours, and 999 to be larger than any max value in the fields. enter image description here

Where layers overlap, the min value will be used to style the geometry:

enter image description here

1
  • nice, i like this approach. Thanks!. Would it also work if I merge the layers (merge vector layers) instead of union?
    – user243380
    Commented May 24 at 12:36

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.