How can I tell the atlas-composer to display on one page only all geometries with feature two and all the other geometries should be hidden?

  1. I have four geometries with two feature-attributes: (1) "Kategorie" and (2) "Merkmal" in the layer with the name "Test".
  2. The layer-style in the map is made with categorised by feature one ("Kategorie").
  3. The atlas-composer should display on one page only all the geometries which compare the same value in feature two ("Merkmale") and all the other geometries should be hidden.

I think I can write some SQL in the atlas-parameters but I'm not that experienced. When I use e.g., dissolve() which generates a new layer, then I am not able to hide the other geometries. Any further help is welcome.

enter image description here

  • Have you had a look at map themes and how they work?
    – Erik
    Sep 1, 2020 at 14:43
  • @Erik: No - so I looked this youtube intro for further information about map themes. It seems more and very useful for generating on one page in the composer different map-canvas which are showing different content and style!?
    – stewahn
    Sep 2, 2020 at 7:46

1 Answer 1


You can use a rule based styling and take the current atlas feature into the rule. When defining the rule, your features will disapear in the mapcanvas until you created your atlas since the atlas feature is not created before. Yor rules should be like this:

 "kategorie"  =  'Wohnen' and  "merkmal"  = attributes( @atlas_feature )['merkmal']

This will only show features in the atlas with the same 'merkmal' as the current atlas feature.

enter image description here

  • I tried your approach. (1) The geometries disappeard in the mapcanvas and instead an error appeared. (2) So I tried to generate the atlas but it will than generate 4 pages instead of 2.. Here are my screenshots: <stewahn.github.io/collada/stackExchange_AtlasFeature2.jpg>
    – stewahn
    Sep 2, 2020 at 9:08
  • may be you mixed single and double quotes in your expression at the end..
    – eurojam
    Sep 2, 2020 at 9:11
  • Thanks for your idea. It's like yours I think: "Kategorie" = 'Wirtschaft' and "Merkmal" = attributes( @atlas_feature )['Merkmal'] - only different: I use upper case for "Kategorie" and "Merkmale", because I write the features that way. When I click on Test the Filter in the rule-based style, than the "Syntax-Error"-window appeard. Have I to write a rule in the Atlas-Configuration Filter by?
    – stewahn
    Sep 2, 2020 at 10:15

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.