Your process is correct.
First thing I would do is inspect that failed feature and take a look at it's coordinates (select that feature and then look at the Feature Information panel of Visual Preview), compare them to the corresponding ones on the area feature.
Most likely the point are snapped to the edge, so technically wont be inside the polygons
Most likely the point are snapped to the edge, so technically wont be inside the polygons
I assumed this as well, but I can't reproduce it. You can check if it does touch the border using the SpatialRelator.
@timotheebecker If you could include a small sample dataset and workspace so the community can take a closer look at the issue you've encountered. I could reproduce the issue
OK @markatsafe. Here is the test data and workbench.
You'll see I am able to solve the problem with a bufferer transformer. But to my understanding, it should work without this.
@timotheebecker Thanks very much for including your workspace and the sample data. This helps us see the issue more clearly.
There are some interrelated behaviours that cause your issue - that SpatialRelator apparently does not return the correct intersection result:
- SpatialRelator does not have a tolerance and the intersections must be exact.
- PointOnAreaOverlayer doesn't have a tolerance so points have to lie exactly on the line to get a match.
- The AnchorSnapper does insert vertices on the the Anchor features when using segment snapping
So when a point is near the middle, say, of a line segment, the slight difference in the calculated location on the line and the actual point location is enough to throw off the PointOnAreaOverlayer, SpatialRelator or SpatialFilter. Inserting a point on the areas boundary will help SpatialRelator/Filter do it's work.
For this problem you can use either:
- AnchorSnapper, but use the Anchor areas as the input to the SpatialRelator/Filter Supplier port. This will use inserted points on the areas and allow SpatialRelator/Filter to do it's work .
- NeighborFinder, with a small tolerance and test for a reasonable '_distance" value
- Intersector, Snapper, TopologyBuilder are other options for adding vertices to the areas, where the points are, so SpatialRelator/Filter can do their work
You don't really need the PointOnAreaOverlayer. I've attached a revised example (FME 2021.2)