I want to do rule based styling for a selection of gridded polygons dependent on their position relating to another layer. I want to show the polygon that a point feature based in an atlas falls within which I have managed with
intersects($geometry,@atlas_geometry)
The tougher bit is that I also want to show the 8 grid boxes that surround the central grid box in another style. Unfortunately, as the grid is rectangular, not square, I cannot just use a buffer of the atlas feature as when the feature is close to the edge it will show features to the east/west before north/south. I have tried using nested intersections such as
intersects($geometry,intersects($geometry,@atlas_geometry))
but no luck so far. I want to do this dynamically so it shows just the grid surrounding the atlas feature and without having to create any more new layers.