FME Feature Functions

One other item in the menu of both text and arithmetic editors is FME Feature Functions:


These are functions that reach into the very heart of FME's core functionality. They are the building blocks that transformers are built upon; basic functionality that can return values to the editor.

For example, the @Area() function returns the area of the current feature (assuming it is a polygon). @NumCoords() returns the number of vertices in the current feature.

Some functions return strings, and others return numeric values; therefore the available functions vary depending on whether the text or arithmetic editor is being used. In the screenshot above, the text editor functions are on the left and the arithmetic editor functions on the right.

FME Feature Functions are useful because they allow you to build processing directly into attribute creation, instead of using a separate transformer.


FME Lizard says…
You might also be wondering why there are math functions inside the text editor and how you can use them.

Well, sometimes you need to calculate a numeric value as part of a string. If so, you can use the FME function @Evaluate() inside a text editor to carry out a mathematical calculation. This function understands all numerical operations, which is why they are included in the text editor dialog.

Replacing Other Transformers

Integrated text and arithmetic editors provide the benefit of multiple attribute-creating functions inside a single transformer.

For example, the AttributeManager Text Editor can be used as a direct replacement for the StringConcatenator and ExpressionEvaluator transformers.

The AttributeManager could also replace the StringPadder and AttributeTrimmer transformers, albeit with a little less user-friendliness. If FME Feature Functions are used inside the editor, this transformer could also technically replace transformers such as the AreaCalculator, LengthCalculator, VertexCounter, DateTimeStamper, and many more.

Integrating peripheral operations into a single transformer makes a workspace more compact and well-defined. However, best practice is critical to this setup. If an AttributeManager (for example) is not annotated correctly, it is incredibly difficult to determine what actions it is carrying out from the canvas alone!


FME Lizard says…
Note that incorporating functions into a single transformer is not intended as a way to improve performance.

For example, replacing twenty (20) transformers with twenty functions inside one AttributeManager transformer - all carrying out the same task - is unlikely to make the workspace faster overall; plus the AttributeManager will naturally become slower with each new function that is added to it.

results matching ""

    No results matching ""