cartagen.schematization

Contents

cartagen.schematization#

schematization(line, sigma=30, sample=None)#

Remove bends from series of bends to simplify it.

This algorithm proposed by Lecordix et al. [1] is a caricature algorithm that removes one (or more) bend of a series while preserving the global shape of the bend series.

Bends in the series are identified using inflexion points, and when the middle bends are removed, the inflexion points are displaced along the axis of the series, the road is distorted to cushion the displacement of the inflexion points.

Parameters:
  • line (LineString) – The line to apply the accordion algorithm.

  • sigma (float, optional) – Gaussian smoothing strength.

  • sample (int, optional) – Gaussian smoothing sample size.

Returns:

LineString

See also

accordion

Stretch a series of bends to enlarge each bend.

smooth_gaussian

Smooth a line and attenuate its inflexion points.

inflexion_points

Extract inflexion points from a sinuous line.

References

(Source code)

../_images/schematization.png