Hi FME’ers,

A couple of year’s ago I wrote an article about ‘conditional processing’ in FME, and when to use the different filtering and mapping transformers. Looking back it seems a bit long-winded and complicated (sorry) and so I wanted to write this short post to simplify matters.

Basically I want to describe when to use the Tester, TestFilter, and AttributeFilter. I figure I can do that using some simple examples.

EvangelistBanner7

The Tester

The Tester transformer is for simple Yes/No decisions, for example:

Testing-Tester

These tests can be combined as well, within a single Tester, for example:

They can be quite complex too, in what we call a composite test, for example:

…but each component is still a simple Yes/No test. The order of the conditions is only important when you do a composite test (and not always then).

The AttributeFilter

The AttributeFilter is best for testing many values for a single attribute, for example:

Testing-AttributeFilter

You wouldn’t do combination tests here (for example, a road can’t be both Primary and Secondary) and so the order of the tests is not important.

The TestFilter

The TestFilter is best for filtering a feature by a set of cascading conditions, for example:

To play in the FME golf tournament you must pass one of these conditions (similar to the Masters qualification rules):

Testing-TestFilter

It’s a set of cascading tests, because if you are the current FME golf champion, you qualify at the top of the list. You don’t need to be tested against any other criteria. So here the test order is important.

Like the Tester, each test can be a combination of conditions, for example:

EvangelistBanner7

If the above seems familiar, well it’s an expanded version of some info in the FME training course.

I hope you find this a useful reference,

NewBlogSignature

About FME Attributes FME Evangelist Tester

Mark Ireland

Mark, aka iMark, is the FME Evangelist (est. 2004) and has a passion for FME Training. He likes being able to help people understand and use technology in new and interesting ways. One of his other passions is football (aka. Soccer). He likes both technology and soccer so much that he wrote an article about the two together! Who would’ve thought? (Answer: iMark)

Related Posts