FME Transformers: 2024.1
FME Transformers: 2024.1
GeometryFilter
Routes features based on their geometry type.
Each feature that enters the transformer is output via the port corresponding to its geometry type. Features are not altered.
Typical Uses
-
Writing to formats with different feature types for specific geometry types
-
Separating features based on geometry for further individual processing
-
Extracting one or more groups of features from a dataset based on geometry and discarding the rest
How does it work?
Once connected, the GeometryFilter lets you select which geometry types to filter incoming features by. All features are passed through the transformer, exiting via the port corresponding to their geometry type, or the unfiltered port for geometry types that were not selected.
Usage Notes
-
FME will sometimes automatically insert a GeometryFilter into a generated workspace. Some destination formats only permit features of a specific geometry type to be written to a single feature type. For example, a Personal Geodatabase Feature Type (Esri Feature Class) can hold polygons or polylines, but not both.
When you read from a source dataset that permits multiple geometry types in a feature class, but write to a destination dataset that is restricted to a single geometry type per class, FME automatically creates a destination feature type for each geometry type and inserts a GeometryFilter to divide up the features on the basis of geometry. This ensures that no destination feature type receives features that it is not permitted to write.
-
When in Simple mode, Aggregate features are automatically homogenized and filtered based on their component type. To keep heterogeneous aggregates together and filter homogeneous aggregates based on their geometry type switch to Detailed mode. To filter all types of aggregates together use the AggregateFilter.
-
When in Simple mode, GeometryInstance features are automatically instantiated. To filter GeometryInstances without modification, switch to Detailed mode.
-
MultipleGeometry features are treated as aggregates in this transformer. To filter MultipleGeometry features specifically use the MultipleGeometryFilter.
Configuration
Input Ports
Input
This transformer accepts any feature.
Output Ports
<Unfiltered>
Features with geometry types that do not match any selected Output Ports.
Dynamic Ports
Output Ports are created to mirror the selections made in the Output Ports parameter.
Output ports correspond to standard FME Geometry Model types.
Parameters
General
Mode |
This parameter switches the filter between Simple and Detailed mode. Simple mode provides a simplified list of types to filter by and automatically homogenizes Aggregates and instantiates GeometryInstance. Simple mode is recommended for use with output formats that have different feature types for specific geometry types, or when filtering by broader type categories is desired. Detailed mode allows for more granular filtering using the full FME Geometry Model, and allows users to choose the desired filtering behavior for GeometryInstances. Note When switching between Simple and Detailed mode, take particular care with geometry selections in Output Ports. Ports and connections may be added or lost where geometry types are not exactly equivalent.
|
Output Ports |
This parameter controls which output ports will appear on this transformer. Select the geometry types that are of interest, and a port will be shown for each of these. All other geometries will be output through the <Unfiltered> port. When in Detailed mode, the list of geometry types will be listed in a tree structure that matches the FME Geometry Model. When selecting types at different levels within the tree, features will be output through the most specific port available. This means if a parent type is selected, all geometry types under that type will be output via the parent port unless the child port is also selected, in which case features will prefer the child port. For example: WIth Area selected, features containing any type of Area will be output the Area port. If Ellipse is also selected, all features containing Ellipses will be output the Ellipse port while any other types of Areas will be output via the Area port. |
Handle Instances |
As Instances - GeometryInstances will be handled as a distinct type, with features containing GeometryInstances being output the GeometryInstance port if selected, otherwise the <Unfiltered> port. As Definition Type - Features containing GeometryInstance will be output via the port that matches the type of the geometry definition contained within each GeometryInstance. Nothing will be output via the GeometryInstance port if selected. Instantiate - All GeometryInstances will be instantiated before being filtered. This is the same functionality as Simple mode. This has the same effect as placing a GeometryInstantiator transformer (with an empty XQuery) before the GeometryFilter. Nothing will be output via the GeometryInstance port if selected. |
Advanced
Preserve Feature Order |
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.
|
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.
How to Set Parameter Values
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.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.
Content Types
These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |
Dialog Options - Tables
Table Tools
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
For more information, see Transformer Parameter Menu Options.
Reference
Processing Behavior |
|
Feature Holding |
No |
Dependencies | |
Aliases | |
History |
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 all results about the GeometryFilter 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.