LineGeneralizer

From fmepedia

LineGeneralizer is a Workbench Transformer.

  Image:caution2-or-sq.jpg Deprecated Function (http://en.wikipedia.org/wiki/Deprecated)

   This feature or function is one which is considered obsolete in the latest FME, and whose use is discouraged.   

   Such functions are usually still included in FME for the sake of backwards compatability, and are documented here for similar reasons.   


This transformer has been replaced by the Generalizer

Generalizes linear features. This removes detail from their geometry and reduces the number of vertices.

The following generalization algorithms are supported:

  • Douglas removes vertices which cause a deviation of less than the tolerance the surrounding line segment, but the location of the remaining vertices is not altered.
  • Thin removes vertices that are less than the tolerance distance away from an adjacent vertex within a feature. 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.
  • ThinNoPoint is similar to Thin, but short lines are reduced to a line from the start to the endpoint, rather than a single point.
  • Deveau 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. Therefore the output features will always be 2D. It requires two additional parameters to be specified (either as constants or taken from attributes):
    • The Number of Wedges 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 and the smoother the resulting line.
    • The Sharpness Angle 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.

This transformer processes features one by one. Areas are therefore processed without knowledge of their neighbours. It's possible that this causes slivers or gaps between generalised features. It is strongly recommended to process areas using the AreaGeneralizer.

Alternatively, the LineSmoother transformer can be used to smooth line features by modifying each vertex’s location.


Gotchas

A tolerance of 0 (zero) in the Douglas(-Poiker) algorithm ought to remove all points unnecessary for the geometry - eg a mid-point on a straight line. However, due to various coordinate precision issues (not an FME fault - just a limitation of computing) this doesn't always remove all the points you might expect. Using a a very low level precision, eg 0.000001, would resolve these with the minimum of impact on geometry shape. Alternatively, you can use the new DuplicateCoordinateRemover transformer to remove duplicate coordinates.

User Comments Add a new comment