Skip to main content

No project description provided

Project description

RDP Rust

Rust

Binary version of MIT licensed RDP implementation by fhirschmann.

Binary wheels are built for Python 3.6, 3.7, 3.8, and 3.9.

Benchmarks show approximately 60x speed increase.

Rust implementation of the Ramer-Douglas-Peucker algorithm (Ramer 1972; Douglas and Peucker 1973) for 2D data.

Installation

pip install rdp-rust

Usage

The inputs must all be floating points values.

>>> import numpy as np
>>> from rdp_rust import reduce_points

>>> arr = np.array([5.0, 0, 4, 0, 3, 0, 3, 1, 3, 2]).reshape(5, 2)
>>> reduce_points(small_arr, 0.2)
array([[5., 0.],
       [3., 0.],
       [3., 2.]])
>>> import numpy as np
>>> from rdp_rust import mask_points

>>> arr = np.array([5.0, 0, 4, 0, 3, 0, 3, 1, 3, 2]).reshape(5, 2)
>>> mask_points(small_arr, 0.2)
array([ True, False,  True, False,  True])

Example

Demo of RDP

Project details


Download files

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

Files for rdp-rust, version 0.5.2
Filename, size File type Python version Upload date Hashes
Filename, size rdp_rust-0.5.2-cp39-none-win_amd64.whl (138.6 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp39-cp39-manylinux_2_24_x86_64.whl (190.8 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp39-cp39-macosx_10_7_x86_64.whl (182.3 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp38-none-win_amd64.whl (138.6 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp38-cp38-manylinux_2_24_x86_64.whl (190.9 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp38-cp38-macosx_10_7_x86_64.whl (182.3 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp37-none-win_amd64.whl (138.6 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp37-cp37m-manylinux_2_24_x86_64.whl (191.1 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp37-cp37m-macosx_10_7_x86_64.whl (182.5 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp36-none-win_amd64.whl (138.8 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp36-cp36m-manylinux_2_24_x86_64.whl (191.1 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size rdp_rust-0.5.2-cp36-cp36m-macosx_10_7_x86_64.whl (182.6 kB) File type Wheel Python version cp36 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page