Description

SherbendGeneralizer is an FME 2011 transformer for 'smarter' generalization, which preserves original topology of the features.

The goal of the Sherbend algorithm is to reduce unnecessary details on a line based on the analysis of the line’s bends. Sherbend is a constraint based algorithm that preserves topology of the lines and points in the input dataset. The Sherbend algorithm iteratively generalizes bends in a line by using the diameter parameter to select bends for generalization. The generalization process may eliminate, reduce, or combine bends, while resolving conflicts.

The strategy for generalizing bends in a line looks as follows:

   * The parameter "diameter" is used to calculate the area of a reference circle.
   * For each line, determine the locations of the bends.
   * For each bend, calculate its actual area.
   * For each bend, calculate its circumference. Next, construct a circle with the same circumference. Finally, the adjusted area of the bend is taken to be 75% of the area of that circle.
   * For each bend, generalize the bend if its adjusted area is below the area of the reference circle and furthermore topological constraints are met.
   * Repeat the above steps until there are no more bends to generalize.

Examples

Example 1: Topological Checking

by Dmitri Bagh


Often it is better to see a simple demo, than to read a long detailed explanation. This is why I took a small dataset and passed it many times through SherbendGeneralizer until I understood exactly how it works.


Existing generalization algorithms in FME consider neither mutual locations of the features nor possible dangerous changes to each indvidual feature.


Below: Screenshots of the contours and elevation points before and after 'old style' generalization

Old Style
Before Generalization    
User-added image
After generalization with the Generalizer transformer:
    
User-added image

We can observe at least three kinds of problems introduced by the generalization algorithm:
  1. One of the contours is now self-intersecting;
  2. Contours intersect each other;
  3. The new position of the contour with elevation 440 (shown with orange color) goes around the elevation point of 437 from the other side than it did before, which makes the relationship between contours and elevation points invalid:
User-added image

SherbendGeneralizer is able to deal with all three problems.

User-added image

It can control:

1) Self-intersections;

2) Intersections of lines;

3) Sideness, that is, it checks that lines do not change their relative position to points:


Sherbend Style

User-added image

The transformer helps to see where there would be conflicts if the generalization changes were applied. Along with the output port for the lines, it also has CONFLICT port, that outputs bends that would violate one or more constraints if generalized.


Workspace Template
  • Workspace Template 1. Topological checkings (See attachment: SherbendGeneralizerExample1.fmwt)

Example 2: Preserve Endpoints

by Dmitri Bagh

If "Preserve endpoints in closed lines" is set to "no" (default), the algorithm tries to find an optimal location for the beginning and the end of the closed lines. The optimization improves accuracy and may even give a better look to the generalized feature.


In some cases, this behavior can be undesirable. For example, if hydrography features are properly noded (there is a node at the river mouth flowing into a lake), the location of the first (and the last) vertex of the closed line representing the lake, should stay unchanged:


Endpoint Location Preserved   

User-added image

Endpoint Location Optimized
   
User-added image

Workspace Template
  • Workspace Template 2. Preserving endpoints (See attachment: SherbendGeneralizerExample2.fmwt)