Skip to main content

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.


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-link areaup attributes.

  • 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 using constant, profile_relative, or cross_section strategies while enforcing a no-lowering guarantee (output ≥ input on 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.

  • Watershed update (hydro_analysis/watershed.rs) — end-user guide Extended to accept GeoJSON pour-point inputs (Point and MultiPoint features) in addition to shapefiles and rasters.

  • UnnestBasins update (hydro_analysis/unnest_basins.rs) — end-user guide Writes a <output_stem>_hierarchy.csv sidecar 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.

  • RemoveShortStreams enhancement (stream_network_analysis/remove_short_streams.rs) — end-user guide Adds --max_junctions pruning 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 .vrt detection, a minimal VRT XML parser, and a windowed GeoTIFF read path to avoid full in-memory loads for cropped inputs. Supports full-size VRTs without SrcRect/DstRect when dimensions match the source.

Runtime and Python API

  • CLI error propagationmain.rs returns Result, enabling backtraces from scripted environments.
  • Python wrapper enhancementsraise_on_error semantics, custom exceptions, environment propagation, and richer error reporting across all tools.
  • Slope unit 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


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 Distributions

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

weppcloud_wbt-2.3.0.post1-cp311-cp311-win_amd64.whl (7.5 MB view details)

Uploaded CPython 3.11Windows x86-64

weppcloud_wbt-2.3.0.post1-cp311-cp311-manylinux_2_35_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.35+ x86-64

weppcloud_wbt-2.3.0.post1-cp311-cp311-macosx_10_9_universal2.whl (6.1 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file weppcloud_wbt-2.3.0.post1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for weppcloud_wbt-2.3.0.post1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1426af5d376ebac9fdc6c2842040f5971e6c6a3bd0b49c9a74ab1f8ca3ebd20f
MD5 bdedc70f2fc06c31e05ef08698156256
BLAKE2b-256 010f892f92a2b3214dd93babc287971ca9c509df6146eca52118c4c0dfe342b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for weppcloud_wbt-2.3.0.post1-cp311-cp311-win_amd64.whl:

Publisher: pypi-publish.yml on rogerlew/weppcloud-wbt

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

File details

Details for the file weppcloud_wbt-2.3.0.post1-cp311-cp311-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for weppcloud_wbt-2.3.0.post1-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 b20717eea4728fe8c41f2038034ae8736bd83c5ba4d123fa58df75868ae522f0
MD5 a3e6fdb0c07d66f1234102c64c01e93b
BLAKE2b-256 556a1886199fa5ca08e47f076e543d427b6e59e1a0e0ea9f56890070b936f665

See more details on using hashes here.

Provenance

The following attestation bundles were made for weppcloud_wbt-2.3.0.post1-cp311-cp311-manylinux_2_35_x86_64.whl:

Publisher: pypi-publish.yml on rogerlew/weppcloud-wbt

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

File details

Details for the file weppcloud_wbt-2.3.0.post1-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for weppcloud_wbt-2.3.0.post1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c35a79cd84be585fb11d644e85fd10c34ac4490cc358b5664e3a87b80979aa14
MD5 3ebfd38c34798b48215c4a75f237bd6f
BLAKE2b-256 a9f9f1bded329d7d94e092492840e8014d73d4b1b5a06a03d48751566284edb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for weppcloud_wbt-2.3.0.post1-cp311-cp311-macosx_10_9_universal2.whl:

Publisher: pypi-publish.yml on rogerlew/weppcloud-wbt

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