Skip to main content
Best Answer

Conditional processing based upon published parameter on dataset level (not for each feature seperately)

  • May 22, 2019
  • 5 replies
  • 38 views

friesewoudloper
Participant
Forum|alt.badge.img+1

My workspace has a published parameter `area` which can have the values `country` or `province`. It also contains a SpatialFilter transformer that only needs to be executed if `area = province`. How do I evaluate whether this condition is met only once for the entire dataset? Because I have hundreds of thousands of features, I don't want to evaluate the condition for each feature seperately. I would like to do conditional processing on the *dataset* level in stead of the feature level, so Tester and TestFilter are probably not the solutions I'm looking for.

Best answer by redgeographics

If you use a Creator and TestFilter you can test the parameter just once and then use FeatureReaders to do the actual reading.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+62
  • Celebrity
  • Best Answer
  • May 22, 2019

If you use a Creator and TestFilter you can test the parameter just once and then use FeatureReaders to do the actual reading.


nielsgerrits
VIP
Forum|alt.badge.img+64

If you use a Creator and TestFilter you can test the parameter just once and then use FeatureReaders to do the actual reading.

This. I never understand why people are still using classic readers?


redgeographics
Celebrity
Forum|alt.badge.img+62

This. I never understand why people are still using classic readers?

Old-school FME nerd :) I find it hard to break old habits, but you are absolutely right, FeatureReaders and -Writers do offer a lot more flexibility in complex workflows.


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • May 22, 2019

Old-school FME nerd :) I find it hard to break old habits, but you are absolutely right, FeatureReaders and -Writers do offer a lot more flexibility in complex workflows.

For most users it easier/faster to drag and drop the file(s) to be read, then set up a creator/featureReader.


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • May 22, 2019

You may also wish to vote on the following idea: https://knowledge.safe.com/content/idea/61178/parameter-flow-control.html