cartagen.simplify_whirlpool

cartagen.simplify_whirlpool#

simplify_whirlpool(geometry, threshold)#

Simplify a line or polygon using an epsilon-circle based selection.

This algorithm proposed by Dougenik and Chrisman [1] performs a line simplification that removes spiky vertices while preserving the overall shape of the line. It works by iterating through the vertices of the line and removing those that are within a specified distance (epsilon) from the last kept vertex.

This method is particularly effective at simplifying lines with many small, sharp angles, such as rivers or coastlines, while maintaining the general form of the line.

Parameters:
Returns:

LineString, MultiLineString, Polygon, MultiPolygon, LinearRing

See also

simplify_angular

Simplify a line or polygon by removing vertexes with small angles.

simplify_douglas_peucker

Simplify a line or polygon using a distance-based selection.

simplify_lang

Simplify a line or polygon using a look-ahead distance-based selection.

simplify_li_openshaw

Simplify a line or a polygon using a regular grid.

simplify_raposo

Simplify a line or a polygon using an hexagonal tessellation.

simplify_reumann_witkam

Simplify a line or polygon using a directional distance-based selection.

simplify_visvalingam_whyatt

Simplify a line or polygon using an area-based selection.

simplify_wang_muller

Simplify a line or polygon using a bend-reduction method.

References

Examples

>>> line = LineString([(0, 0), (1, 1), (2, 0), (5, 3)])
>>> simplify_whirlpool(line, threshold=2.0)
<LINESTRING (0 0, 5 3)>

(Source code)

../_images/simplify_whirlpool.png