Skip to main content

Simplify 2D and 3D Lines

PyPI Run Tests Docs License

A high performance 2D and 3D line simplification algorithm. Uses Ramer-Douglas-Peucker Line Simplification.

Key Features

  • Simplify 2D and 3D lines
  • Written in C++ with python bindings. Can be used standalone in a C++ project with CMake as well.
  • Based on high-performance Simplify.js

Install with Python and Use

The python library can be installed as so:

  1. pip install simplifyline

Example Use:

from simplifyline import simplify_line_2d, MatrixDouble 
mat2D = MatrixDouble([[0.0, 0.0], [1.0, 1.0], [2.0, 2.0], [3.0, 3.0]])
results_mat2D = simplify_line_2d(mat2D, max_distance=0.1, high_quality=True)
results = np.array(results_mat2D)
np.testing.assert_array_equal(results, np.array([[0.0, 0.0], [3.0, 3.0]]))

See documentation for more details.

Build Project Manually

You can build the project manually in two ways: using python setup.py, or in pure CMake

Build Manually with Python

The root directory setup.py file has been modified to build with CMake. This is meant for python users that need to build manually (for some reason) but are not actively developing or changing the code.

  1. Install conda or create a python virtual environment (Why?). I recommend conda for Windows users.
  2. pip install . - Call from root directory

Build Manually With CMake

Building happens entirely with CMake. This is meant really only for the library developers who are working on C++ and Python in an edit-compile cycle.

C++ Library

  1. mkdir cmake-build && cd cmake-build
  2. cmake .. - Note - For windows also add -DCMAKE_GENERATOR_PLATFORM=x64
  3. cmake --build . -j$(nproc) --config Release

Build options:

SPL_BUILD_BENCHMARKS:BOOL=ON // SPL - Build Benchmarks
SPL_BUILD_EXAMPLES:BOOL=ON // SPL - Build Examples
SPL_BUILD_PYMODULE:BOOL=ON // SPL -Build Python Module
SPL_BUILD_TESTS:BOOL=ON // SPL - Build Tests
SPL_BUILD_WERROR:BOOL=OFF // SPL - Add Werror flag to build (turns warnings into errors)
SPL_WITH_OPENMP:BOOL=ON // SPL - Build with OpenMP Support

Python Extension

This is meant for advanced python users who are actively developing the extension.

  1. Install conda or create a python virtual environment (Why?). I recommend conda for Windows users.
  2. Perform CMake build as described above
  3. cd cmake-build && cmake --build . --target python-package --config Release
  4. cd lib/python_package && pip install -e . . This installs the library in develop/edit mode. To update the python extension in your python virtual environment all you need to do is run step 3 again.

Metadata

Release files for simplifyline 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplifyline 0.0.7
File Size Uploaded Provenance Actions
simplifyline-0.0.7.tar.gz 28.8 kB Without provenance Details for simplifyline-0.0.7.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for simplifyline 0.0.7
File Actions
simplifyline-0.0.7-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for simplifyline-0.0.7-cp39-cp39-win_amd64.whl
simplifyline-0.0.7-cp39-cp39-manylinux2010_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.12+ x86-64 Details for simplifyline-0.0.7-cp39-cp39-manylinux2010_x86_64.whl
simplifyline-0.0.7-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for simplifyline-0.0.7-cp38-cp38-win_amd64.whl
simplifyline-0.0.7-cp38-cp38-manylinux2010_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.12+ x86-64 Details for simplifyline-0.0.7-cp38-cp38-manylinux2010_x86_64.whl
simplifyline-0.0.7-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for simplifyline-0.0.7-cp37-cp37m-win_amd64.whl
simplifyline-0.0.7-cp37-cp37m-manylinux2010_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 Details for simplifyline-0.0.7-cp37-cp37m-manylinux2010_x86_64.whl
simplifyline-0.0.7-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details for simplifyline-0.0.7-cp36-cp36m-win_amd64.whl
simplifyline-0.0.7-cp36-cp36m-manylinux2010_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 Details for simplifyline-0.0.7-cp36-cp36m-manylinux2010_x86_64.whl

Total release size: 1.6 MB

Release files / simplifyline-0.0.7.tar.gz

Download URL simplifyline-0.0.7.tar.gz
Size 28.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bb56f5781cb8aec414e617e83c4e341be344df905a75cfb4ccf4119af87bde17
BLAKE2b-256 checksum
How to use checksums
fd3848aa69ebcefd87453c24ee21f4a6a907d034cc239369651de91b9fbae119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / simplifyline-0.0.7-cp39-cp39-win_amd64.whl

Download URL simplifyline-0.0.7-cp39-cp39-win_amd64.whl
Size 151.7 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
ee8ab3bb0b633fd684fc4c9a930c30a25fb13d45ff4c80ca3ce7ce1146e3a302
BLAKE2b-256 checksum
How to use checksums
862bf24d548fc8870272ac45575db06070b360edb840d2ef9514e82c27ee0401
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / simplifyline-0.0.7-cp39-cp39-manylinux2010_x86_64.whl

Download URL simplifyline-0.0.7-cp39-cp39-manylinux2010_x86_64.whl
Size 243.9 kB
Tags CPython 3.9 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
34b9648db0838b9dd326de69760410303589daceae28e02961d4cba9106a624b
BLAKE2b-256 checksum
How to use checksums
7034ac9101d9ce50dbe79e61f2afe7062c18464dcfdb0c50afb4e874b5f71291
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / simplifyline-0.0.7-cp38-cp38-win_amd64.whl

Download URL simplifyline-0.0.7-cp38-cp38-win_amd64.whl
Size 151.5 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
c78626db0e74ed257b8e6e8af06921574cf8095857c4d966057777694ab4384b
BLAKE2b-256 checksum
How to use checksums
ca34708db46ab0453323e2f2c221dace2439d69c74fc190c44b68f381b958bf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / simplifyline-0.0.7-cp38-cp38-manylinux2010_x86_64.whl

Download URL simplifyline-0.0.7-cp38-cp38-manylinux2010_x86_64.whl
Size 243.8 kB
Tags CPython 3.8 Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
6fc78c87b147073b9aa9d0ed2635afaa1a9cb50af1039abdce04efdab68646c9
BLAKE2b-256 checksum
How to use checksums
31f177376708a9e322d3abc5119165d13233aef81304d14280b1ffb7320a55a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / simplifyline-0.0.7-cp37-cp37m-win_amd64.whl

Download URL simplifyline-0.0.7-cp37-cp37m-win_amd64.whl
Size 152.1 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
6558657b9ffad101e47363a91d1a20693af4dee7b410c645e6b3b2b343c590bf
BLAKE2b-256 checksum
How to use checksums
bc7a149b2fbd21cf849f7c3a0914bfb945347b01ef0ae77951ed333cccf14854
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / simplifyline-0.0.7-cp37-cp37m-manylinux2010_x86_64.whl

Download URL simplifyline-0.0.7-cp37-cp37m-manylinux2010_x86_64.whl
Size 243.8 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
ba9b9b25c12edd20706a1ca683d63fe9e6fcd468516066bae0172e0e333c000b
BLAKE2b-256 checksum
How to use checksums
3c8e2790d3b3560604100d23f031883f5eeed49637847435a7b4977a5f194f80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / simplifyline-0.0.7-cp36-cp36m-win_amd64.whl

Download URL simplifyline-0.0.7-cp36-cp36m-win_amd64.whl
Size 151.7 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
38cb8b4abcda99f6d8fa201d5c544678c4f717b25f9918ecb87c5edc006d347d
BLAKE2b-256 checksum
How to use checksums
d7d77a0711f1e5ebd1d38923f0e2686b66b8e97474da83270342d15164ce50ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / simplifyline-0.0.7-cp36-cp36m-manylinux2010_x86_64.whl

Download URL simplifyline-0.0.7-cp36-cp36m-manylinux2010_x86_64.whl
Size 243.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64
SHA-256 checksum
How to use checksums
2aa4cc1c53f313a01170e591a8c88e04b432b34f41a005ca8e96c924200fd9c5
BLAKE2b-256 checksum
How to use checksums
30bb23e094d6c197fab74a2df38e5435888488b0cc9d2dd97c3e675fc0431395
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Security for simplifyline 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page