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 a single 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.
A Group-Based Transformer 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, while attribute handling transformers are mostly Feature-Based Transformers.
Some examples of Group-Based Transformer are:
- Polygon Creation – FME can create polygon features from a set of line features when they form a closed shape. The line features are grouped together to produce a single area feature.
- Statistics Calculation – the StatisticsCalculator transformer calculates the mean, maximum and minimum values of an attribute for a whole group of features.
- Intersections – calculating the intersection points of a set of lines falls under group-based restructuring because each input feature in the group affects the output.
- 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.
A Feature-Based Transformer is one which processes one feature at a time, in isolation from all other features.
Some examples of Feature-Based transformers are:
- AreaCalculator and LengthCalculator: These transformers perform calculations on only one feature at a time. The result of measuring one feature has no impact on the measurement of another.
- CenterPointReplacer: – Each “center of gravity” (geographic center) calculation is unique and independent of other features.
- 3DForcer: Each feature is given Z values to its vertices, but one at a time and without affecting the Z values of other features.
Usage Notes:
- Feature-Based Transformers don’t always need to process each feature in the same way. The use of attributes for parameter values means the process can vary with the attribute - for example, using an attribute value in the 3DForcer elevation parameter.
- Aggregates: Each aggregate is considered a single feature; for example the measurement of the area of a multi-polygon feature returns a single value, not the value of each component of the aggregate.
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 FeatureHoldertransformer 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 neighbours of each other.
Transformer Gallery
The transformer gallery window is the obvious place to start looking for transformers. There are a number of ways in which transformers here can be located.
Transformer Categories
Transformer categories are a good starting point from which to explore the transformer list. Transformers are grouped in categories to help find a transformer relevant to the problem at hand.
Although all of them are important, the most commonly used transformers are found in these categories:
- Attributes: Operations for attribute/list management
- Calculated Values: Operations that return a calculated value
- Filters and Joins: Operations for dividing and merging data flows
- Geometries: Operations that create geometry or transform it to a different geometry type
- Spatial Analysis: Operations that return the result of a spatial analysis
- Strings: Operations that manipulate string contents, including dates
The main attribute-management tasks and the transformers that can be used are as follows:
Task | Transformers |
Create Attributes | AttributeCreator, AttributeManager |
Set Attribute Values | AttributeCreator, AttributeManager |
Remove Attributes | AttributeKeeper, AttributeManager, AttributeRemover, BulkAttributeRemover |
Rename Attributes | AttributeManager, AttributeRenamer, BulkAttributeRenamer |
Copy Attributes | AttributeCopier, AttributeCreator, AttributeManager |
Sort Attributes | AttributeManager |
Change Attribute Case | BulkAttributeRenamer |
Add Prefixes/Suffixes | BulkAttributeRenamer |
Note: Attribute Manager is used for mostly all task.
Category Basis FME Transformer | ||
Attributes | Spatial Analysis | Filters & Joins |
No comments:
Post a Comment