How do you want to resolve conflicts? Randomly remove 1 of the overlapping points, create a new point halfway between points, use another attribute to determine which point to keep (ex, point furthers from all other points), iteratively remove the point with the most overlaps, until no overlaps are left, some other technique.
The examples I gave are more or less in order of complexity to do.
How do you want to resolve conflicts? Randomly remove 1 of the overlapping points, create a new point halfway between points, use another attribute to determine which point to keep (ex, point furthers from all other points), iteratively remove the point with the most overlaps, until no overlaps are left, some other technique.
The examples I gave are more or less in order of complexity to do.
Good point. (badtum tss)
I don't want to create halfway coordinates, I like to retain the original coordinates.
So I guess the second option: remove points with most overlaps until no overlaps left.
Can someone help me out with this?
Good point. (badtum tss)
I don't want to create halfway coordinates, I like to retain the original coordinates.
So I guess the second option: remove points with most overlaps until no overlaps left.
That is of course the most complicated option because it involves looping in a custom transformer with blocking transformers.
First extract the coordinates of the point or the geometry, so that the original point can be restored at the end.
Buffer the points , then use a geometryExtractor to store the Buffered Points (BP) and a counter to assign a unique ID (_uid) to the BPs.
This is not part of the loop.
Next is to identify clusters and assign a unique ID (_conID) to them.
I would do this in python using a connected component analysis.
In pure FME, I would buffer, dissolve (Dissolve Count Attribute as _conCt), Counter (_conID), and merge it with the buffered points with a spatialFilter or possibly a listBasedFeatureMerger, I'm not sure which would be more efficient.
Any BPs that have a_conCt of 1 can skip directly to restore point geometry and not be part of the rest of the processing.
Because all your features have the same geometry, you can also treat the simple case of _conCt of 2 by using a sampler to keep only 1 of the two features.
Identify how much of the feature is overlapping.
Now comes your AreaOnAreaOverlayer, creating a list. Calculate the Area for each feature that has 2 or more overlaps. Explode the list, which creates duplicate overlapping parts for each _uid, then aggregate grouping on _uid and summing the area.
Restore the BP geometry, calculate it's area and create an attribute of ratio of overlapping area and total area (_percentOverlap).
Remove most overlaping feature in a cluster
Simple case:
_conCt of 2
You've already dealt with this, but if you had differing geometry, you would want to keep the feature that had a lower _percentOverlap, using a sorter and sampler (first 1 features).
Complex case
Aggregate on_ conID creating a list. Sort the list in descending order on _percentOverlap. ListIndexer on item 0, adding a prefix. This will give you the _uid of the BP with the most overlap. Deaggregate and test for that UID, all features that fail should have the interim attributes removed and be looped back to the beginning (identify point clusters).
Revert to Points
Once all features have been processed and there are no more overlaps, restore the original point geometry.
I've probably missed a couple of important settings on transformers, but hopefully this gives you enough information to put something together.
Good point. (badtum tss)
I don't want to create halfway coordinates, I like to retain the original coordinates.
So I guess the second option: remove points with most overlaps until no overlaps left.
Thanks for your time creating the write up jdh.
I'll have a look and see if I can get this to work.