Group-By Processing

Group-By parameters are an important tool for effective FME data transformations.

What is a Group?

FME transformers carry out transformations on either one feature at a time, or on a whole set of features at once.

For example, the AreaCalculator transformer operates on one feature at a time (to measure the area of that one polygon feature). We call it a feature-based transformer.

The StatisticsCalculator operates on multiple features at a time (to calculate an average value for them all).

In FME we call this set of features a group, and the transformer is a group-based transformer.

Creating Groups

By default a group-based transformer treats ALL the features that it is fed as a single group.

However, such transformers also have a Group-By parameter. This parameter lets the user define several groups based upon the value of an attribute.


Mr. Statistics-Calculator, CFO says...
Hi. I don't think we've met yet. I'm Mr. Statistics-Calculator. I bet you can't guess my favourite transformer!

To illustrate groups let's consider calculating the mean age of FME users. Don't worry - I'll be discrete (ha ha)! The default group for the calculation includes ALL FME users.

But you could instead divide everyone up on into men and women, creating two groups, and calculate average age per gender. Or you could divide everyone into their nationality, and calculate average age per country.

This is the same as having a gender (or nationality) attribute in a dataset and selecting that in an FME group-by parameter.

Here, a LineOnLineOverlayer transformer is being used to intersect a number of line features.

The selected Group-By attribute is name.

The result is a series of groups for overlaying where the features in each group share the same value for name.

The practical outcome is that intersection will only take place on line features with the same name.


Miss Vector says...
Let's see if you've picked up the idea of what a group-based transformation is.

Which of the following transformers do you think is "group-based"? Feel free to use Workbench to help you answer this question.

1. StringFormatter
2. Clipper
3. Rotator
4. AttributeRounder

results matching ""

    No results matching ""