Curve simplification per Ramer-Douglas-Peucker.
Project description
curvereduce
This is an implementation of the Ramer-Douglas-Peucker curve simplification algorithm in Python.
Usage
Install from the PyPi package repository using pip install curvereduce.
from curvereduce import simplify_curve, simplify_curve_to
points = [
(1.20401E-09, -0.00120428 ),
(0.018, 0.241799 ),
(0.1044, 1.34392 ),
...
]
# use an explicit epsilon value
simplified_1 = simplify_curve(points, 0.1075)
# or specify a number of points you want to end up with
simplified_2 = simplify_curve_to(points, 20)
License
This work is licensed under the MIT License.
Credits
This RDP algorithm implementation is heavily influenced by Marius Karthaus's JavaScript implementation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file curvereduce-1.0.0.tar.gz.
File metadata
- Download URL: curvereduce-1.0.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60ba8706d0dc94721435031e9dfd7cd4f3797f00c4d857534ce69966a641525c
|
|
| MD5 |
a8b537301d72977db972bf66e0300ce6
|
|
| BLAKE2b-256 |
de9c7c73eb32e32b321bf14a42dd5d8e99b7739cccd6111d8ec3b99fe8ec02f2
|
File details
Details for the file curvereduce-1.0.0-py3-none-any.whl.
File metadata
- Download URL: curvereduce-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bcc3ad11fe717ba01b456f3a1258aa7accd6e3dabb9355f9d085567559cee58
|
|
| MD5 |
c4a0986e5a4957b94bca1c897162d2b4
|
|
| BLAKE2b-256 |
a4bc75c4d22ac91cde7bb87d15cc72d2aa5127038abbc2efd76cf3ee31de880d
|