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.
Metadata
Release files for curvereduce 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| curvereduce-1.0.0.tar.gz | 16.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| curvereduce-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / curvereduce-1.0.0.tar.gz
| Download URL | curvereduce-1.0.0.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60ba8706d0dc94721435031e9dfd7cd4f3797f00c4d857534ce69966a641525c
|
|
BLAKE2b-256 checksum How to use checksums |
de9c7c73eb32e32b321bf14a42dd5d8e99b7739cccd6111d8ec3b99fe8ec02f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / curvereduce-1.0.0-py3-none-any.whl
| Download URL | curvereduce-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0bcc3ad11fe717ba01b456f3a1258aa7accd6e3dabb9355f9d085567559cee58
|
|
BLAKE2b-256 checksum How to use checksums |
a4bc75c4d22ac91cde7bb87d15cc72d2aa5127038abbc2efd76cf3ee31de880d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|