curvereduce-1.0.0


توضیحات

Curve simplification per Ramer-Douglas-Peucker.
ویژگی مقدار
سیستم عامل OS Independent
نام فایل curvereduce-1.0.0
نام curvereduce
نسخه کتابخانه 1.0.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده Ian Cooper <icooper@noreply.github.com>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/curvereduce/
مجوز MIT License Copyright (c) 2022 Ian Cooper Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# curvereduce This is an implementation of the [Ramer-Douglas-Peucker curve simplification algorithm](https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm) in Python. [![codecov](https://codecov.io/gh/icooper/curvereduce-py/branch/main/graph/badge.svg?token=YA7H1I6Z4E)](https://codecov.io/gh/icooper/curvereduce-py) ## Usage Install from the PyPi package repository using `pip install curvereduce`. ```python 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](LICENSE). ## Credits This RDP algorithm implementation is heavily influenced by [Marius Karthaus's JavaScript implementation](https://karthaus.nl/rdp/).


زبان مورد نیاز

مقدار نام
>=3.7 Python


نحوه نصب


نصب پکیج whl curvereduce-1.0.0:

    pip install curvereduce-1.0.0.whl


نصب پکیج tar.gz curvereduce-1.0.0:

    pip install curvereduce-1.0.0.tar.gz