TraitMerger
Moves the traits from one geometry onto another geometry. It can also move the attributes from a feature onto a geometry as traits, or the traits from a geometry onto a feature as attributes. The TraitMerger does not support attribute-attribute merges. For merging attributes between features, use the FeatureMerger.
Features that contain the desired attributes/traits are connected through the Supplier port, and the features that will receive the attributes/traits are connected through the Requestor port.
Requestor features/geometry are joined to Supplier features/geometry when the expressions specified in the Join On parameter ALL have the same value for both the requestor and supplier.
Input Ports
Receives the new attributes/traits from the features connected to the Supplier port.
The source of new attributes/traits for features that enter through the Requestor port.
Output Ports
Requestors that find a Supplier.
Requestors that do not find a Supplier.
Suppliers that are found by at least one Requestor.
Note: A Supplier may still be output through this port even though none of its attributes/traits were merged. This can occur because all of the attributes/traits were already present in the Requestor.
Suppliers that are not found by any Requestor.
Parameters
Join On
Specify an expression from the Requestor to match with the Supplier expression. An expression can be a constant, attribute value, trait value, function or mixture. Matches are made when the values of all the Requestor expressions equal the values of their corresponding Supplier expressions.
Merge Parameters
This parameter specifies the supplier type:
- When the Supplier Type parameter is Trait, the geometries chosen under Supplier Geometry Part Selection will be used as suppliers. In this mode trait values can be used in the Supplier Join On expression column. Requestors will receive traits from their matched supplier geometry.
- When the Supplier Type parameter is Attribute, incoming features will be used as suppliers. In this mode attribute values can be used in the Supplier Join On expression column. Requestors will receive attributes from their matched supplier feature.
When Supplier Type is set to Trait, this parameter controls which portions of the geometry are used as suppliers.
Use this parameter if you want to isolate only a portion of the geometry passed in to the transformer. If no criteria are specified, the action will apply to the entire geometry at all levels.
Selection can be based on structural location, geometry name, type, appearance information, traits, trait storage types, or definition reference. The syntax used is a restricted set of XQuery, where the return clause is fixed.
The basic Geometry XQuery dialog allows you to construct simple selection queries by automatically writing the necessary query based on specified test clauses. Clicking the Switch to Advanced button opens the Advanced Editor, which allows you to type a query free-form, for more expressive queries.
Note: Once you switch to Advanced mode, you will have to clear all parameters before you can return to Basic mode.
A hierarchical geometry is represented as nodes of type geometry, with attributes containing information about traits, type, and name for each geometry.
This parameter specifies the requestor type:
- When the Requestor Type parameter is Trait, the geometries chosen under Requestor Geometry Part Selection will be used as requestors. In this mode trait values can be used in the Requestor Join On expression column. If Supplier Type is Attribute, supplier attributes will be transferred to the requestor as traits. If Supplier Type is Trait, supplier traits will be transferred to the requestor directly.
- When the Requestor Type parameter is Attribute, incoming features will be used as requestors. In this mode attribute values can be used in the Requestor Join On expression column. If Supplier Type is Trait, supplier traits will be transferred to the requestor as attributes.
When Requestor Type is set to Trait, this parameter controls which portions of the geometry are used as requestors.
Use this parameter if you want to isolate only a portion of the geometry passed in to the transformer. If no criteria are specified, the action will apply to the entire geometry at all levels.
Selection can be based on structural location, geometry name, type, appearance information, traits, trait storage types, or definition reference. The syntax used is a restricted set of XQuery, where the return clause is fixed.
The basic Geometry XQuery dialog allows you to construct simple selection queries by automatically writing the necessary query based on specified test clauses. Clicking the Switch to Advanced button opens the Advanced Editor, which allows you to type a query free-form, for more expressive queries.
Note: Once you switch to Advanced mode, you will have to clear all parameters before you can return to Basic mode.
A hierarchical geometry is represented as nodes of type geometry, with attributes containing information about traits, type, and name for each geometry.
Attribute/Trait Accumulation
If attributes/traits on the supplier and requestor feature share the same name, but are not geometry attributes that start with fme_, then they are deemed conflicted.
Merge Supplier: The requestor feature/geometry will retain all of its own un-conflicted attributes/traits, and will additionally acquire any un-conflicted attributes/traits that the supplier feature/geometry has. This mode will handle conflicted attributes/traits based on the Conflict Resolution parameter.
Only Use Supplier: The requestor feature/geometry will have all of its attributes/traits removed, except geometry attributes that start with fme_. Then, all of the attributes/traits from one (arbitrary) supplier feature/geometry will be placed onto the requestor.
Use Requestor: If a conflict occurs, the requestor values will be maintained.
Use Supplier: If a conflict occurs, the values of the supplier will be transferred onto the requestor.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Transformer Categories
FME Licensing Level
FME Professional edition and above
Search FME Community
Search for samples and information about this transformer on the FME Community.
Keywords: concatenated foreign key tag cross-reference "cross reference" TraitMerger