I would like to label the points of my point layer with the name attributes of the surrounding line features. The result should be a list, with the names of all lines next to the point (f.e. 10 map units). In the screenshot you can see, which result I do expect.

enter image description here


Assuming all your line features are on the same layer, try


in the label expression for your point feature.

Change 10 to whatever distance you want to pick up features from, and \n to whatever you want to delimit each line name with (comma, full stop, comma+newline...)

2020 update:

As of QGIS 3.8 you can order the resulting features by any order you want (alphabetically by line_name_field, or by id...) by adding it as an extra parameter (order_field below):


As a bonus, another alternative for more complex list scenarios is to use array_agg and access the full suite of array functions to slice and dice the list however you want. For example if you have a very long list and want it to:

  • show only distinct values
  • be in alphabetical order
  • showing just the first 3 and last items

You could use something like this:


                                 "line_name_field", intersects($geometry,

        '\n' )`

You could then change array_slice(@label_array,0,2) to 0,5 or any range you want to easily change the number of items displayed.

enter image description here

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.