FME Transformers: 2024.2
FME Transformers: 2024.2
Generalizer
Transforms or measures geometry features based on a specified algorithm.
There are four types of algorithms:

Generalizing algorithms: Reduce the density of coordinates by removing vertices.

Smoothing algorithms: Determine a new location for each vertex.

Measuring algorithms: Calculate the location of points, and return a list of these points (for example, to measure the sinuosity of a feature).

Fitting algorithms: Replace the original geometry completely, with a new feature fitted to a specified line (for example, to minimize the orthogonal distance to the original).
Usage Notes

Null geometries that are input will be output unchanged.

To maintain topologies that involve other features while generalizing, consider using the SherbendGeneralizer transformer.
Configuration
Output Ports
Output
The generalized features are output to this port. They will have all attributes of the original features.
<Rejected>
All geometries that contain only nongeneralizable geometries (for example, solids, surfaces, or degenerate geometries) are output through this port. They will have all attributes of the original features, and an extra fme_rejection_code attribute.
Parameters
Group Processing
Group By 
The default behavior is to use the entire set of input features as the group. This option allows you to select attributes that define which groups to form. Each set of features which have the same value for all of these attributes will be processed as an independent group. 

Complete Groups

Select the point in processing at which groups are processed:
Considerations for Using Group By
There are two typical reasons for using When Group Changes (Advanced) . The first is incoming data that is intended to be processed in groups (and is already so ordered). In this case, the structure dictates Group By usage  not performance considerations. The second possible reason is potential performance gains. Performance gains are most likely when the data is already sorted (or read using a SQL ORDER BY statement) since less work is required of FME. If the data needs ordering, it can be sorted in the workspace (though the added processing overhead may negate any gains). Sorting becomes more difficult according to the number of data streams. Multiple streams of data could be almost impossible to sort into the correct order, since all features matching a Group By value need to arrive before any features (of any feature type or dataset) belonging to the next group. In this case, using Group By with When All Features Received may be the equivalent and simpler approach. Note Multiple feature types and features from multiple datasets will not generally naturally occur in the correct order.
As with many scenarios, testing different approaches in your workspace with your data is the only definitive way to identify performance gains. 
Algorithm
Algorithm 
The algorithm that you choose determines which transformer parameters are enabled in the transformer dialog. Generalizing Algorithms
DouglasThe DouglasPeucker algorithm will remove vertices which cause a deviation of less than the Generalization Tolerance, but the location of remaining vertices are not altered. Thus, this algorithm is good at reducing the number of points in a line, it is not very good at preserving the shape or the spatial relationship of the line relative to other entities. When used on polygons, the start point is never removed. Corresponding parameters:
Douglas With Arc FittingThe Douglas With Arc Fitting algorithm performs the same operations as the Douglas algorithm, but it will also attempt to fit circular arcs to the data, often resulting in fewer vertices. Any arcs added will be within the Generalization Tolerance of the original input. This algorithm will always remove a number of points that is more than or equal to the number that would be removed by Douglas, however, the result may be an IFMEPath instead of an IFMELine. Corresponding parameters:
ThinThe Thin algorithm will remove vertices that are less than the Generalization Tolerance distance away from an adjacent vertex. The begin and end points are never moved, unless the entire length of the feature being thinned is less than the tolerance, in which case the feature is replaced by a point feature holding the final coordinate. Corresponding parameters:
Thin No PointThe Thin No Point algorithm will remove vertices that are less than the Generalization Tolerance distance away from an adjacent vertex. The begin and end points are never moved, even when the entire length of the feature being thinned is less than the tolerance, in which case the feature is replaced by a linear feature connecting the first point to the last point. Corresponding parameters:
DeveauThe Deveau algorithm removes vertices which contribute less to the overall shape of the feature, and may introduce new vertices at positions not originally in the feature as it works. The inherent behavior of the algorithm is such that it invalidates the z coordinate of the vertices, and any measures. Therefore the output features will always be 2D, and have no measures on them. It requires the Smoothness Factor parameter and the Sharpness Angle parameter to be specified. Corresponding parameters:
WangThe Wang algorithm will iteratively combine, eliminate and exaggerate bends until the input line feature has no bend that is smaller than the given tolerance value. Corresponding parameters:
Smoothing Algorithms
McMasterThe McMaster algorithm calculates a new location for each point by first taking the average value of the x and y coordinates of the point and a number of neighboring points. It then slides the averaged point towards the original point according to a specified displacement value. The overall effect is that each point will be pulled towards its neighboring points. Corresponding parameters:
McMaster Weighted DistanceThe McMaster Weighted Distance algorithm performs the same operations as the McMaster algorithm only it uses inverse distance weighting to take into account the distance from each neighbor to the point being moved. The overall effect is that points further away will have less "pull" than points close by. The Weighting Power parameter is used by the McMaster Weighted Distance algorithm only. It is used to determine the weight of each neighboring point. Note For lines, the McMaster algorithms do not change the first and last N points (where N is the number of neighbors), because they don't have enough neighbors for the averaging calculations to work with. For polygons, a wraparound is used so each point in a polygon will be changed. In the case of adjacent polygons and the Preserve Shared Boundaries option, collinear portions of their boundaries will be smoothed together. The remaining parts of their boundaries will be smoothed as lines. This means that no wraparound will be used for adjacent polygons.
Corresponding parameters:
NURBfitThe NURBfit algorithm will fit lines using BSpline curves of given polynomial degree. The resulting lines will follow these curves with given segment length. The higher the degree, the smoother the line. An example of usage is smoothing contour lines to remove spikes and simulate the work of a cartographic craftsman. Corresponding parameters:
FilletThe Fillet algorithm will replace linear corners in a line with arc corners with the given fillet radius. If an arc with the specified fillet radius would not fit on a corner, that corner will be skipped. Measuring Algorithms
Inflection PointsThe Inflection algorithm will calculate the location of the inflection points along a line and return the list of these points. Inflection points are measures of the sinuosity of a line. Corresponding parameters:
Fitting Algorithms
Orthogonal Distance RegressionThis algorithm replaces the feature's geometry with a line that minimizes the orthogonal distance between it and the original geometry's points. Orthogonal distance means the shortest (perpendicular) distance between a point and a line. Corresponding parameters:

Generalization Tolerance 
This parameter is used by all four generalizing algorithms. It is measured in ground units (units of measure of the feature coordinates). The value may not be negative. Note Note that this value is driven by the coordinate system of the features passing through the transformer.

General
Preserve Shared Boundaries 
No: Each feature will be treated and generalized individually without regard to its neighboring features. If the area features originally formed a coverage, there will be gaps and overlaps in the coverage. If you want the coverage to be maintained while doing area boundary generalization, choose Yes. Yes: Coverage topology will be maintained while doing area boundary generalization. The entire coverage of area features must not overlap. If the area features overlap, then you should choose No, or use the AreaOnAreaOverlayer first to create a coverage. In some situations, you can also use the Snapper in VERTEX mode either before, after, or instead of this transformer. This transformer computes topology for the coverage, generalizes the individual arcs, and then recreates the area features. This option will take longer for areas because it computes the arc/node topology, generalizes the individual arcs, and then recreates the areas. 
Shared Boundaries Tolerance 
The minimum distance between boundaries in 2D before they are considered shared, in ground units. If the tolerance is Automatic, a tolerance will be automatically computed based on the location of the input geometries. 
Preserve Path Segments 
No: Path segments may be joined to form a new line. Yes: Path segments will not be joined to form a new line. 
Deveau Parameters
Smoothness Factor 
This parameter controls the number of simultaneous wedges considered when floating bands around the points in the set. The larger this value is, the more aggressive the generalization. The value must be an integer from 1 to 30. 
Sharpness Angle 
This parameter sets the tolerance for spikes that will be blunted. Vertex points at angles less than the value given from the previous two points are not moved. The angle is measured in degrees, and must be between 0.0 and 180.0. 
McMaster\Inflection Point Parameters
Number of Neighbors 
This parameter specifies the number of neighbors to consider for each point. For example, a value of 2 specifies that the 2 points to the left of each point, the point itself, and the 2 points to the right will be considered. For the Inflection Points algorithm, this parameter specifies the number of neighboring points on either side that will affect the inflection calculation. A higher number has the effect of smoothing the line and may result in fewer inflection points. The value must be a nonnegative integer. A value of 0 means no filtering. 
Displacement Percentage 
This parameter specifies the location between the original and average points to move the point. For example, a value of 50 will place the point at the halfway point between the averaged point and the point's original location. The value must be between 0.0 and 100.0. 
Weighting Power 
This parameter is used by the McMaster Weighted Distance algorithm only. It is used to determine the weight of each neighboring point. The value may not be negative. 
NURBfit Parameters
Degree of Basis Polynomial 
This parameter specifies the degree of the polynomial used to approximate the curve. The higher the degree, the smoother the line. The value must be an integer with value at least 2. 
Segment Length 
This parameter specifies the length of the output segments. If this is set to 0, then the output curve will have 10x the number of points in the input. The value may not be negative. 
Fillet Parameters
Fillet Radius 
This parameter specifies the radius of the arc to use when generating filleted corners. The value must be a finite number greater than zero. 
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.
How to Set Parameter Values
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.
Content Types
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 featurespecific values.  
FME and workspacespecific parameters may be used.  
Creating and Modifying User Parameters  Create your own editable parameters. 
Dialog Options  Tables
Table Tools
Transformers with tablestyle 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.
Transformer History
This transformer replaces the AreaGeneralizer, AreaSmoother, LineGeneralizer and LineSmoother.
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 Generalizer on the FME Community.
Keywords: abstraction "line thinning" "line thin"simplification simplify spike weeding NURBfit Wang Measure fit regression LineGeneralizer AreaGeneralizer AreaSmoother LineSmoother