Metadata-Version: 2.1
Name: pyrdp
Version: 0.1.6
Summary: Simple Rammer-Douglas-Peuker algorithm implementation.
Author-Email: Florian Stasse <f.stasse@skipperndt.com>
License: MIT
Project-URL: Repository, https://github.com/FlorianStasse/rdp-algo/
Requires-Python: >=3.8
Requires-Dist: numpy>=1.23.4
Description-Content-Type: text/markdown

# Ramer-Douglas-Peucker

Ramer-Douglas-Peucker python implementation.

## Installation

```commandline
pip install pyrdp
```

## Usage

The rdp function supports both lists and numpy arrays of arbitrary dimensions.

```python
>>> from pyrdp import rdp
>>> rdp([[0,0],[1,1],[2,0]], epsilon=1)
[[0,0],[2,0]]
```

```python
>>> import numpy as np
>>> from pyrdp import rdp
>>> rdp(np.array([[0,0],[1,1],[2,0]]), epsilon=1)
array([[0,0],[2,0]])
```

If you specify `return_mask=True` the function will return a mask of the points
that were kept.

```python
>>> import numpy as np
>>> from pyrdp import rdp
>>> rdp(np.array([[0,0],[1,1],[2,0]]), epsilon=1)
array([True, False, True])
```
