Skip to main content

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 = [(47.3769, 8.5417), (46.9480, 7.4474)]
results = engine.delineate_batch(outlets)

What it does

  • Resolves the outlet coordinate to a terminal HFX atom (via snap.parquet or point-in-polygon on catchments.parquet).
  • Walks the upstream graph in graph.arrow collecting all contributing atoms.
  • Optionally refines the terminal atom geometry using flow_dir.tif / flow_acc.tif rasters when present.
  • Returns a dissolved MultiPolygon + geodesic area in km².
  • Bundles GDAL / PROJ / GEOS / libtiff / SQLite — no system GDAL install needed.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyshed-0.1.1-cp39-abi3-macosx_11_0_arm64.whl (18.9 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file pyshed-0.1.1-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyshed-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a7de3abc3a7c9b6ff6da0f29760f2c94c4d58d75a48c2534e2089a3d97fa8dff
MD5 13059cb89e17d69e42add80aa1fa0613
BLAKE2b-256 035b60ebfa45a81ae9b0b05a157250423cddf25b505d552fefa3ba9e4978ea84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page