2

I have some mining data that I want to filter by year and by bench. The data is something like this:

bench   year
1      2020
1      2021
1      2022
2      2020
2      2021
2      2022
4      2020
4      2020
4      2021
4      2021
4      2022
3      2020
3      2021
3      2022
3      2023

This is a polygon layer with squares representing each bench. Each bench has a different year when they will be mined. some of these polygons have the same location (same X,Y but different Z value), different bench number, but will be mined at a different year.

I want to create several maps that can filter the data by year; e.g. These are all the benches that are going to be mined in 2020. Then I want to do it by bench; e.g bench 4 will be mined in 2020, 2021 and 2022.

I was wondering if I can do this with Atlas?

4
  • In QGIS 3.14 a temporal controller has been added: qgis.org/en/site/forusers/visualchangelog314/…. It is also available in layout manager. Unfortunately I don't know how to use it yet
    – MrXsquared
    Commented Sep 28, 2020 at 14:18
  • Not sure if there is a current methodology for this kind of filtering. The only things I could suggest are either 1.creating duplicates of the layer and using 'Themes', 2.Filtering the layer and just manually exporting each view (not using Atlas), 3.Look to combine the data in a new layer using dissolve (specifying a field to use) to create a layer for each 'set' that you need e.g. a 2020 layer (with all relevant benches) or a Bench1 layer (with all relevant years)
    – JClarkson
    Commented Sep 29, 2020 at 9:54
  • That is good idea. What I currently do is:
    – rvirto0001
    Commented Sep 29, 2020 at 14:57
  • 1 Make a duplicate layer 2. Use "Categorized" as Symbology; to group the data that I need (by year for on layer, by bench for the other) 3. Then I use "Query Builder" (or right-click > Filter...) to filter the data for each layer. This is fine but if I need to make corrections I have to go back and correct each view
    – rvirto0001
    Commented Sep 29, 2020 at 15:09

1 Answer 1

0

I think I figured it out. To do it for each bench per year:

  1. Dissolve layer. make sure you choose bench as your Dissolve field(s)

  2. Choose this newly dissolved layer as your atlas Coverage Layer and choose bench as Page name

  3. In the original layer go to Properties and select Rule-Based

  4. Add a rule for each year and do the following: rule-based symbology something like this:

    "year" = 2020 AND "Bench" = @atlas_pagename

Now all I did was duplicate the original layer and do this time dissolve by year and change the rule to

"bench" = 2 AND "year" = @atlas_pagename

do this for every bench

This can also work for a graduated symbology. Something like this:

"field_name" >= 0.0 AND "field_name" <= 20.0 AND "field_to_filter" = @atlas_pagename

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.