I have a layer coming from this GeoJSON

It looks like this:

enter image description here

I want to style the layer (give colors to the polygons) in a categorized way. And each class should always (over all dates) have the same color. However I also want to make a map for each date. I see two options on how to do that, yet I do not know if any of them works:

  1. The Temporal option: The problem here is that I can't use the temporal controller to build maps in the print layout with legends, exports as svg...

  2. Using the Atlas. However (looking at this answer: Filtering features in other layers of QGIS Atlas) I am not sure if I can use a categorized style combined with a rule-based style in order to ensure that all same classes are styled the same way but only shown for the current date. If I use the date as converage layer in the qgis atlas

Is there any other, better way of achieving this without creating as many print comoposer maps as there are unique dates in the dataset?

1 Answer 1


You can achieve this with an Atlas:

Create a Virtual layer wityh no geometry, that will hold the unique dates from your 'test' layer. Let's call it datelist, we will use it as an Atlas input.

enter image description here

In the layouts, set the Atlas to use datelist as coverage layer, with pagenameset to the datefield:

enter image description here

Now, edit the rule based Style as mentioned in the link you provided:

enter image description here

Export the Layout as multi-page PDF: enter image description here

  • thanks a lot!!:) That already helps a lot! do you have any idea on how I could achieve the same without creating an additional layer?
    – Lenn
    Commented Feb 22, 2023 at 10:08
  • 1
    I don't see any clear option. You might be able to use the original layer itself for the Atlas, but you will end-up with multiple outputs for every feature/date...
    – Kasper
    Commented Feb 22, 2023 at 10:38
  • thanks a lot again!:) That really helped:)
    – Lenn
    Commented Feb 24, 2023 at 8:10

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.