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