StringAttributeRounder

From Fmepedia


This page contains a Custom Transformer created by an fmepedia user.
  See the attached files list at the foot of this page for the zip file containing this custom transformer.  



Created by: Mark Ireland


The StringAttributeRounder (and alternative FME2007 version) is a form of AttributeRounder that can handle attributes containing text as well as numbers in a single string. The user can choose whether the text part of the string is at the start or end of the string.



The rounding direction is always equivalent to "nearest", though it wouldn't be hard to expose this parameter for run-time setting by the user.


Examples:

Start Attribute: m234.5555
Text Part At: Start
Decimal Places: 2
Result: m234.56
Start Attribute: 234.5555m
Text Part At: End
Decimal Places: 2
Result: 234.56m

The transformer also handles <space> characters, for example:

Start Attribute: x y234.5555
Text Part At: Start
Decimal Places: 2
Result: x y234.56


Attached Files
filesizedate
StringAttributeRounder.jpg7.2 kB06/09/08
StringAttributeRounder.zip77.6 kB06/09/08
StringAttributeRounder2.jpg78.3 kB06/09/08
StringAttributeRounder2007.fmx30.7 kB06/12/08
User Comments Add a new comment