eable
eable

Reputation: 23

QGIS Expressions: Can you filter an overlay function based on atlas variables?

I'm creating an atlas of bus route maps in QGIS, and my goal is to show points of interest within a certain distance of a given route's line. I have 3 layers of note:

In the symbology editor, I tried to use the following filter expression:

overlay_within('bufferLayer_[id]',filter:=route= @atlas_pagename )

Unfortunately, this always returned 0 features when I test the expression, so something was off. But here's where I got confused: If I set the atlas to an example route C51 and manually set the filter to

overlay_within('bufferLayer_[id]',filter:=route= 'C51' )

it works! What's more, in the Expression Builder, @atlas_pagename indicates it's returning the correct thing:

enter image description here

So what gives? Is there something about @atlas_pagename that prevents it from being evaluated inside an overlay function? If so, is there some other way to accomplish what I'm trying to do? Is there something else I'm missing?

Thanks!

Upvotes: 0

Views: 18

Answers (0)

Related Questions