Ramer-Douglas-Peucker Algorithm
-------------------------------
.. image:: https://travis-ci.org/fhirschmann/rdp.png?branch=master
:target: https://travis-ci.org/fhirschmann/rdp
.. image:: https://badge.fury.io/py/rdp.png
:target: http://badge.fury.io/py/rdp
.. image:: https://readthedocs.org/projects/rdp/badge/?version=latest
:target: http://rdp.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Python/NumPy implementation of the Ramer-Douglas-Peucker algorithm
(Ramer 1972; Douglas and Peucker 1973) for 2D and 3D data.
The Ramer-Douglas-Peucker algorithm is an algorithm for reducing the number
of points in a curve that is approximated by a series of points.
Installation
````````````
.. code:: bash
pip install rdp
Usage
`````
Simple pythonic interface:
.. code:: python
from rdp import rdp
rdp([[1, 1], [2, 2], [3, 3], [4, 4]])
.. code:: python
[[1, 1], [4, 4]]
With epsilon=0.5:
.. code:: python
rdp([[1, 1], [1, 1.1], [2, 2]], epsilon=0.5)
.. code:: python
[[1.0, 1.0], [2.0, 2.0]]
Numpy interface:
.. code:: python
import numpy as np
from rdp import rdp
rdp(np.array([1, 1, 2, 2, 3, 3, 4, 4]).reshape(4, 2))
.. code:: python
array([[1, 1],
[4, 4]])
Links
`````
* `Documentation <http://rdp.readthedocs.io/en/latest/>`_
* `GitHub Page <http://github.com/fhirschmann/rdp>`_
* `PyPI <http://pypi.python.org/pypi/rdp>`_
References
``````````
Douglas, David H, and Thomas K Peucker. 1973. “Algorithms for the Reduction of the Number of Points Required to Represent a Digitized Line or Its Caricature.” Cartographica: The International Journal for Geographic Information and Geovisualization 10 (2): 112–122.
Ramer, Urs. 1972. “An Iterative Procedure for the Polygonal Approximation of Plane Curves.” Computer Graphics and Image Processing 1 (3): 244–256.
Raw data
{
"_id": null,
"home_page": "http://github.com/fhirschmann/rdp",
"name": "rdp",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "rdp ramer douglas peucker line simplification numpy",
"author": "Fabian Hirschmann",
"author_email": "fabian@hirschmann.email",
"download_url": "https://files.pythonhosted.org/packages/67/42/80a54cc4387256335c32b48bd42db80967ab5f40d6ffcd8167b3dd988c11/rdp-0.8.tar.gz",
"platform": "any",
"description": "Ramer-Douglas-Peucker Algorithm\n-------------------------------\n\n.. image:: https://travis-ci.org/fhirschmann/rdp.png?branch=master\n :target: https://travis-ci.org/fhirschmann/rdp\n\n.. image:: https://badge.fury.io/py/rdp.png\n :target: http://badge.fury.io/py/rdp\n\n.. image:: https://readthedocs.org/projects/rdp/badge/?version=latest\n :target: http://rdp.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\nPython/NumPy implementation of the Ramer-Douglas-Peucker algorithm\n(Ramer 1972; Douglas and Peucker 1973) for 2D and 3D data.\n\nThe Ramer-Douglas-Peucker algorithm is an algorithm for reducing the number\nof points in a curve that is approximated by a series of points.\n\nInstallation\n````````````\n\n.. code:: bash\n\n pip install rdp\n\nUsage\n`````\n\nSimple pythonic interface:\n\n.. code:: python\n\n from rdp import rdp\n\n rdp([[1, 1], [2, 2], [3, 3], [4, 4]])\n\n.. code:: python\n\n [[1, 1], [4, 4]]\n\nWith epsilon=0.5:\n\n.. code:: python\n\n rdp([[1, 1], [1, 1.1], [2, 2]], epsilon=0.5)\n\n.. code:: python\n\n [[1.0, 1.0], [2.0, 2.0]]\n\nNumpy interface:\n\n.. code:: python\n\n import numpy as np\n from rdp import rdp\n\n rdp(np.array([1, 1, 2, 2, 3, 3, 4, 4]).reshape(4, 2))\n\n.. code:: python\n\n array([[1, 1],\n [4, 4]])\n\nLinks\n`````\n\n* `Documentation <http://rdp.readthedocs.io/en/latest/>`_\n* `GitHub Page <http://github.com/fhirschmann/rdp>`_\n* `PyPI <http://pypi.python.org/pypi/rdp>`_\n\nReferences\n``````````\n\nDouglas, David H, and Thomas K Peucker. 1973. \u201cAlgorithms for the Reduction of the Number of Points Required to Represent a Digitized Line or Its Caricature.\u201d Cartographica: The International Journal for Geographic Information and Geovisualization 10 (2): 112\u2013122.\n\nRamer, Urs. 1972. \u201cAn Iterative Procedure for the Polygonal Approximation of Plane Curves.\u201d Computer Graphics and Image Processing 1 (3): 244\u2013256.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Pure Python implementation of the Ramer-Douglas-Peucker algorithm",
"version": "0.8",
"project_urls": {
"Homepage": "http://github.com/fhirschmann/rdp"
},
"split_keywords": [
"rdp",
"ramer",
"douglas",
"peucker",
"line",
"simplification",
"numpy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "674280a54cc4387256335c32b48bd42db80967ab5f40d6ffcd8167b3dd988c11",
"md5": "4b4aa96aab74067f05a4314a49a67c08",
"sha256": "19ec92f0803587891a00b439441e5e23fc9410500983f02941e4cf9ac3113e4b"
},
"downloads": -1,
"filename": "rdp-0.8.tar.gz",
"has_sig": false,
"md5_digest": "4b4aa96aab74067f05a4314a49a67c08",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4382,
"upload_time": "2016-12-19T01:34:07",
"upload_time_iso_8601": "2016-12-19T01:34:07.454686Z",
"url": "https://files.pythonhosted.org/packages/67/42/80a54cc4387256335c32b48bd42db80967ab5f40d6ffcd8167b3dd988c11/rdp-0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2016-12-19 01:34:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fhirschmann",
"github_project": "rdp",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "rdp"
}