Skip to main content

Curved

Curved is a Python module written in Rust that performs curve simplification. It has been heavily optimised, and currently performs better than the simplification algorithm in Shapely. At the moment, only the Ramer-Douglas-Peucker algorithm has been implemented.

The simplification is not limited to 2D shapes, unlike traditional implementations. It is possible to simplify the points of an N dimensional shape.

Installation

Source, and limited binary packages are provided on PyPI. These can be installed via a simple pip install curved. Note, if installing from a source package, make sure you have a suitable Rust build environment available.

Usage

import numpy as np
import curved

# Let's simplify a 1000 point circle down to just 33 points
t = np.linspace(0, 2 * np.pi, 1000)
points = np.vstack((np.cos(t), np.sin(t))).T
mask = curved.rdp(points, 0.01)
simplified = points[mask]

Contributions

Contributions are welcome. Please feel free to create issues for bugs or feature requests. If you have code to contribute, feel free to open a pull request.

Release files for curved 0.1.2

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

Source distribution (sdist)

Source distribution for curved 0.1.2
File Size Uploaded
curved-0.1.2.tar.gz 117.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for curved 0.1.2
File
curved-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
curved-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
curved-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
curved-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
curved-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details
curved-0.1.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 Details

Total release size: 6.2 MB

Release files / curved-0.1.2.tar.gz

Download URL curved-0.1.2.tar.gz
Size 117.1 kB
Tags Source
SHA-256 checksum
How to use checksums
89146956664aec987670cb44b87292b7ccd83c0e2c2cdd47c50bb8800bbf82b1
BLAKE2b-256 checksum
How to use checksums
19e45aa492ef2fc89bbc5597402d64c0f9481a69d7532bae00b4b62cf8886675
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / curved-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL curved-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f506393ea6919a4906adb921a822095ef2744cb08f4bb3a9276446a0194a3cda
BLAKE2b-256 checksum
How to use checksums
0f33266328b259827f60913b6c3ba3a363bec6c53a068528e467b25aa266f0b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / curved-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL curved-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bb59904a46b4ce7206b8cbcb8510e9dd514005bc00b0ee7104a80dccf274f687
BLAKE2b-256 checksum
How to use checksums
062abecc99c0aed7b5f4f05d8e850023ac8ed4ae7befa00ca2e934ac70b314e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / curved-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL curved-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9eda162a083d9425231e5c5a778f96de8aa3460fd36a9befa280b1d54f2dcc05
BLAKE2b-256 checksum
How to use checksums
b1c01a21906ef27bf3195824fb4bbcf5ed7e3634c3e803d25d76f0fbee584eff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / curved-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL curved-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8d5756712caf748595fa66f1de9ef5a2c5f88d94263f7416b49cf4d19f15f350
BLAKE2b-256 checksum
How to use checksums
39c29013b5538564d2fc5848f3c2c61fbb16ab90abc9934d746d900e76b16848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / curved-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL curved-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3fb66404675432e666dbea5db309af54f2d7f07a4c261ed01b86f3fb30d86fd7
BLAKE2b-256 checksum
How to use checksums
c64dd571b499e559ecd1d6f412d02526b05ee9e92e2654c981827085ae4851e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / curved-0.1.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL curved-0.1.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.0 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ed69fb2d15f3e95ebde0424ad84e9b8954618931a502c6b97281d1616d601eae
BLAKE2b-256 checksum
How to use checksums
a836949b4a949d9521bbf906da2c2b5c10d273369b1d1d67a44003dbc21f9cf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.1.2 This release

7 release files

0.1.1

5 release files

0.1.0

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