Skip to main content

Python bindings for the pourpoint watershed delineation engine

Project description

pourpoint

pourpoint is the Python package for the pourpoint watershed delineation engine. Give it a point on a river and it returns the whole upstream watershed as a polygon. It reads HFX datasets, which are folders of pre-built river-network files. Only HFX v0.3.0 datasets load; older versions report a clear unsupported format error.

The wheel bundles the full native stack, including GDAL, PROJ, GEOS, libtiff, SQLite, and more, so no system GDAL install is needed.

Install

uv add pourpoint

(or pip install pourpoint)

Platform support: Apple Silicon macOS only (macosx_11_0_arm64). Linux, Intel macOS, and Windows wheels are not yet built. Community contributions are welcome; see CONTRIBUTING.md if you want to help port the build.

Zero-download quickstart

Use the hosted public GRIT (Global River Topology) dataset without downloading it first:

import pourpoint

# No local dataset: this reads the hosted GRIT dataset over the network.
engine = pourpoint.Engine("https://basin-delineations-public.upstream.tech/grit/hfx-v0.3.0/")
result = engine.delineate(lat=47.3769, lon=8.5417)
print(result.area_km2)

The engine fetches only the pieces of the dataset it needs, so the full dataset never lands on your machine. The one public dataset hosted today is GRIT 2.0.0 (the source river network), compiled to HFX v0.3.0 (the format version). To use a different HFX dataset, change the URL and nothing else in your code changes.

Local quickstart

import pourpoint

engine = pourpoint.Engine("/path/to/hfx/dataset")
result = engine.delineate(lat=47.3769, lon=8.5417)
print(result.area_km2)

Engine accepts local paths and remote dataset URLs such as s3:// and https://. For constructor options such as snap search radius and geometry repair, see the Tuning Knobs section of API.md.

Reuse the Engine

The first open fetches dataset metadata over the network and is slower, so keep the engine around and reuse it. Repeated delineations in the same session reuse data already fetched, so overlapping watersheds are faster.

Going further

Logging and verbose output, batch delineation with a progress callback, the staged step-by-step API, and GeoParquet export are documented in API.md and on the docs site at https://cooperbigfoot.github.io/pourpoint/.

What it does

  • Finds the catchment your point sits in.
  • Gathers every catchment upstream.
  • Merges them into one watershed polygon.
  • Returns the geometry plus geodesic area in km².

API Reference

For the full developer-oriented API surface, including argument types, return types, and the exception hierarchy, see API.md.

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 Distribution

pourpoint-0.1.0.tar.gz (633.1 kB view details)

Uploaded Source

Built Distributions

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

pourpoint-0.1.0-cp39-abi3-win_amd64.whl (48.8 MB view details)

Uploaded CPython 3.9+Windows x86-64

pourpoint-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl (23.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ x86-64

pourpoint-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl (22.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

pourpoint-0.1.0-cp39-abi3-macosx_11_0_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.9+macOS 11.0+ x86-64

pourpoint-0.1.0-cp39-abi3-macosx_11_0_arm64.whl (22.6 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file pourpoint-0.1.0.tar.gz.

File metadata

  • Download URL: pourpoint-0.1.0.tar.gz
  • Upload date:
  • Size: 633.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pourpoint-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9c05c78da875e0e56d30d897ff8e6efeebe4749a2a594d9a04a91a326e91641a
MD5 4b10d0c39d9c5fed792a2055d34745bd
BLAKE2b-256 76e7292b63aaa1c7a92a55d88fe79879c1fb36593e025dbb878f594ace598a58

See more details on using hashes here.

Provenance

The following attestation bundles were made for pourpoint-0.1.0.tar.gz:

Publisher: build-wheels.yaml on CooperBigFoot/pourpoint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pourpoint-0.1.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: pourpoint-0.1.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 48.8 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pourpoint-0.1.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6a0963cfaf152fbb5aa0122fc0a247721d0bce4d2b389a6727acef3a1d2e6902
MD5 337c57fac7d98298a2681533fed2aa5d
BLAKE2b-256 56e143e06bab3e97e48915af3a6ee111506b47540a021c4d615e65679c8b955e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pourpoint-0.1.0-cp39-abi3-win_amd64.whl:

Publisher: build-wheels.yaml on CooperBigFoot/pourpoint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pourpoint-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pourpoint-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 04ab90039304779a79edc9b806de03f3265272fd715765f880498dedc7e0259b
MD5 472930390969fb4e99d934a7f3e1ee22
BLAKE2b-256 245f00b50989493facf41d707da2eaddcdd1f4821c7651d2c14a924c04974a37

See more details on using hashes here.

Provenance

The following attestation bundles were made for pourpoint-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yaml on CooperBigFoot/pourpoint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pourpoint-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pourpoint-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 eff64506a43578ba69c6e0cd117a6d64b4837242af5c30942d85081d4a3b8bdd
MD5 f14f0311834b7e3103a6208c93fd75f9
BLAKE2b-256 1bef61f1bbb413671aefa48011e4bbf91a94d9c4d8ae5c9be80e1021672a5b62

See more details on using hashes here.

Provenance

The following attestation bundles were made for pourpoint-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl:

Publisher: build-wheels.yaml on CooperBigFoot/pourpoint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pourpoint-0.1.0-cp39-abi3-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pourpoint-0.1.0-cp39-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 78c193f42b6f12b0d2f01b594f7af19eac1c580a2510d3d46cfc6c3d7f1a7ad8
MD5 afdafc8bc83dc7cd288442f25e5af60d
BLAKE2b-256 9bb9e1dfee3e1a354ea0c9bd05d42bc36d61af3984947e272d27715da3fe5f9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pourpoint-0.1.0-cp39-abi3-macosx_11_0_x86_64.whl:

Publisher: build-wheels.yaml on CooperBigFoot/pourpoint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pourpoint-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pourpoint-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 43a44cba6cabd7d21de43ff26c942014c3b23173b77f49b5a29695aade21725e
MD5 971c1b7e7e1e44649d8d2edae0ffe156
BLAKE2b-256 442f6eb63b6bf0cf0d1376b2050413309ec1eb830bafb94aed23bb8ae4edfa3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pourpoint-0.1.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: build-wheels.yaml on CooperBigFoot/pourpoint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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