The Filter class controls the logic of match feature property attributes to see if a rule should be applied or not. We can use a single filter, like in the previous example, or we can combine filters together (e.g., if property1
is greater than 500 and another property2
is less than 200, then apply the style).
Filters can also be spatial—we can check to see if features intersect geometry objects, are within some distance of a point, and more. To do all these things, we use subclasses of the base Filter class, similar to how we use subclasses of the Layer class and other classes.