coarsen
Fast, multithreaded polygon coverage simplification. A pure Rust port of GEOS 3.13.1's CoverageSimplifier, exposed through a thin Shapely wrapper. The Rust core links neither GEOS nor PROJ and performs no dynamic library loading.
pip install coarsen
import coarsen
import shapely
polygons = [shapely.box(0, 0, 10, 10), shapely.box(10, 0, 20, 10)]
result = coarsen.coverage_simplify(polygons, 5.0, threads=8)
coverage_simplify(geometries, tolerance, *, simplify_boundary=True, threads=None)
returns a NumPy object array with the input shape; scalar geometry input returns
a scalar geometry, matching Shapely. simplify_boundary=False implements GEOS
simplifyInner. threads=None uses Rayon's default pool; a positive integer
creates a pool for that call. Rust parses, simplifies, and writes WKB without the GIL.
Tolerance uses input coordinate units; project longitude/latitude data before
using a tolerance in metres. Requires Python ≥3.10, NumPy, and Shapely ≥2.1.
The parity target is GEOS 3.13.1, bundled in Shapely 2.1.2's reference wheels. Tests compare WKB bytes without normalization at one and eight threads, including both boundary modes, the original 174 fixtures, real UTM parcels, Voronoi cells, grids, holes, MultiPolygons, empty input, zero tolerance, and Z/M coordinates. Z/M rebuilding follows GEOS's quirks. Other GEOS versions can produce different results. Parity is verified on these cases, not a proof for every floating-point input. Nonfinite XY coordinates are rejected. Invalid coverages are not repaired. The Rust library retains coverage validation; no Python invalid-edges helper is exposed because the port computes an invalid-polygon mask rather than edge geometry.
| Tile | Polygons | Shapely (s) | coarsen 1 thread (s) | coarsen 8 threads (s) | Speedup (8) |
|---|---|---|---|---|---|
| 34UEU_0_0 | 42,858 | 92.03 | 22.74 | 9.65 | 9.5× |
| 22JBM_0_0 | 33,919 | 94.71 | 21.94 | 8.24 | 11.5× |
| 48RWV_0_0 | 183,423 | 92.90 | 17.80 | 6.42 | 14.5× |
Measured timings cover the complete public API, including WKB conversion, at 5 m in each tile's UTM CRS. See benchmark details.
LGPL-2.1-or-later. Derived from GEOS work by Martin Davis, Paul Ramsey, and other contributors; see NOTICE and LICENSE. Build, test, and release instructions are in CONTRIBUTING.md.
Metadata
Release files for coarsen 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| coarsen-0.1.0.tar.gz | 178.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| coarsen-0.1.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| coarsen-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ x86-64 | Details |
| coarsen-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| coarsen-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| coarsen-0.1.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| coarsen-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 2.9 MB
Release files / coarsen-0.1.0.tar.gz
| Download URL | coarsen-0.1.0.tar.gz |
|---|---|
| Size | 178.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c34935ed0af8a059c7d0cc3695a11768f5b5703b14bd7485b63610b78adf60ca
|
|
BLAKE2b-256 checksum How to use checksums |
21e86ca5511f4a3b3f77e7ff7191cd8cd7bdc1a67bebb58dba8ab6af22ed25d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / coarsen-0.1.0-cp310-abi3-win_amd64.whl
| Download URL | coarsen-0.1.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 279.9 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6eddb92de9bd8892a770b22d22f34f842cbc41df8af72923e9c8dcf27b6d32f1
|
|
BLAKE2b-256 checksum How to use checksums |
d88da76ea2dab2e67cb5c0c246a296926fbbdcb6ee9c3f04d895f8bd8f93850d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / coarsen-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | coarsen-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 667.9 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
880658e72bf7e3aef503f94424adf2cd9401e01df737303060c3304823050cff
|
|
BLAKE2b-256 checksum How to use checksums |
31292972cccaa20ca2fd291eb87b8e42112388a8bb6b9ac1240c7f88823aab82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / coarsen-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | coarsen-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 463.4 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
401a04195bdbc78a6c42f028be618ca633bf796aeaff31b9675833157f865a63
|
|
BLAKE2b-256 checksum How to use checksums |
2c3f809e0d903754404b5415b96fbc3870b344d8d87a7ef5fb49fa86d2614e05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / coarsen-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | coarsen-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 451.4 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
d226186b175812962eb71b8dbda3833db91694a690999bfa2d339abeb832d1a4
|
|
BLAKE2b-256 checksum How to use checksums |
dd366cd7e0c5d19f189b91e209c73e6e9124aa8f2c4a5abffa0ba9a0993f6d37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / coarsen-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | coarsen-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 402.8 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
56a52d99a45b345ef66fc4bd553f3f049089e21758c0c8c24900614d9a9dfd52
|
|
BLAKE2b-256 checksum How to use checksums |
af198656f8d0b0ad826630a375540ff3408ef175199bf512ebd4f03a0c64ce7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / coarsen-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | coarsen-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 410.5 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
763ad2d06f0f5a4b2fb1002860cc9ea136c8da570204f1770b6d02d76ac7dc40
|
|
BLAKE2b-256 checksum How to use checksums |
a52304fd3cd78700138939b43ceeb27cc2d16336b89c2d7a1d7452b78127fff0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency log