TestFilter
Filters features by test conditions to one or more output ports.
A test condition consists of one or more test clauses and a specified comparison method (AND, OR, or COMPOSITE).
Output Ports
The feature is output via the <Unfiltered> port if the feature does not satisfy any of the test conditions. The name of this port can be changed by editing the parameters.
You can also specify your own output port names as described in step 4 under Port Definitions below.
Parameters
- Double click a blank row in the table (or select the row and click the Edit Conditions button).
- Specify the Test Conditions. These are described in detail in the Tester transformer.
- Click OK to close the window and add the test condition to the TestFilter.
- Initially, the test condition will appear in both the Test Conditions and the Output Port columns. You can edit the Output Port field to specify your own output port name. Multiple test conditions can output to the same output port if the port name is the same.
Repeat these steps for each test condition that you want to add to the TestFilter. The buttons on the side of the dialog box allow you to add and remove rows from the table, and set the order in which to perform the tests:
Unfiltered Port Name
The feature is output via this port if the feature does not satisfy any of the test conditions. By default, the port is named ‘<Unfiltered>’.
Advanced
This parameter controls the order in which features exit a transformer.
When a transformer has more than one output port, features usually exit one port at a time. At times, it may be useful to keep the order that features arrived in, switching from port to port as necessary. This allows feature order to be preserved, though at a potential cost in processing efficiency.
Select a method for feature ordering.
Per Output Port (Default) |
Only preserve the input order of features as they occur within the group of features exiting a given output port. All features exiting an output port retain their ordering relative to each other (within the group), but not relative to features exiting other output ports. This option is generally the most efficient, where large chunks of features will exit an output port together (taking advantage of bulk mode). As features exiting different output ports may not be strictly output in the order they arrived, output ordering may be unpredictable. |
Across Output Ports |
Strictly preserve the input order of features, regardless of which output port they exit. Features will be output singly in the same order they arrived, switching from port to port as necessary. This option is generally less efficient as the processing gains of bulk mode are less likely to apply - however, feature order is predictable. |
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.
Transformer Categories
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