Skip to main content
Solved

Remove duplicate points if they belong to the same group ID


I have a point file containing instructions along routes, lets call this the major decision points. Each collection of points belong to a route and has a route id. This data is all contained within one file, which can be made of points belong to numerous routes.

I then have another file containing points for all junctions along the route, again this data has a route ID that is the same as the previous file for the given route. Lets call these the minor decision points and again this file is made up of points belonging to different route IDs.

The problem is that I need to remove the minor decision points when they are duplicates for major decision points, however, these should only be removed if they belong to the same route ID. To complicate maters some of these routes will overlap.

My initial idea was to create a loop transformer that processes features that belong to the same route ID, and then remove the duplicate minor decision points this way. However, I am stuck on exactly how I would achieve such a solution. Does anyone have any ideas or other potential solutions?

Best answer by takashi

Hi @jedimule, since the major decision points and the minor decision points both have a common attribute called "route ID", you can detect duplicate points for each route with the PointOnPointOverlayer grouping them by the route ID.

Enter all the "major" and "minor" points into a PointOnPointOverlayer, set "route ID" to the Group By parameter and set an appropriate tolerance to the Point Tolerance parameter (0 if you want to detect "exact" match).

The output points will have overlap count attribute. If its value was 1 or more, it indicates the point duplicates in the group.

After separating the resulting points into "major" and "minor" by seeing an attribute which indicates point type (e.g. "fme_feature_type"), you can filter out duplicate "minor" points according to the overlap count attribute.

View original
Did this help you find an answer to your question?

2 replies

takashi
Influencer
  • Best Answer
  • June 28, 2018

Hi @jedimule, since the major decision points and the minor decision points both have a common attribute called "route ID", you can detect duplicate points for each route with the PointOnPointOverlayer grouping them by the route ID.

Enter all the "major" and "minor" points into a PointOnPointOverlayer, set "route ID" to the Group By parameter and set an appropriate tolerance to the Point Tolerance parameter (0 if you want to detect "exact" match).

The output points will have overlap count attribute. If its value was 1 or more, it indicates the point duplicates in the group.

After separating the resulting points into "major" and "minor" by seeing an attribute which indicates point type (e.g. "fme_feature_type"), you can filter out duplicate "minor" points according to the overlap count attribute.


  • Author
  • June 29, 2018
takashi wrote:

Hi @jedimule, since the major decision points and the minor decision points both have a common attribute called "route ID", you can detect duplicate points for each route with the PointOnPointOverlayer grouping them by the route ID.

Enter all the "major" and "minor" points into a PointOnPointOverlayer, set "route ID" to the Group By parameter and set an appropriate tolerance to the Point Tolerance parameter (0 if you want to detect "exact" match).

The output points will have overlap count attribute. If its value was 1 or more, it indicates the point duplicates in the group.

After separating the resulting points into "major" and "minor" by seeing an attribute which indicates point type (e.g. "fme_feature_type"), you can filter out duplicate "minor" points according to the overlap count attribute.

So simple! I had obviously been looking at this issue for too long and over complicating it.

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings