1

I'm working with QGIS 2.18

In a print composer I can filter the elements of a layer based on the attribute of the active element of an atlas. For example, show only the cities (points) of a state (polygons), when the state layer is the coverage layer of the atlas. I'm using rule-based symbolization, where both layers have a common attribute.

I would like to know if they can be filtered in the same way, but using geometry functions like the intersect. I would like to filter the elements of a layer, which intersect with the elements of the active element of the coverage layer of an atlas.

I'm trying with the intersects function, but I can not get the correct syntax.

Is it possible to make this query?

1
  • I'm sorry, I find the solution. intersects( transform( $geometry, 25829, 25830) , geometry( @atlas_feature ) ) . In my problem I need to transform the SRC. Aug 5, 2018 at 7:49

1 Answer 1

1

This code should be the correct answer to your question:

[% aggregate('LAYER_NAME','concatenate',"ATTRIBUTE", within($geometry,@atlas_geometry), ',') %]

1
  • if you only need the filter term within($geometry,@atlas_geometry) will do the trick.
    – nepluisse
    Sep 12, 2019 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.