cartagen.simplify_li_openshaw

cartagen.simplify_li_openshaw#

simplify_li_openshaw(geometry, cell_size, preserve_extremities=True)#

Simplify a line or a polygon using a regular grid.

This algorithm proposed by Li & Openshaw [1] simplifies lines based on a regular square grid. It first divide the line vertexes into groups partionned by a regular grid, then each group of vertexes is replaced by their centroid.

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_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.

simplify_whirlpool

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

References

Examples

>>> line = LineString([(0, 0), (1, 1), (2, 0), (5, 3)])
>>> c4.simplify_li_openshaw(line, 1)
<LINESTRING (0 0, 0.5 0.5, 2 0, 5 3)>

(Source code)

../_images/simplify_li_openshaw.png