WEPPcloud WhiteboxTools fork with TOPAZ-style watershed preprocessing tools
Project description
weppcloud-wbt
weppcloud-wbt is an actively maintained Rust geospatial toolkit for WEPP watershed preprocessing. It provides the terrain parameterization, channel-network construction, outlet discovery, and DEM conditioning tools used operationally by WEPPcloud — a published online interface for the Water Erosion Prediction Project (WEPP) model.
The software is built on the foundation of John Lindsay's WhiteboxTools. We are grateful for the substantial body of work Lindsay contributed to open-source geospatial analysis. That repository is officially marked as legacy and has received no commits since February 2025, as development moved to a separate commercial and open-source successor. weppcloud-wbt is the actively maintained branch of the WhiteboxTools codebase for WEPP and WEPPcloud workflows.
Installation (PyPI)
weppcloud-wbt is published on PyPI for Linux, macOS, and Windows as platform wheels that bundle the whitebox_tools executable.
python -m pip install --upgrade weppcloud-wbt
Quick smoke test:
python -c "from whitebox_tools import WhiteboxTools; print(WhiteboxTools().version())"
You can import either compatibility surface:
from whitebox_tools import WhiteboxTools
# or
from weppcloud_wbt.whitebox_tools import WhiteboxTools
Tools added in this fork
All tools below are used operationally within WEPPcloud. Python bindings are included in whitebox_tools.py and WBT/whitebox_tools.py unless noted.
Hydrology / terrain
-
HillslopesTopaz(hydro_analysis/hillslopes_topaz.rs) — spec · end-user guide Implements Garbrecht & Martz TOPAZ-style stream and hillslope identifiers for a single watershed. Emits channel metadata tables (netw.tsv,netw_props.tsv) and left/right/top hillslope rasters consumed by WEPPcloud. Includes combined flood-fill phases, cached upstream areas, and per-linkareaupattributes. -
FindOutlet(hydro_analysis/find_outlet.rs) — spec · end-user guide Derives a single-stream outlet pour-point GeoJSON by tracing D8 flow from interior candidates. Supports optional watershed masks and requested start locations (--requested_outlet_lng_lat,--requested_outlet_row_col) for interactive callers. -
FVSlope(hydro_analysis/fvslope.rs) — end-user guide Computes slope in the D8 flow direction with ESRI pointer support, z-factor, and unit controls (ratio, degrees, percent, radians). Mirrors TOPAZ-style flow-vector slopes used by WEPP channel hydraulics. Output unit is recorded in raster metadata. -
RaiseRoads(hydro_analysis/raise_roads.rs) — end-user guide Conditions DEMs for road embankments usingconstant,profile_relative, orcross_sectionstrategies while enforcing a no-lowering guarantee (output ≥ inputon all valid cells). Supports GeoJSON attribute overrides for cross-section parameters, width/parameter fallback hierarchy, conservative unpaved-road behavior, and automatic reprojection of road vectors to DEM CRS. -
Watershedupdate (hydro_analysis/watershed.rs) — end-user guide Extended to accept GeoJSON pour-point inputs (Point and MultiPoint features) in addition to shapefiles and rasters. -
UnnestBasinsupdate (hydro_analysis/unnest_basins.rs) — end-user guide Writes a<output_stem>_hierarchy.csvsidecar encoding parent/child outlet relationships, nesting order, hierarchy level, and outlet grid coordinates. Replaces per-order full-grid flowpath retracing with a one-pass outlet assignment plus per-order ancestor remapping.
Stream network
-
StreamJunctionIdentifier(stream_network_analysis/stream_junctions.rs) — end-user guide Counts inflowing tributaries for every stream pixel, producing junction maps WEPPcloud uses to locate confluences, outlets, and pseudo-gauges. -
PruneStrahlerStreamOrder(stream_network_analysis/prune_strahler_order.rs) — end-user guide Drops first-order (Strahler order = 1) links from an existing order grid, subtracts one from remaining orders, and optionally preserves zero-valued background cells or collapses retained links to a binary mask. -
IterativeFirstOrderLinkPrune(stream_network_analysis/iterative_first_order_link_prune.rs) — spec · end-user guide Two-stage stream qualification and pruning with local threshold support (--threshold_code_raster+--threshold_table) and deterministic first-order-link pruning behavior for TOPAZ-parity workflows. -
RemoveShortStreamsenhancement (stream_network_analysis/remove_short_streams.rs) — end-user guide Adds--max_junctionspruning with iterative branch deletion so no junction retains more than the requested number of inflows.
GIS
ClipRasterToRaster(gis_analysis/clip_raster_to_raster.rs) — end-user guide Cell-wise raster masking: passes input values where the mask is valid and non-zero, writes nodata elsewhere. Reduces full-raster reads in cloud preprocessing steps.
Raster I/O
- VRT support (read-only, single
SimpleSource) — spec Adds.vrtdetection, a minimal VRT XML parser, and a windowed GeoTIFF read path to avoid full in-memory loads for cropped inputs. Supports full-size VRTs withoutSrcRect/DstRectwhen dimensions match the source.
Runtime and Python API
- CLI error propagation —
main.rsreturnsResult, enabling backtraces from scripted environments. - Python wrapper enhancements —
raise_on_errorsemantics, custom exceptions, environment propagation, and richer error reporting across all tools. Slopeunit extension — ratio units added; chosen unit recorded in output metadata.
Building from source
This fork targets Linux (Ubuntu 24.04) for WEPPcloud deployment. The compiled WBT/ directory is tracked in the repository so deployment artifacts stay versioned alongside the code.
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone this repository
git clone https://github.com/rogerlew/weppcloud-wbt.git
cd weppcloud-wbt
# Release build
cargo build --release -p whitebox-tools-app
# Run tests
cargo test -p whitebox_raster --tests
cargo test -p whitebox-tools-app
Full release build and WEPPcloud deployment procedure: docs/release-build-install.md.
Developer guide
DEVELOPING_TOOLS.md covers tool structure, test fixture conventions, Python binding patterns, and the integration test requirements expected for new tools.
Acknowledgements
This project is built on WhiteboxTools by John Lindsay at the University of Guelph. Lindsay's work established the Rust geospatial analysis framework, hydrologic toolchain, raster I/O layer, and Python API that make this fork possible. The TOPAZ algorithms implemented here draw on the foundational work of Jurgen Garbrecht and Lawrence Martz. We are grateful to both for their contributions to open-source hydrologic terrain analysis.
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 Distributions
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 weppcloud_wbt-2.3.0.post2-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: weppcloud_wbt-2.3.0.post2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 12.6 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3091e9e5c3bee464d758f903645f7495454283e63927b9f4dd5cfb78c00746f
|
|
| MD5 |
9b1b570a070874abb0c1dcf8bd95387b
|
|
| BLAKE2b-256 |
dc6c68b205aeab7425bfb65d070f37e9a6c75fc34a7b1828efafa0beb58fcc74
|
Provenance
The following attestation bundles were made for weppcloud_wbt-2.3.0.post2-cp311-cp311-win_amd64.whl:
Publisher:
pypi-publish.yml on rogerlew/weppcloud-wbt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weppcloud_wbt-2.3.0.post2-cp311-cp311-win_amd64.whl -
Subject digest:
c3091e9e5c3bee464d758f903645f7495454283e63927b9f4dd5cfb78c00746f - Sigstore transparency entry: 1776024339
- Sigstore integration time:
-
Permalink:
rogerlew/weppcloud-wbt@4e666f6eab948f59a9340349498a3bb1d072243a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/rogerlew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@4e666f6eab948f59a9340349498a3bb1d072243a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file weppcloud_wbt-2.3.0.post2-cp311-cp311-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: weppcloud_wbt-2.3.0.post2-cp311-cp311-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 9.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1de3d693d908a2f4c73c5af4faa1b3d64df3abdb9887fe685556cf8dea3f769
|
|
| MD5 |
adf38253ecd53736221059c87274f723
|
|
| BLAKE2b-256 |
e85bec2e087859e827f5baafe741646c2a0ab52a60ded7a963916c1063027e4e
|
Provenance
The following attestation bundles were made for weppcloud_wbt-2.3.0.post2-cp311-cp311-manylinux_2_35_x86_64.whl:
Publisher:
pypi-publish.yml on rogerlew/weppcloud-wbt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weppcloud_wbt-2.3.0.post2-cp311-cp311-manylinux_2_35_x86_64.whl -
Subject digest:
f1de3d693d908a2f4c73c5af4faa1b3d64df3abdb9887fe685556cf8dea3f769 - Sigstore transparency entry: 1776024135
- Sigstore integration time:
-
Permalink:
rogerlew/weppcloud-wbt@4e666f6eab948f59a9340349498a3bb1d072243a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/rogerlew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@4e666f6eab948f59a9340349498a3bb1d072243a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file weppcloud_wbt-2.3.0.post2-cp311-cp311-macosx_10_9_universal2.whl.
File metadata
- Download URL: weppcloud_wbt-2.3.0.post2-cp311-cp311-macosx_10_9_universal2.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e94414a0017430c2c2e8e5657580684eabb94ff9d4aa41f041479ab5f527da25
|
|
| MD5 |
0a574e23a57a7df2654393db27f7d3bb
|
|
| BLAKE2b-256 |
be1742e8dcf84cf852accad2522aa38c37cf805be13c4d599ba22f1045d1c515
|
Provenance
The following attestation bundles were made for weppcloud_wbt-2.3.0.post2-cp311-cp311-macosx_10_9_universal2.whl:
Publisher:
pypi-publish.yml on rogerlew/weppcloud-wbt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weppcloud_wbt-2.3.0.post2-cp311-cp311-macosx_10_9_universal2.whl -
Subject digest:
e94414a0017430c2c2e8e5657580684eabb94ff9d4aa41f041479ab5f527da25 - Sigstore transparency entry: 1776024493
- Sigstore integration time:
-
Permalink:
rogerlew/weppcloud-wbt@4e666f6eab948f59a9340349498a3bb1d072243a -
Branch / Tag:
refs/heads/master - Owner: https://github.com/rogerlew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@4e666f6eab948f59a9340349498a3bb1d072243a -
Trigger Event:
workflow_dispatch
-
Statement type: