All the fields i want to show on the map are in the same layer. All the labels have to be showed on the map. But the concentration is high.

So i would like to concat the labels when geometries are intersecting. I cannot get intersecting the current geometry with his layer without itself.

I tried to use Overlapping and geomoverlap with rulesbased labeling but nothing works.

The result could be : resulting label = "label 1 || / || label 2 ||/|| label 3" Could you show me the way?

  • Would you like to concatenate more attributes into one label? Add an expression to the label text instead of single attribute. Use || operator to concatenate attribute text. You can issert line breaks, too.
    – Zoltan
    Commented Dec 15, 2016 at 8:13
  • Yes i know label 1 || // || label 2 :) My question is how to get the label 1,2,3 . i edit my question Tks
    – jlSta
    Commented Dec 15, 2016 at 9:31
  • I would try it in PostGIS "SELECT label1 || label2 || label3 from mytable as t1 where exists (Select * from mytable where ST_Intersects(t1.geom mytable.geom) and mytable.id <> t1.id and ST_Area(ST_Intersection(t1.geom, mytable.geom)) > 0.0001". Probably it won't be wery fast because of the correlated enbeded query.
    – Zoltan
    Commented Dec 15, 2016 at 17:49

1 Answer 1


Found solution in QGIS 2.18.3 with clustering methode. Here are the steps:

  1. Create clusters as explained here with a buffer of your choice with @row_number
  2. Create an intersect and a whitin with join attributes by location tool of the polygons included in the clusters with parameters summary of the intersected entities, no statistics, keep only common records. Now you have the polygons cluster's number
  3. Create relation on the polygons (childs) on the cluster number (parent) between the clusters on cluster number. Check the relation is working with Identify Features tool.
  4. Use field calculator with _relation_aggregate_ in the cluster layer relation_aggregate('relation_name','concatenate',to_string("child_field_for_labelling"),' / ')
  5. Show these labels in cluster layer but hide the polygon style.

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.