Measurement Unit Converters

From fmepedia


FME 2008 introduced the concept of standalone published parameters and these enable us to build dropdown choice lists for use within custom transformers. On this page you will find links to three custom transformers that perform measurement unit conversions by taking advantage of this new functionality:


Contents of the Unit Converter Transformers

All three of the custom transformers contain the same transformers in the same workflow. The only differences are the values of the standalone parameters that contain the list of unit names and the contents of the ValueMapper transformers that convert unit names to conversion ratios.

The units and conversion ratios were adapted from the Wikipedia Conversion of Units (http://en.wikipedia.org/wiki/Conversion_of_units) page.


Above: contents of the unit converter transformers.


Above: the standalone published parameter containing unit names is attached to a AttributeSetter transformer in the unit converter transformers.


Above: the ValueMapper transformers convert unit names to conversion ratios in the unit converter transformers.


Using the Unit Converter Transformers

To use one of these transformers, all you have to do is select the input unit name, output unit name and the attribute containing the values to convert.

Above: configuring one of the unit converter transformers in a workspace.

User Comments Add a new comment