cartagen.accordion

Contents

cartagen.accordion#

accordion(line, width, exaggeration=1.0, sigma=15.0, sample=None)#

Stretch a series of bends to enlarge each bend.

This algorithm was proposed by Plazanet. [1] It is dedicated to the caricature of sinuous bend series. Like the musical instrument, the Accordion algorithm stretches the road to enlarge each bend of the series.

The algorithm is part of the toolbox to generalise mountain roads that contain sinuous bend series and is rather used when there is room to enlarge the bend series. When the diffusion of the enlargement to the connected roads causes more legibility problems than the ones solved by accordion, schematization should be preferred.

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

  • width (float) – The width in meters of the casing of the symbol.

  • exaggeration (float, optional) – A multiplicator for the width parameter.

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

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

Returns:

LineString

See also

schematization

Remove bends from series of bends to simplify it.

smooth_gaussian

Smooth a line and attenuate its inflexion points.

References

(Source code)

../_images/accordion.png