{"repo":"pranav-walimbe/PyCanopy","free":true,"listed":false,"github":"https://github.com/pranav-walimbe/PyCanopy","clone":"git clone https://github.com/pranav-walimbe/PyCanopy.git","description":"A high-performance spatial query layer for Polars","language":"Python","stars":29,"topics":["geospatial","geospatial-analysis","query-optimization","query-planning","spatial-index","spatial-query","geopandas","polars","arrow","data-engineering"],"license":"MIT","category":"data-pipelines","readme_excerpt":"A spatial query layer for Polars. Rust core, Python API. --- [!NOTE] Highly competitive on Apache SpatialBench (single-node spatial query benchmark): fastest on 11/24 testcases, within 5% of the fastest time on 14/24 testcases Apache SpatialBench SF1 · lower is better · bars past the cap truncated with their value · TIMEOUT / ERROR annotated --- Installation Pre-built wheels for Linux, macOS, and Windows. No Rust toolchain required. --- Why PyCanopy The driving motivator behind creating this library was to provide the optimizations of relational DBs (query planning, indexing, etc) in a fast, Polars-like interface meant for in-memory spatial work. Capability PyCanopy GeoPandas DuckDB SedonaDB Spatial Polars :-- :--: :--: :--: :--: :--: Uses Polars DataFrames directly ✓ ✗ ✗ ✗ ✓ Spatial-aware query planning ✓ ✗ ✓ ✓ ✗ Automatically accelerates spatial joins with an index ✓ ✓ ✓ ✓ ✗ Explicit cost-based choice between scanning and building an index ✓ ✗ ✗ ✗ ✗ Selects among multiple spatial index types by workload ✓ ✗ ✗ ✗ ✗ --- Example Operations Optimized range query The optimizer runs the scalar filter first. On the EXPR path, the surviving original row indices are passed to Rust, which returns a spatial Boolean mask over those candidates. kNN join For each row in query df , returns the 3 nearest rows in the SpatialFrame . Large probes are streamed in morsels automatically. Point-in-polygon join with aggregation Each query-side batch is joined and aggregated before the next begins, ","default_branch":null,"files":null,"tree":[],"storefront":"/r/pranav-walimbe","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pranav-walimbe/PyCanopy/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}