I'm working with an atlas in QGIS and have a coverage layer with over 2000 features. Due to the large number of features, it takes a considerable amount of time to load. I'd like to optimize this by limiting the atlas to display only the current feature or a range around the current feature (e.g.,
$currentfeature +/- 5).
I've attempted to use the "Filter with" option in the Atlas settings with expressions like
"id" = @atlas_featureid and
"id" = $id, but neither seems to achieve the desired result.
How can I effectively filter the coverage layer to display only the current feature or a specific range around it?
My coverage layer consists of the colored polygons shown in the image below. To set up the Atlas, I can right-click on these polygons and select the desired Atlas, as demonstrated in the image:
The result is this atlas:
When I don't use a "filter", it cycles through the entire size of the coverage layer (which has over 2000 polygons), making the creation process quite slow. I can implement a static filter like
"id" in (10,12,13) and the atlas cycle through polygons 10,12,13 only. I'm curious if there's a way to implement a dynamic filter that limits the number of features in the coverage layer to cycle through, perhaps using something like
"id" = @atlas_featureid:
But it seems not taking into account project variables for atlas filtering