FME Transformers: 2025.0
FME Transformers: 2025.0
SpikeRemover
Removes spikes from line, path, and area geometry.
Typical Uses
- Data QA and cleaning
- Generalization
How does it work?
The SpikeRemover receives features with line, path, or area geometry and removes vertices that create angles less than or equal to a specified maximum between zero (0) and 180 degrees.
Spikes can be removed either in a single pass through the feature or iteratively, where new spikes created by spike removal are also removed until none remain.
Polygons with spikes created by their first or last points will have those spikes removed. Closed lines, however, will not. Consecutive duplicate points are also removed, whether or not they occur in a spike.
Donut polygons and aggregate geometries are supported.
Altered and unaltered geometries are output, as well as any removed vertices as points. If Remove Spikes Iteratively is No, the Removed points will receive attributes with spike angle and length.
Z values are optionally supported.
A Maximum Spike Length may be specified, and the shorter of the two sides is considered to determine overall spike length. In most cases this parameter should remain blank.
Examples

In this example, we have a polygon and want to remove a spike from it. Note there are two candidates that could be spikes.
The feature is routed into a SpikeRemover. In the parameters dialog, Maximum Spike Angle is set to 10 degrees.
The smaller of the two spikes falls under the maximum, and so its central vertex is removed. The removed vertex is output via the Removed port and receives new attributes indicating angle and length.
Note a second vertex with an angle and length of zero (0). This was a consecutive duplicate vertex, which has also been removed but does not affect the shape of the output geometry.
Usage Notes
- The SpikeRemover is not effective when the geometry has many deviations other than spikes. Consider using a Generalizer with the Douglas-Peucker algorithm.
Configuration
Input Ports

Features with line, path, or area geometry.
Output Ports

Any features modified as specified in parameters, either from spikes or consecutive duplicate vertices.

Features without spikes or consecutive duplicate points, unmodified.

Removed vertices are output here.
When Remove Spikes Iteratively is No, these attributes are added:
- _spike_angle
- _spike_length1
- _spike_length2

Features with geometry other than valid line, path, or area geometry are output via this port, as are any features that receive non-numeric values for any numeric parameters.
Rejected features will have an fme_rejection_code attribute with one of the following values:
INVALID_GEOMETRY_TYPE
INVALID_PARAMETER_ANGLE
INVALID_PARAMETER_LENGTH
Rejected Feature Handling: can be set to either terminate the translation or continue running when it encounters a rejected feature. This setting is available both as a default FME option and as a workspace parameter.
Parameters

Maximum Spike Angle |
Specify the maximum angle in degrees between two line segments to be considered a spike. The value must be between 0 and 180 degrees. |
Maximum Spike Length |
Default: Blank. Optionally specify a maximum length in ground units. Spike length is determined by the shorter side. Spikes longer than this length will not be removed. |
Dimension |
Select which coordinates are to be used when determining spike angle and length:
|
Remove Spikes Iteratively |
Select a method of spike removal:
|
Editing Transformer Parameters
Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.

These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |

Table Tools
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
For more information, see Transformer Parameter Menu Options.
Reference
Processing Behavior |
|
Feature Holding |
No |
Dependencies | None |
Aliases | |
History |
FME Community
The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.
Search for all results about the SpikeRemover on the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.