Question

Remove duplicate entries

  • 22 April 2016
  • 3 replies
  • 8 views

Badge

Dear FME community,

I have a road network which has duplicate entries. The attributes differs just in one attribute ("bescheid_nr"), all other attributes are the same in the example. I want to keep only the feature with the highest number in the attribute "bescheid_nr" when all other values are the same. In the screenshot the feature 2 to 6 should be removed. They are not valid. Is there a way how I can filter them out so only the first entry in the screenshots gets preserved (all 5 have different geometries)?

Kind regards

Thomas


3 replies

Userlevel 1
Badge +21

Take a look at the matcher

Put them all in a listbuilder sort the list and then take the desired item from the list.

Be sure to keep the geometry if you wat to keep it in a different attribute so you can restore it after the listbuilder and sorter. In the list the geometry gets lost. but with a geometry extracter into an attribute and after that a geometryreplacer to restore the geometry it should work just fine.

Badge

Hello,

If your duplicates are only attribute based (no need to match the geometries), I'll do it this way.

  1. Sort your features based on bescheid_nr (Sorter)
  2. Filter out the duplicates based on grundbescheid_nr (DuplicateFilter)
  3. Keep the unique and merge back the duplicates based on grundbescheid_nr and bescheid_nr (FeatureMerger)

Regards,

Larry

Reply