Question

Strange behavior of AnchoredSnapper followed by PointOnAreaOverlayer


Badge +3

Hi,

I have some points (boundary stones) that should be aligned on the contour of boundary polygons. Since the field location accuracy is known to be inaccurate, I want to snap the points to the contour of the polygons.

I supposed that AnchoredSnapper was the transformer to do this. And it seems to work fine. However, when I further apply a PointOnAreaOverlayer transformer, although all the points visually seem to be on the polygon contour, some points have 0 _overlaps.

when I check the output of PointOnAreaOverlayer some snapped features have _overlaps = 0

I was careful to link the snapped output of AncoredSnapper to PointOnAreaOverlayer.

What am I missing ? workbench


6 replies

Userlevel 4
Badge +25

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.

 

Badge +1

Most likely the point are snapped to the edge, so technically wont be inside the polygons

Userlevel 6
Badge +32

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.

Badge +2

@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

Badge +3

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.

Badge +2

@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)

Reply