I have an atlas composition where I would like to, in addition to attributes from my coverage layer which consists of polygons that are scattered throughout the world, place other values from another layer.

I would like an expression in a text box that displays the name of the country that the current feature is in.


I found an answer based on she_weeds' excellent answer in How to display attributes of features intersecting the Atlas feature in a Print Composer label?

Having downloaded and imported Natural Earth's country .shp file as a new layer, I used the aggregate function to get the country name containing the current feature's geometry.

[% aggregate(
   ) %]
| improve this answer | |

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.