Fast linestring simplification using RDP or Visvalingam-Whyatt and a Rust binary
Project description
Simplify a LineString using the Ramer–Douglas–Peucker or Visvalingam–Whyatt algorithms
Installation
pip install simplification
Please use a recent (>= 8.1.2) version of pip
Supported Python Versions
Python 2.7
Python 3.4
Python 3.5
Python 3.6
Supported Platforms
Linux (manylinux1-compatible)
OS X
Windows 32-bit / 64-bit
Usage
import numpy as np
from simplification.cutil import simplify_coords, simplify_coordsvw
coords = [
[0.0, 0.0],
[5.0, 4.0],
[11.0, 5.5],
[17.3, 3.2],
[27.8, 0.1]
]
# For RDP, Try an epsilon of 1.0 to start with. Other sensible values include 0.01, 0.001
simplified = simplify_coords(coords, 1.0)
# simplified is [[0.0, 0.0], [5.0, 4.0], [11.0, 5.5], [27.8, 0.1]]
# Using Visvalingam-Whyatt
# we can also pass numpy arrays, in which case numpy arrays are returned
coords_vw = np.array([
[5.0, 2.0],
[3.0, 8.0],
[6.0, 20.0],
[7.0, 25.0],
[10.0, 10.0]
])
simplified_vw = simplify_coords_vw(coords, 30.0)
# simplified_vw is [[5.0, 2.0], [7.0, 25.0], [10.0, 10.0]]
How it Works
FFI and a Rust binary
Is It Fast
I should think so.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for simplification-0.3.8-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d39bf70c386e5e7e6e07b817c7d71e9b6add3d090b996519ff2b12c21754263c |
|
MD5 | 805ea002cae1bf20edd009aa74e6f3f2 |
|
BLAKE2b-256 | e337f53dc2a3e44d9038566f53716af5effedec3573569d3e58b0199c77096b1 |
Close
Hashes for simplification-0.3.8-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f756748af075fd8f445d64e981af365881dd9f42ea4f1a3c7c9b9ac46b28ab97 |
|
MD5 | 11b5ceebae7bb5d9f109c7e39722ba06 |
|
BLAKE2b-256 | b534da34f98babadb2e81c5599809a702c0efe53b8c20f0aa84793cf99406d09 |
Close
Hashes for simplification-0.3.8-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65d716e79cf549f0c718201c2b299ab0164edce1e20053ab828cd2feb43ea15f |
|
MD5 | fc754c2bb5c4f383164fd1cb2573fd7f |
|
BLAKE2b-256 | af372d1b3b9bcc7df9068fbe60e738a74f6ccaa9740182a9764b767163e51e83 |
Close
Hashes for simplification-0.3.8-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.macosx_10_11_intel.macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4f5d5ff740394b3c652d95c989b53070a29625843e63551e59f6b257ad237cd |
|
MD5 | a02f68d6794c3fdb18178ee8cd543a97 |
|
BLAKE2b-256 | 60e5bfc104f7c1665f53914459548ce0fd2d819ebc17328b27646cc8a3bbae21 |
Close
Hashes for simplification-0.3.8-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9202172b69406f17be5c9d05bde278fb2f6c3a55dd39c5e6b12c0bd9cfe422d9 |
|
MD5 | 40963cf3c31e2720a3f75e62600d70c7 |
|
BLAKE2b-256 | 7524f03b47ed29470f1f21918b9ea4b82b727a5fd1363768e6b245a200366aa7 |
Close
Hashes for simplification-0.3.8-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bda9acaf344f7d70815a594e45055ac605d469bed25790013afab187a8387bc3 |
|
MD5 | 4ae8945f51f0e367fe23f6f11ab48be2 |
|
BLAKE2b-256 | beb4c8c85519446eae54ff8517024de19ee9152c75efd23f3065d3055a498615 |
Close
Hashes for simplification-0.3.8-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5668301f362cfeaabb378ba5dbc592c2556905fe9453fd07483cb4ed5abe47de |
|
MD5 | 358d6451e3561b897ce072cd0adbee0a |
|
BLAKE2b-256 | eeaa76d492630dea70c5442209843d689e56881a8bd77331f32454356c1ceae8 |
Close
Hashes for simplification-0.3.8-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.macosx_10_11_intel.macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0a13df542a129561185ad4d1b544934663d0cc8a6eb6501c73a4ba782b66433 |
|
MD5 | ed488cea00ccdc25031dd4549e95c1ae |
|
BLAKE2b-256 | 9c1c8286b3ee2f645cf04a4369a9c1f9c3b9b3b64fcbf46167a55ca3006c42e0 |
Close
Hashes for simplification-0.3.8-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfd7a77bbb1c350962194060d1bdef4ea8efa9228eb5abde80a63939b3854722 |
|
MD5 | 1e43f6460fbe2053c98601e2d98aec78 |
|
BLAKE2b-256 | 2dc0f252d8a932f33785cd7b8ba32360df5dfd1922312fdb085433f9fd9edbb5 |
Close
Hashes for simplification-0.3.8-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c7dc6f89211ca2b7919724d1eff43ebccd0a9b1e5c711c7760f9ffd06453a43 |
|
MD5 | c5f08bc3a551cb7284eef92bcaed81d1 |
|
BLAKE2b-256 | fe51765d3c9ca5c0704926b14d1aa32a3b77fc7bc1af40027e607ec9b10e910e |
Close
Hashes for simplification-0.3.8-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83e55a19149fda41811be32115162a8b7053add71c91b90edfe4a8791bc4cf97 |
|
MD5 | 8c728d2ce5eb5b510960875fce028b88 |
|
BLAKE2b-256 | 8eec2274408cabe5703efe16d6d3dff019dcc2d4d62eeeea2c892ea38d81e8bf |
Close
Hashes for simplification-0.3.8-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.macosx_10_11_intel.macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e98cd130bee1d620ee88ca4bd254ba53face9be43c166e7affa12ed16cdd5555 |
|
MD5 | 138890703df68f3f4c8c95a85002f062 |
|
BLAKE2b-256 | 5686fc5005fb8eb126baa42390928c0f1372be4d3d598b60dce4ef07357b8347 |
Close
Hashes for simplification-0.3.8-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94e996213816e233f6a40ec429ac9fa990d8f13a4bed7db252123cf73970b15a |
|
MD5 | 16e2f3bbab3c785e234477b637c49c5e |
|
BLAKE2b-256 | 9a0ca636a3e615ab41b307dcaf57814df4613f98e3d4c6b19fbff829e051f03a |
Close
Hashes for simplification-0.3.8-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42ce23173639c28206decb87f378e76bf715be4fe85882a64c2fe3a530669cf0 |
|
MD5 | 46e3be51d6171ca896fc728f7f6f9336 |
|
BLAKE2b-256 | 4d39a3bb525bdf40f4f7969554c7cc5275d9e411662d7f19a490fefbfc4a2c0d |
Close
Hashes for simplification-0.3.8-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfb44545ad4aadebd42ed4a9f99dcf0429cec2ab6955312e877c91d9326df1f3 |
|
MD5 | 17a02f9cd1409af602e2e3eeba87358f |
|
BLAKE2b-256 | 74e05a5b1e9208af688830d596dd67f1010698043f41e38c6b669085a4663570 |
Close
Hashes for simplification-0.3.8-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.macosx_10_11_intel.macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3da16dd052edd73959eae6b9ef1404467948ec20914283cc90dc577b14b54ff4 |
|
MD5 | f0be93243649f6dd038f0c4de5383487 |
|
BLAKE2b-256 | 5c8fd358ebb1c4ae9637cdd9d1b6645ab753baa96f867fa29dfd21d59f70555c |