FME Transformers: 2024.1
FME Transformers: 2024.1
About Group-Based Transformers
A Group-Based Transformer is one that processes a number of features simultaneously in conjunction with other features in the group.
Some examples of Group-Based transformation are:
- AreaBuilder: FME can create polygon features from line features when they form a closed shape, but there must be a group of such features. An area feature can’t be created from a single, non-closing, piece of linework by itself.
- StatisticsCalculator: the StatisticsCalculator transformer calculates the mean, maximum and minimum values of an attribute for a whole group of features. It isn’t possible to calculate these values one feature at a time.
- Intersector: calculating the intersection points of a set of lines falls under group-based restructuring because each input feature in the group affects the output.
Grouping Behavior (Group By Parameter)
For a Group-Based Transformer it is important to define the members of that group. The default behavior is to use the entire set of incoming features as a single group.
However, Group-Based Transformers have a special Group By parameter. This parameter allows you to select an attribute on which groups are to be formed. For example, an Intersector with the Group By parameter set to "road_type" will only intersect features whose value for the attribute "road_type" is a match.
Memory Concerns
Each feature takes up a certain amount of system resources while it is being processed. When features are processed simultaneously in a large group, then the amount of system resources used increases to match.
For that reason, Group-Based Transformers generally consume larger amounts of resources than Feature-Based Transformers. This effect can be reduced through use of parameters such as “Input is Ordered by Group” (found on most group-based transformers) and “X First” options such as “Candidates First”, “Clippers First”, etc.
Output and Output Attributes
When features are processed as a group, the output may be the original features, or it may be an amalgamation of the features in the group.
When the output is a combination of several different features, most transformers will remove source attributes, as there is no way of knowing which of the source attribute values should be applied when there are a number of features. The two exceptions are:
- Using a Group By: When you do this, the Group By attributes are generally passed on to the output feature, since by definition all the source values will be the same (that's how the group is formed).
- Using a list: Many transformers have a list option so you can keep track of source attributes by keeping all the values.
Feature Holding (Blocker Transformers)
By default, FME processes one feature at a time; reading the feature, passing it from transformer to transformer, and then - finally - to a writer.
However, some transformers process features as a group and hold features until they are ready to begin processing. These “Feature Holding” (or “Blocker”) transformers cause the flow of features to be temporarily halted until they have completed their processing. Most group based transformers fall into this category if they must they gather up the data in each group before doing their processing.
This change in the flow of features can be used to control the order in which data is processed and in fact the FeatureHolder transformer was specifically designed to hold features without actually doing any transformation.
Some other examples of Feature Holding transformers include:
- Sorter: This transformer requires all the input data to gather up inside it before it can do the work of ordering the features and then outputting them. The individual features in this case are not changed in any way, but their order in the data flow stream is changed as a result of going through the transformer
- NeighborFinder: Like all other spatial processing transformers that compare features to each other, this transformer requires all the features to have arrived before it can begin to determine which features are close neighbors of each other.