You could do this by creating a standalone table with a field like atlas_features
. That field could contain a delimited string of feature IDs, like so:
FID |
atlas_features |
1 |
‘C01,C02,C03’ |
2 |
‘C04,C05,C06’ |
Getting the layout / map elements to look right would require a lot of writing expressions, but it’s still possible to do it.
Styling
Use rule-based styling on your coverage layer. Create a rule like this:
string_to_array(attribute(@atlas_feature, 'atlas_features'), ',')[0] = "cell_id"
Then an “ELSE” rule to get everything else. Or if you want them transparent, just omit any further rules.
Save the layer style, then create a theme with the style active.
Repeat for each map in the layout, updating the index of the string array. In my case, I’ve got three maps, so there are three layer styles corresponding to three map themes.
Layout
Maps
Make sure each map follows the themes you set.
Setting a dynamic extent is tedious, but not terrible. In the map, set an override on the min/max X and Y of the extent. Here’s the min_x, for instance:
x_min(
geometry(
get_feature(
'Grid',
'cell_id',
string_to_array("atlas_features", ',')[0]
)
)
)
You can optionally add or subtract from this value to give a buffer between the feature and the edge of the map frame.
Text, etc
For the IDs, that’s easy:
string_to_array("atlas_features", ',')[0]
For other attributes, you’ve got to use the ID from the atlas to filter the actual shapes layer:
attribute(
get_feature(
'Grid', -- shape layer
'cell_id',
string_to_array("atlas_features", ',')[0]),
'left' -- attribute you want
)
As I said, tedious to set up. But the end result is what you want, I think? Here’s me toggling atlas pages: