Question

What are group-based transformers?

Answer

A Group-Based Transformer is one which processes a number of features simultaneously, or in a group. In most cases the features are processed against each other; for example a PointOnAreaOverlayer. The act of processing in this way is known as Group-Based Processing.

In general, most transformers dealing with spatial data are group-based, whilst attribute handling transformers are mostly Feature-Based Transformers.

Grouping Behaviour

The default behaviour for a group-based transformer is to use the entire set of features as the group; for example an AreaBuilder transformer will attempt to build area features out of all of the features that enter.

However, most group based transformers have a "group-by" option. This option allows the user to select an attribute on which groups are to be formed; for example an Intersector with a group-by option set to "road_type" will only intersect features whose value for the attribute "road_type" is a match.

Categorization

It's somewhat difficult to categorize some transformers as being group-based transformers. The usual definition is that a number of features are processed against each other, and each feature can in some way affect the processing of the others. But this definition becomes blurred for, say, raster transformers (technically each raster is a separate feature in itself, not each cell) and for transformers such as the Snapper (where features are processed in a group, but have no effect on each other's processing).

Memory Concerns

A feature of group-based transformers is that they go against the general rule of FME, that features are processed one at a time, and require that a number of features be held in memory at one time. Because of this such transformers are more prone to consume large amounts of system resources (some such as the Clipper have extra options to help mitigate this effect) but can be used creatively to handle the flow of features through a workspace.

Output and Output Attributes

Although all group-based transformers process features one against the other, there is a difference in the type of output returned. Some transformers output all the original features, but slightly transformed in some way - the NeighborFinder, Snapper, and Sorter are good examples of this. However, some transformers actually combine the original features together to form a new output - the PolygonBuilder, TINGenerator and Clipper are good examples of this.

When the output is a combination of several different features, then most transformers will remove source attributes, the reason being 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 then 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.