pourpoint
pourpoint is the Python package for the pourpoint watershed-delineation
engine. Prepared 0.4.0 adds snap-target layers and result corrections; it is
not yet published. The current PyPI release is 0.3.0 and is classified Beta.
Install
uv add pourpoint
(or pip install pourpoint)
Release 0.3.0 has five cp39-abi3 wheels for macOS 11+ arm64/x86_64,
manylinux_2_28 arm64/x86_64, and Windows amd64, plus an sdist. The wheels
bundle GDAL, PROJ, GEOS, and their runtime dependencies.
Hosted quickstart
import pourpoint
engine = pourpoint.Engine(
"https://basin-delineations-public.upstream.tech/grit/hfx-v0.3.0/" # Reader floor: pourpoint 0.3.0
)
result = engine.delineate(lat=47.3769, lon=8.5417)
print(result.area_km2)
geojson_feature = result.to_geojson()
HFX is the normalized input contract. Every raw or source hydrofabric needs an
adapter compile step before pourpoint can read it. Adapter availability does not
imply hosted availability. There is exactly one dataset hosted by this project:
the GRIT 2.0.0 HFX dataset, compiled from GRIT v1.0 source data. Its live
manifest reports fabric_version 1.0.0, HFX format_version 0.3.0, and
adapter_version grit-global-2.1.0.
Remote operation fetches required byte ranges and raster windows instead of the complete roughly 299 GB dataset. The small manifest and graph may be fetched completely when first needed. Construction reads the manifest; delineation loads and validates the graph and catchments on first use. Snap extraction does not load them. Required ranges and windows may be cached locally.
The live D8 declaration uses hfx.aux.d8_raster.v2, EPSG:8857, grass, and
km2, at aux/d8/flow_dir.tif and aux/d8/flow_acc.tif. See the
D8 compatibility boundary.
Released and development API references
Released 0.3.0 documentation: use the
tag-pinned Python README
and tag-pinned API reference.
Released 0.3.0 includes one-shot and batch calls, the staged API, GeoJSON
Feature output, and both GeoParquet writer classes.
Prepared 0.4.0 documentation: this checkout describes the upcoming version, including snap-target extraction, typed refinement diagnostics and auxiliary schema diagnostics. See the changelog for behavior changes. These additions are not in the published 0.3.0 wheel. Build this checkout using CONTRIBUTING.md to use them before publication.
Snap-target layers
Export the complete snap geometries supplied by a dataset for use in QGIS:
targets = engine.snap_targets(bbox=(8.3, 47.2, 8.8, 47.6))
targets.write("snap-targets.gpkg")
# Select one declared set, or explicitly select the whole dataset.
reach_targets = engine.snap_targets(
bbox=(8.3, 47.2, 8.8, 47.6), snap_set="reach-stems"
)
engine.snap_targets(all=True).write("all-snap-targets.gpkg")
Specify exactly one of bbox or all=True. Bounds are EPSG:4326 coordinates in
west, south, east, north order. Selection tests actual geometry intersection,
including the boundary, and never clips geometries. Each set has separate
<set>_points and <set>_lines GeoPackage layers, including empty layers.
write() streams rows and replaces an existing file only after a complete,
successful export. It needs no GeoPandas installation.
For a combined GeoDataFrame, install pourpoint[geopandas]:
gdf = targets.to_geodataframe()
gdf.plot()
The frame includes snap_set, id, unit_id, weight, stem_role, bbox,
geometry_wkb (the original bytes), and geometry. Its attrs["snap_sets"]
retains declaration descriptions, referenced levels, and weight semantics;
attrs["manifest"] retains the source manifest, including supplied attribution.
GeoDataFrame conversion loads the selection into memory.
Opening an Engine validates its source, manifest, and options. Graph and
catchment reads begin on the first delineation operation, not on snap export.
Snap reads use available spatial pruning; artifacts without bounds can require
larger reads. Snap features are not a reconstructed or routable river network.
Extraction does not change the source dataset's license.
Local use
import pourpoint
engine = pourpoint.Engine("/path/to/hfx/dataset")
result = engine.delineate(lat=47.3769, lon=8.5417)
Outlet resolution uses declared snap features and the configured strategy. The
default weight-first strategy is not simply nearest. Keep an Engine for
repeated delineations so its caches can be reused.
License and citation
The engine is MIT-licensed. The hosted GRIT dataset is separately CC BY-NC 4.0 for NonCommercial use. Installing pourpoint grants no commercial rights to hosted GRIT. Cite the vector data, raster data, and paper.
Upstream Tech is only the in-kind hosting infrastructure sponsor, not the owner, vendor, or commercial partner.
Links
Metadata
Release files for pourpoint 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pourpoint-0.4.0.tar.gz | 969.7 kB | With provenance | Details for pourpoint-0.4.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| pourpoint-0.4.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for pourpoint-0.4.0-cp39-abi3-win_amd64.whl |
| pourpoint-0.4.0-cp39-abi3-manylinux_2_28_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ x86-64 | Details for pourpoint-0.4.0-cp39-abi3-manylinux_2_28_x86_64.whl |
| pourpoint-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ ARM64 | Details for pourpoint-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl |
| pourpoint-0.4.0-cp39-abi3-macosx_11_0_x86_64.whl | CPython 3.9 | abi3 | macOS 11.0+ x86-64 | Details for pourpoint-0.4.0-cp39-abi3-macosx_11_0_x86_64.whl |
| pourpoint-0.4.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for pourpoint-0.4.0-cp39-abi3-macosx_11_0_arm64.whl |
Total release size: 144.4 MB
Release files / pourpoint-0.4.0.tar.gz
| Download URL | pourpoint-0.4.0.tar.gz |
|---|---|
| Size | 969.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7e98c6603d59c01cd41e5173b9fc8bb1a529eaf3b7cda833baa7a899d4f15c6
|
|
BLAKE2b-256 checksum How to use checksums |
a320c0199785c580c6cef359d1ff60f7008c60ba98661174da856652c36a41cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / pourpoint-0.4.0-cp39-abi3-win_amd64.whl
| Download URL | pourpoint-0.4.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 49.1 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ee4715784eaa05a0630b1683a17281483d4fe7ac5dccd434020c73d8af7c55a6
|
|
BLAKE2b-256 checksum How to use checksums |
2f97aa141a4005ac5e4586ae7ec0ed7176fe0f91304a679d5e30814b91f1690d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / pourpoint-0.4.0-cp39-abi3-manylinux_2_28_x86_64.whl
| Download URL | pourpoint-0.4.0-cp39-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 24.1 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3db88c7d9ba73fc6e1a2d20510d0984ec539daa9e551c666647b54484f3a391d
|
|
BLAKE2b-256 checksum How to use checksums |
129c51ff558e5d8ca9b69f58912e842ea86b5a796a909500470e21b13428e075
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / pourpoint-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl
| Download URL | pourpoint-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 23.0 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
352d34d7fdb5345685c153dee742e4ba2ace8b7bf4af565f39a2e41368a755dc
|
|
BLAKE2b-256 checksum How to use checksums |
4c8b4cbe3a43a79556048abc23aa1fe639371da12f6fdc065389bef8409be250
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / pourpoint-0.4.0-cp39-abi3-macosx_11_0_x86_64.whl
| Download URL | pourpoint-0.4.0-cp39-abi3-macosx_11_0_x86_64.whl |
|---|---|
| Size | 24.2 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
c79110dcf7ae505e1e80afd5e58e2e5213a9ed166419984a38a6a51f0f7adc26
|
|
BLAKE2b-256 checksum How to use checksums |
2638286e901ffb3e99b3cd7b3e38db0b63cd6f70274ec479b649b5087f9a95da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / pourpoint-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | pourpoint-0.4.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 23.0 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7dc28101e96fe7d1d4cd3843ac1fd114906195a228c49a1ec922d53ad61751d5
|
|
BLAKE2b-256 checksum How to use checksums |
1ca8eda9688970707f09314968df7283d45e22b69764b004dda2542e317ce937
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logSecurity for pourpoint 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for pourpoint-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.