TestFilter

Filters features by test conditions to one or more output ports.

This transformer is equivalent to a connected string of Tester transformers, and can be used to reduce a workspace that is filled with Testers.

A test condition consists of one or more test clauses and a specified comparison method (AND, OR, or COMPOSITE).

Output Ports

You can also specify your own output port names as described in step 4 under Port Definitions below.

Parameters

Creating Test Clauses

Each clause is composed of a value to test, and the method of testing it. Depending on the type of test, at a minimum the clause will consist of a Left Value and an Operator. If the chosen Operator needs more information (for example, testing for an attribute that is greater than a certain value), a Right Value field is provided.

The Test Clauses are created in a table, and numbered from the top down.

Left Value

Operator

Right Value

Mode*

The value or expression to test The type of test to perform The value for comparison, if required by the operator Test the values in a specific manner
Examples
Latitude > 49.000001 Automatic
@Area() In Range (1,100) Numeric
SnackType Like Kebabs Case Sensitive
Traffic Attribute Is Null <Unused> Automatic
Count Type Is Integer Automatic

* Note that Mode is only available for individual tests when Comparison Mode is set to Specify Per Test.

Cached Values and Data-Aware Test Clauses

If Feature Caching is enabled, valid attribute values from upstream features can be viewed to complete test clauses.

As shown here in the Tester, if the Left Value has been set to an Attribute Value and the features have been cached, the context menu provides access to the values available in those features. If there are only a few choices, they will be presented in a sub-menu.

If there are a large number of choices, the values will be presented in a Select Value dialog, where the values may be sorted and searched with the Filter option.

Connecting Test Clauses: Logic

Multiple test clauses are connected with Logic, using AND, OR, and NOT in addition to parentheses to specify how the tests are evaluated to determine passing or failing.

Logic connectors can be edited by selecting options in the Logic column of the Test Clauses table, or may be edited directly using the Composite Expression parameter’s Edit button.

Advanced

Usage Notes

  • This transformer is equivalent to a connected string of Testers, and can be used to reduce a workspace that is filled with Testers.
  • See the Tester for more information on test conditions.

Editing Transformer Parameters

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.

Defining Values

There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.

Dialog Options - Tables

Transformers with table-style parameters have additional tools for populating and manipulating values.

 

FME Community

The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

Search for samples and information about this transformer on the FME Community.

Keywords: Tester AttributeTester GenericTester Operator