Skip to main content

Curve simplification per Ramer-Douglas-Peucker.

Project description

curvereduce

This is an implementation of the Ramer-Douglas-Peucker curve simplification algorithm in Python.

codecov

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

curvereduce-1.0.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

curvereduce-1.0.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

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

Hashes for curvereduce-1.0.0.tar.gz
Algorithm Hash digest
SHA256 60ba8706d0dc94721435031e9dfd7cd4f3797f00c4d857534ce69966a641525c
MD5 a8b537301d72977db972bf66e0300ce6
BLAKE2b-256 de9c7c73eb32e32b321bf14a42dd5d8e99b7739cccd6111d8ec3b99fe8ec02f2

See more details on using hashes here.

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

Hashes for curvereduce-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0bcc3ad11fe717ba01b456f3a1258aa7accd6e3dabb9355f9d085567559cee58
MD5 c4a0986e5a4957b94bca1c897162d2b4
BLAKE2b-256 a4bc75c4d22ac91cde7bb87d15cc72d2aa5127038abbc2efd76cf3ee31de880d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page