5

In QGIS 3.28.1 I have a map with many points (it does not contain polygons and lines), and there are some duplicate points on top of each other in the same geographic location, and I would like to aggregate these points when they are in the exact same place + have the same name.
I tried doing an aggregate with the expression:

geom_to_wkb($geometry)

This aggregates all points that are in the same place regardless of their names.

I tried to use the expression:

geom_to_wkb($geometry) AND name

But that didn't work

Mu input:
before

My desired output:
after

Can you help me find the appropriate expression for the aggregate of points duplicated in the same place and with the same name?

1
  • Thank you very much, you have solved the problem Commented Dec 3, 2022 at 16:17

1 Answer 1

8

Instead of using logical operator AND, try the ||-joint:

geom_to_wkt($geometry) || "name"
3
  • 2
    even easier: $x || $y || "name"
    – Babel
    Commented Dec 3, 2022 at 16:41
  • 1
    I do not think it is easier
    – Taras
    Commented Dec 3, 2022 at 16:58
  • 2
    it is shorter -
    – Babel
    Commented Dec 3, 2022 at 17:00

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.