Python bindings for the shed watershed delineation engine
Project description
pyshed
Python bindings for the shed watershed delineation engine. pyshed loads
HFX-format datasets and returns
watershed polygons from a (lat, lon) outlet. The full native stack (GDAL,
PROJ, GEOS, libtiff, SQLite, and more) is bundled inside the wheel — no system
install required.
Install
pip install pyshed
Platform support (v0.1): Apple Silicon macOS only (macosx_11_0_arm64).
Linux, Intel macOS, and Windows wheels are not yet built — see
CONTRIBUTING.md
if you want to help port the build.
Quickstart
import pyshed
engine = pyshed.Engine("/path/to/hfx/dataset")
result = engine.delineate(lat=47.3769, lon=8.5417)
print(result.area_km2)
For batch delineation:
outlets = [
{"lat": 47.3769, "lon": 8.5417},
{"lat": 46.9480, "lon": 7.4474},
]
results = engine.delineate_batch(outlets)
API Reference
For the full developer-oriented API surface, including argument types, return types, and the exception hierarchy, see API.md.
What it does
- Resolves the outlet coordinate to a terminal HFX atom (via
snap.parquetor point-in-polygon oncatchments.parquet). - Walks the upstream graph in
graph.arrowcollecting all contributing atoms. - Optionally refines the terminal atom geometry using
flow_dir.tif/flow_acc.tifrasters when present. - Returns a dissolved
MultiPolygon+ geodesic area in km². - Bundles GDAL / PROJ / GEOS / libtiff / SQLite — no system GDAL install needed.
Links
- Source & issues: https://github.com/CooperBigFoot/shed
- HFX dataset spec: https://github.com/CooperBigFoot/hfx
- License: MIT for
pyshed; bundled native libraries retain their own licenses — seeLICENSES/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyshed-0.1.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyshed-0.1.2-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 18.9 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ffaf13653e8e71f16e0a15a0f678726527dfd86400ca7f01de351b9648f6148
|
|
| MD5 |
8b5a2dae947df1095cf3796cc439641b
|
|
| BLAKE2b-256 |
ddfe3c2aef54b4973031bb2460e7e581f1a429afd6da945ee8e6d7bb232f3b87
|