Let me put it this way, if I’ve tried data-defined rendering and the common featureid expression and it’s still not working - and I think one or both options should - what basic thing could I be doing wrong?
I am using QGIS version 3.4 to create atlas maps utilizing a polygon coverage layer of 19 watersheds. Everything works fine in layout as I can jump/zoom to each desired watershed map. Furthermore, to filter out features surrounding the active watershed, I've applied symbology with inverted polygons and rule-based sub-renderer with the expression
$id = @atlas_featureid. This successfully removes outlying features, but not their labels. The labels are from both polygon and point shapefiles.
I've tried seemingly everything - different types of symbology, various other expressions (which I, admittedly, don't fully understand), old versions of QGIS, a new project using only two shapefiles (using counties to filter out surrounding cities) - but nothing gets rid of the outlying labels. I've got to believe it's something simple I'm doing wrong. What could that be?
BTW, I’ve tried using the mask plugin, but with the same result.