Show/Hide Toolbars

The definition of an axis might consist of thousands of points especially when the axis is derived from some curved and inclined real world axis. In order to reduce the processing time for various calculations the Application Server can internally use a simplified version of the axis.

If simplification is applied and how much the axis is simplified can be defined by the user. Even if simplification is applied the Application Server still stores the original axis (as defined by the user) the simplified version is created only in memory. Therefore changing the simplification parameters after an axis was defined does not need a redefinition of the axis.

The simplification is done by applying the well known Douglas Peucker Algorithm. The purpose of the algorithm is, given a curve composed of line segments, to find a similar curve with fewer points. The algorithm defines 'dissimilar' based on the maximum distance between the original curve and the simplified curve. The simplified curve consists of a subset of the points that defined the original curve.

The starting axis is an ordered set of axis points and the simplification tolerance ε ≥ 0.

The algorithm recursively divides the axis. Initially it is given all the points between the first and last point. It automatically marks the first and last point to be kept. It then finds the point that is furthest from the line segment with the first and last points as end points (this point is obviously furthest on the curve from the approximating line segment between the end points). If the point is closer than ε to the line segment then any points not currently marked to keep can be discarded without the simplified curve being worse than ε.

If the point furthest from the line segment is greater than ε from the approximation then that point must be kept. The algorithm recursively calls itself with the first point and the worst point and then with the worst point and the last point (which includes marking the worst point being marked as kept).

When the recursion is completed a new output axis can be generated consisting of all (and only) those points that have been marked as kept.

The user can set the simplification tolerance for the algorithm for each axis. The tolerance is interpreted as length units in the underlying projected coordinate system. Setting the tolerance to a value < 0 will disable simplification. However even if simplification tolerance is < 0 the Application Server will still remove double points i.e. will take only the first point of a set of consecutive points with same coordinates.

Setting the tolerance level to zero will eliminate axis points that are linearly dependent. Setting the tolerance to a value greater than 0 will eliminate axis points according to the above described algorithm. Setting the tolerance level to a value lower than zero will disable simplification.

For details about the Douglas Peucker algorithm please consult appropriate literature.

Depending on the axis definition and the setting for the simplification tolerance the simplification can speed up calculations based on the axis geometry significantly especially your axis contains a great number of consecutive (nearly) linearly dependent axis points.

Figure 1: Example for simplification of a curve using the Douglas Peucker Algorithm (source: Wikipedia)

© 2021 AFRY Austria GmbH, www.redbex.com