Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

No project description provided

Project description

RDP Rust

Build Status

Binary version of MIT licensed RDP implementation by fhirschmann.

Wheels are built for Linux Python 3.5, 3.6, and 3.7. OS X wheels are built for 3.6 and 3.7.

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.0
Filename, size File type Python version Upload date Hashes
Filename, size rdp_rust-0.5.0-cp35-cp35m-manylinux1_x86_64.whl (694.9 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size rdp_rust-0.5.0-cp36-cp36m-macosx_10_7_x86_64.whl (154.9 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size rdp_rust-0.5.0-cp36-cp36m-manylinux1_x86_64.whl (694.9 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size rdp_rust-0.5.0-cp37-cp37m-macosx_10_7_x86_64.whl (154.7 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size rdp_rust-0.5.0-cp37-cp37m-manylinux1_x86_64.whl (694.6 kB) File type Wheel Python version cp37 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page