Sample and Demos

Custom Transformer that Exposes all Vertices

Article Number: 000001808 - Last Modified: Mar 14, 2012

Example custom transformer that strips a feature down to its individual vertices. Each vertex is output as either a 2D or 3D point feature.

If the source feature is a donut polygon or an aggregate, then this transformer will decompose the feature into its components before breaking them up.

Each resulting point inherits all attributes from its source feature.

Additionally all point features receive the attributes _feature_number and  _vertex_number which, in combination, are unique for every source feature and, respectively, its parts.

The _part_number indicates whether the resulting point was derived from a donut polygon or an aggregate. If a donut or an aggregate was the origin, the _part_number is 0 for the first part and 1 or greater for all other parts. The _part_number is 0 in case of simple features.

Note: If you don't need to know the part numbers, you can also use the Chopper transformer which comes with FME. Setting Maximum Vertices to 1 in the Chopper exposes feature vertices. 

Suggested Similar Articles

"What's Great" is a summary list of all the new and updated functionality in a particular version of FME. This is the list for FME Desktop 2012.

A look at some of the transformers which are designed specifically for working with lists.

This article speaks about parallel processing in FME and explores several ways of using it for such operations as buffering and clipping as well as surface modelling and point cloud manipulations

It can be difficult to publish an attribute selection from within a custom transformer. In a Tester transformer if <attribute> = -999, when you publish this the user parameter becomes TEST @Value(<AttributeName>) = -999. How can you publish just the attribute choice without the full expression?

The proper way to use your attributes within a custom transformer is to publish them so a user can set them outside of the custom transformer.