Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jss95/curvesimplify
Python package for polyline simplification
https://github.com/jss95/curvesimplify
Last synced: 2 months ago
JSON representation
Python package for polyline simplification
- Host: GitHub
- URL: https://github.com/jss95/curvesimplify
- Owner: JSS95
- License: bsd-3-clause
- Created: 2024-08-28T03:13:21.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-08-30T00:22:57.000Z (4 months ago)
- Last Synced: 2024-10-11T09:29:30.285Z (3 months ago)
- Language: Python
- Homepage: https://curvesimplify.readthedocs.io
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# CurveSimplify
[![License](https://img.shields.io/github/license/JSS95/curvesimplify)](https://github.com/JSS95/curvesimplify/blob/master/LICENSE)
[![CI](https://github.com/JSS95/curvesimplify/actions/workflows/ci.yml/badge.svg)](https://github.com/JSS95/curvesimplify/actions/workflows/ci.yml)
[![CD](https://github.com/JSS95/curvesimplify/actions/workflows/cd.yml/badge.svg)](https://github.com/JSS95/curvesimplify/actions/workflows/cd.yml)
[![Docs](https://readthedocs.org/projects/curvesimplify/badge/?version=latest)](https://curvesimplify.readthedocs.io/en/latest/?badge=latest)
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/curvesimplify.svg)](https://pypi.python.org/pypi/curvesimplify/)
[![PyPI Version](https://img.shields.io/pypi/v/curvesimplify.svg)](https://pypi.python.org/pypi/curvesimplify/)![title](https://curvesimplify.readthedocs.io/en/latest/_images/plot-header.png)
A Python package for polygonal curve simplification.
List of supported algorithms:
- Imai-Iri algorithm (`curvesimplify.imaiiri`)
- Agarwal's algorithm (`curvesimplify.agarwal`)## Usage
```python
>>> 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](https://pypi.org/project/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.