Skip to content

JSS95/curvesimplify

Repository files navigation

CurveSimplify

License CI CD Docs Supported Python Versions PyPI Version

title

A Python package for polygonal curve simplification.

List of supported algorithms:

  • Imai-Iri algorithm (curvesimplify.imaiiri)
  • Agarwal's algorithm (curvesimplify.agarwal)

Usage

>>> 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
10

Installation

CurveSimplify can be installed using pip.

$ pip install curvesimplify

Documentation

CurveSimplify is documented with Sphinx. The manual can be found on Read the Docs:

https://curvesimplify.readthedocs.io/

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.

About

Python package for polyline simplification

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages