A Python package for polygonal curve simplification.
List of supported algorithms:
- Imai-Iri algorithm (
curvesimplify.imaiiri) - Agarwal's algorithm (
curvesimplify.agarwal)
>>> import numpy as np
>>> from curvesimplify.agarwal import min_err
>>> x = np.linspace(0, 5, 50)
>>> f = np.exp(-x) * np.cos(2 * np.pi * x)
>>> curve = np.column_stack([x, f])
>>> simp, err = min_err(curve, 10)
>>> len(simp) # at most 10
10CurveSimplify can be installed using pip.
$ pip install curvesimplify
CurveSimplify is documented with Sphinx. The manual can be found on Read the Docs:
If you want to build the document yourself, get the source code and install with [doc] dependency.
Then, go to doc directory and build the document:
$ pip install .[doc]
$ cd doc
$ make html
Document will be generated in build/html directory. Open index.html to see the central page.
