FME Transformers: 2025.1

Categories
Data Quality
Database
Filters and Joins
Related Transformers
AggregateFilter
AttributeFilter
AttributeRangeFilter
ClosedCurveFilter
ConvexityFilter
DuplicateFilter
FeatureTypeFilter
GeometryFilter
MultipleGeometryFilter
PlanarityFilter
SpatialFilter
Tester

TestFilter

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

Jump to Configuration

Typical Uses

  • Replacing multiple Testers
  • Dividing features into multiple streams

How does it work?

The TestFilter accepts any type of feature and evaluates them against any number of specified tests.

Features are output though a named port when they pass a test, and may be output at the first test they pass or for every test they pass.

Features that do not pass any tests are output as <Unfiltered>.

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.

Test Clause Operators

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.

Configuration

Input Ports

Output Ports

Parameters

Editing Transformer Parameters

Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

For more information, see Transformer Parameter Menu Options.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies None
Aliases  
History  

FME Community

The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.

Search for all results about the TestFilter on the FME Community.

 

Examples may contain information licensed under the Open Government Licence – Vancouver, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.