Skip to main content
Solved

Looping through list to exclude counts


pauld
Contributor
Forum|alt.badge.img+1
  • Contributor

Hi.

I have a problem where I have a local counter (_count) that adds a counter to each feature that passes through. I also have a list of numbers I want the counter to ignore. 

Eg 1 to 10,000 but ignore the 244 numbers in my _ignoreList, which is dynamically created.

 

1,2,3...39,40,42 (ignore 41 because its in my list)

Any ideas on how I would go about this?

All help is greatly appreciated.

Regards, Paul

Best answer by geomancer

  • Use a ListBuilder to create a list (in the FME sense) of the IDs to ignore
  • Add this list to all input features (use a FeatureMerger with dummy values to join on)
  • Use a ListSearcher to check whether a feature ID is in the ignore list
  • Continue with the features to process

 

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

2 replies

geomancer
Evangelist
Forum|alt.badge.img+48
  • Evangelist
  • Best Answer
  • May 27, 2024
  • Use a ListBuilder to create a list (in the FME sense) of the IDs to ignore
  • Add this list to all input features (use a FeatureMerger with dummy values to join on)
  • Use a ListSearcher to check whether a feature ID is in the ignore list
  • Continue with the features to process

 


pauld
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 28, 2024

Thank you @geomancer. Perfect!


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