I have two inputs, a polygon shape file and a point shape file. The polygon shape file contains two area polygons, A and B. Each has a single, name attribute - A and B respectively. The point file contains 30 points and they also have a single name attribute, with attribute values ranging from A to E. Some of these points fall inside the polygons and others do not.
As a rule, polygon A must only contain two A points and one E point while polygon B must only contain two B points and one E point.
I input both shapefiles into PointOnAreaOverlayer transformer which filters out all points falling outside of the polygons. Within this transformer, I generate an attribute accumulation list on the Area outputs, with the selected attribute set to 'name'.
Using listElementCounter, I can see if the correct number of points fall in each polygon - in this case 3. Using ListConcatenator, I can create an attribute listing the names of the points that fall in to the polygon, eg- A, A, E.
I can then use Testers to verify if polygon A as the correct three points with IDs A, A and E, and similar for polygon B (B, B, E).
However, I think I may be overcomplicating the procedure. I initially thought of using SpatialRelator, but couldn't figure out how to analyse if the correct point configuration was in each polygon. Any thoughts on my methodology or suggested improvements would be most welcome.