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).
Output Ports
The generalized features are output to this port. They will have all attributes of the original features.
Parameters
Each numeric parameter may be entered as a number or taken from the value of a feature attribute by selecting the attribute name from the pull-down list.
Algorithm
The algorithm that you choose determines which transformer parameters are enabled in the transformer dialog.
Douglas
The Douglas-Peucker 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.
Corresponding parameters:
- Generalization Tolerance
- Preserve Shared Boundaries
- Shared Boundaries Tolerance
- Preserve Path Segments
Thin
The 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:
- Generalization Tolerance
Thin No Point
The 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:
- Generalization Tolerance
- Preserve Shared Boundaries
- Shared Boundaries Tolerance
- Preserve Path Segments
Deveau
The 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:
- Generalization Tolerance
- Preserve Shared Boundaries
- Shared Boundaries Tolerance
- Preserve Path Segments
- Smoothness Factor
- Sharpness Angle
Wang
The 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:
- Generalization Tolerance
- Preserve Shared Boundaries
- Shared Boundaries Tolerance
- Preserve Path Segments
McMaster
The 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:
- Preserve Shared Boundaries
- Shared Boundaries Tolerance
- Preserve Path Segments
- Number of Neighbors
- Displacement Percentage
McMaster Weighted Distance
The 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 wrap-around 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 wrap-around will be used for adjacent polygons.
Corresponding parameters:
- Preserve Shared Boundaries
- Shared Boundaries Tolerance
- Preserve Path Segments
- Number of Neighbors
- Displacement Percentage
- Weighting Power
NURBfit
The NURBfit algorithm will fit lines using B-Spline 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:
- Preserve Shared Boundaries
- Shared Boundaries Tolerance
- Preserve Path Segments
- Degree of Basis Polynomial
- Segment Length
Inflection Points
The 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:
- Number of Neighbors
Orthogonal Distance Regression
This 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:
- None
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.
Parameters
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.
The minimum distance between boundaries in 2D before they are considered shared, in ground units. If the tolerance is None, the geometries must be exactly identical to be considered shared. If the tolerance is Automatic, a tolerance will be automatically computed based on the location of the input geometries. Additionally, a custom tolerance may be used.
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
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.
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
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 non-negative integer. A value of 0 means no filtering.
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.
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
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.
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.
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.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Transformer Categories
FME Licensing Level
FME Professional edition and above
Transformer History
This transformer replaces the AreaGeneralizer, AreaSmoother, LineGeneralizer and LineSmoother.
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.
Tags Keywords: abstraction "line thinning" "line thin"simplification simplify spike weeding NURBfit Wang Measure fit regression LineGeneralizer AreaGeneralizer AreaSmoother LineSmoother