PolyShell
A high-performance coverage-preserving polygon reduction library for Python, written in Rust.
Time to reduce a 50,000 point polygon by 90%.
Highlights
- ✅ Guarantees encapsulation of the initial polygon.
- 🔥 Rust-powered performance.
- 🧩 A simple Python API to access all reduction methods and modes.
- 🌍 Seamlessly integration with NumPy and Shapely.
- 📏 Tunable accuracy and reduction rates.
- 🐍 Python and PyPy compatible.
PolyShell is supported by the ECMWF through the Code for Earth programme.
Installation
PolyShell is available on PyPI for easy installation:
pip install polyshellSuccessfully installed polyshell
PolyShell can also be built from source using maturin. See the guide here.
Example
All of PolyShell's reduction algorithms are accessible through reduce_polygon
.
For all the available options, see the full list of features.
Learn more
For more information see the guide