Overview
This manual is the long-form user guide for the WbW-R API.
WbW-R (Whitebox Workflows for R) is the R frontend to Whitebox Next Gen, providing access to modern geospatial processing for raster, vector, lidar, and sensor-bundle data through an R-friendly API and workflow model.
Whitebox is a long-running geospatial project that originated in academia and has grown into a broad analysis platform with recognized strengths in geomorphometry, hydrology, lidar processing, and remote sensing. Whitebox Next Gen is the current Rust-based major iteration focused on performance, cross-platform reliability, and modern data formats.
Whitebox Next Gen is intentionally full-stack: core geospatial capabilities that are often delegated to external C/C++ dependencies in other GIS platforms (for example raster I/O, projections, geometry/topology operations, and lidar handling) are implemented in the Whitebox codebase itself. This architecture is unusual in GIS and provides practical benefits for users: consistent behavior across platforms, tighter control over correctness and performance, fewer system-level dependency issues during installation, and faster iteration when fixing bugs or introducing new capabilities.
In this architecture, WbW-R is the orchestration layer for R users who need both practical scripting ergonomics and backend-scale performance.
This manual is written to be both:
- beginner friendly: clear progression and runnable examples,
- canonical reference: explicit operational patterns, constraints, and validation guidance aligned with backend behavior.
How to Use This Manual
This guide is intended for analysts who want to move from one-off exploratory commands to stable, scriptable geospatial workflows. The examples are practical and executable, but each chapter also explains the operational intent behind the code: when to keep work in memory, when to persist outputs, and how to validate results between stages.
A good first pass is chapter-order reading. After that, use the script index as a task-oriented entry point for adapting workflows to your own projects.
When adapting examples, keep a consistent script shape:
- session setup,
- input loading,
- transformation chain,
- validation and output persistence.
This structure keeps scripts easier to review, test, and maintain.
Goals:
- Comprehensive API coverage.
- Script-first documentation style.
- Chapter layout aligned with the project README.
Documentation style rules:
- Every major concept includes runnable code snippets.
- Each chapter includes at least one end-to-end workflow script.
- Tool parameter specifics are linked to shared tool reference docs as needed.
Common Pitfalls and Validation
- Confirm inputs exist and have the expected CRS/schema/metadata before running long workflows.
- Prefer explicit output names and formats for reproducibility, especially in batch scripts.
- Re-open and inspect outputs after major steps to validate assumptions before chaining more tools.
- For performance-sensitive runs, start with a small representative subset, then scale to full data.
Write Option References
For quick access to output option tables:
- Raster: Output Controls -> Raster Write Option Reference
- Vector: Output Controls -> Vector Write Option Reference
- Lidar: Output Controls -> Lidar Write Option Reference
Installation and Setup
Treat setup as an explicit validation stage, not a one-time administrative task. The smoke test in this chapter confirms that the package and runtime can create a session and enumerate tools, which catches many environment issues before they surface in long-running processing scripts.
For collaborative projects, this chapter doubles as a baseline checklist for new machines and CI environments.
Install
Use this to install the current local package build for development and testing.
R CMD INSTALL crates/wbw_r/r-package/whiteboxworkflows
To install the published binary package from WhiteboxGeo, use the WhiteboxGeo repository together with CRAN:
install.packages(
"whiteboxworkflows",
repos = c(
WhiteboxGeo = "https://www.whiteboxgeo.com/r",
CRAN = "https://cloud.r-project.org"
)
)
The WhiteboxGeo repository currently serves binary builds for R 4.5 and R 4.6 on the supported platforms.
Smoke Test
This verifies that startup succeeds and tool enumeration is available in your current runtime.
Rscript -e 'library(whiteboxworkflows); s <- wbw_session(); cat(length(wbw_tool_ids(session = s)), "\n")'
Build and Preview
This manual is structured as an mdBook project.
Documentation build steps are part of quality control. Running these commands early and often helps catch broken links, malformed markdown, and chapter order drift before those issues accumulate. Live preview is especially useful when iterating on explanatory text and section hierarchy.
Install mdBook
cargo install mdbook
Build the Manual
Run this when changing chapter content, links, or section ordering.
From repository root:
cd crates/wbw_r/manual
mdbook build
Generated HTML is written to book/.
Live Preview
Use live preview while refining long explanatory sections and chapter flow.
cd crates/wbw_r/manual
mdbook serve --open
Authoring Notes
- Keep chapter order aligned with
src/SUMMARY.md. - Prefer runnable snippets over pseudo-code.
- Link chapter recipes to concrete scripts listed in the script index.
Quick Start
This chapter is a minimal "first success" path. It verifies that your R installation, package setup, session creation, tool execution, and output write path all work together before you take on larger workflows.
Once this slice runs end-to-end, the remaining chapters explain how to make the same pattern more explicit, reproducible, and resilient.
The example below demonstrates the core session-first model in WbW-R: create a session, load data, run a tool, and inspect the result object.
library(whiteboxworkflows)
s <- wbw_session()
dem <- wbw_read_raster("dem.tif")
result <- wbw_slope(dem = dem$file_path(), output = "slope.tif")
print(result)
What to Read Next
These chapters extend the same lifecycle with discovery, progress handling, and larger workflow templates.
- Session lifecycle and discovery: Session and Discovery
- Progress callbacks and execution patterns: Tool Execution and Progress
- End-to-end workflow scripts: Script Index
Quick-Start Conventions
- Prefer explicit
wbw_session(...)construction in scripts. - Validate tool visibility before long-running pipelines.
- Persist outputs deliberately and re-open typed objects for verification.
Session and Discovery
This chapter covers session lifecycle and tool discovery patterns.
Session and discovery APIs establish runtime certainty before execution. By creating a session explicitly and checking tool visibility up front, you avoid late failures in long pipelines and make script behavior easier to reason about across different environments and deployment targets.
Create Session
This is the standard session bootstrap for scripts. Keep it explicit so runtime state is obvious to future readers.
library(whiteboxworkflows)
s <- wbw_session()
print(s)
Visibility Checks
Use hard visibility checks before long jobs so missing-tool failures happen immediately.
library(whiteboxworkflows)
s <- wbw_session()
ids <- wbw_tool_ids(session = s)
cat('Visible tools:', length(ids), '\n')
if (!wbw_has_tool('slope', session = s)) {
stop('slope is not available in this runtime session')
}
Search and Describe
Use this when you know the task objective but need to confirm exact tool IDs and parameter contracts.
library(whiteboxworkflows)
matches <- wbw_search_tools('lidar')
print(matches[1:min(5, length(matches))])
desc <- wbw_describe_tool('slope')
print(desc)
Schema-Aware Tool Metadata JSON
For canonical parameter I/O typing, use get_tool_info_json (or
get_tool_metadata_json) rather than inferring type from parameter names or
descriptions. These JSON payloads include io_role and data_kind fields for
each parameter.
library(whiteboxworkflows)
library(jsonlite)
info <- fromJSON(get_tool_info_json('slope'))
params <- info$params
has_role <- 'io_role' %in% names(params)
has_kind <- 'data_kind' %in% names(params)
for (i in seq_len(nrow(params))) {
role <- if (has_role) params$io_role[[i]] else 'unknown'
kind <- if (has_kind) params$data_kind[[i]] else 'unknown'
cat(params$name[[i]], ' role=', role, ' kind=', kind, '\n', sep = '')
}
| Field | Meaning |
|---|---|
io_role | Parameter role: input, output, or non-I/O argument. |
data_kind | Canonical family such as raster, vector, lidar, table, json, text, file, bool, number, or string. |
Use these fields for integration logic such as destination/output typing, layer handling, and parameter validation.
Category-Based Discovery
Category discovery is useful for UI generation, guided workflows, and policy checks in larger automation systems.
library(whiteboxworkflows)
summary <- wbw_category_summary()
print(summary)
cats <- wbw_get_all_categories()
print(cats)
raster_tools <- wbw_tools_in_category('Raster')
print(head(raster_tools, 20))
proj_tools <- wbw_tools_in_category('projection_georeferencing')
print(head(proj_tools, 20))
Session API Reference
WbW-R is function-first, but the wbw_session() object still exposes a useful
set of callable methods for execution, projection utilities, topology checks,
and typed I/O helpers.
Session Construction and Execution
| Method | Description |
|---|---|
run_tool | Execute a tool with a named argument list. |
run_tool_with_progress | Execute a tool and return structured progress/result output. |
list_tools | Return visible tool IDs for the session/license context. |
get_tool_metadata_json | Return canonical metadata JSON for one tool ID, including io_role/data_kind. |
get_tool_info_json | Alias of get_tool_metadata_json for cross-binding API parity. |
Typed I/O Helpers
| Method | Description |
|---|---|
read_vector | Read vector data with optional read options. |
write_raster | Write one raster with optional format options. |
write_rasters | Write multiple rasters in one call. |
write_vector | Write one vector with optional format options. |
Projection Utility Methods
| Method | Description |
|---|---|
projection_to_ogc_wkt | Convert EPSG code to OGC WKT text. |
projection_identify_epsg | Identify EPSG from CRS text where possible. |
projection_reproject_points | Reproject point collections between EPSG systems. |
projection_reproject_point | Reproject a single point between EPSG systems. |
Topology Utility Methods
| Method | Description |
|---|---|
topology_intersects_wkt, topology_contains_wkt, topology_within_wkt | Core spatial predicate checks on WKT geometries. |
topology_touches_wkt, topology_disjoint_wkt, topology_crosses_wkt, topology_overlaps_wkt | Additional topological predicates for rule-based QA. |
topology_covers_wkt, topology_covered_by_wkt | Boundary-aware containment checks. |
topology_relate_wkt | Return DE-9IM relation text for exact topology logic. |
topology_distance_wkt | Return shortest distance between WKT geometries. |
topology_vector_feature_relation | Evaluate topology relation between indexed features in two vector objects. |
topology_is_valid_polygon_wkt, topology_make_valid_polygon_wkt | Validate and repair polygon WKT geometries. |
topology_buffer_wkt | Build buffered geometry from WKT and distance. |
Recommended Discovery Pattern
- Build session explicitly.
- Check required tools with
wbw_has_tool(...). - Use
wbw_describe_tool(...)for parameter verification. - Use
get_tool_info_json(...)when you need canonical I/O typing for integration logic. - Use category functions to drive guided UX or script validation.
Tool Execution and Progress
This chapter documents execution styles and progress handling in WbW-R.
Execution structure affects observability and reproducibility. Explicit session execution makes dependencies and runtime state clear, while progress-aware patterns help with monitoring, troubleshooting, and user feedback during long operations. Think of callbacks as operational instrumentation, not just console output.
Explicit Session Execution
Use explicit session execution as the default in production scripts so runtime dependencies and state are clear.
library(whiteboxworkflows)
s <- wbw_session()
result <- wbw_slope(dem = 'dem.tif', output = 'slope.tif')
print(result)
Progress-Aware Execution
Use progress-aware execution for long operations, remote runs, and logs that require periodic status updates.
library(whiteboxworkflows)
s <- wbw_session()
result <- wbw_run_tool_with_progress(
'slope',
args = list(dem = 'dem.tif', output = 'slope.tif'),
session = s,
on_progress = wbw_print_progress
)
str(result$progress)
Custom Progress Callback
This callback pattern is useful when progress events need to feed custom log formats or monitoring pipelines.
progress_cb <- local({
last <- -1L
function(pct = NA_real_, message = '') {
msg <- if (is.null(message)) '' else as.character(message[[1]])
if (!is.numeric(pct) || length(pct) == 0L || is.na(pct[[1]])) {
m <- regexpr('(-?[0-9]+(\\.[0-9]+)?)\\s*%', msg, perl = TRUE)
if (m[[1]] >= 0L) {
token <- regmatches(msg, m)
pct <- as.numeric(sub('%.*$', '', token))
} else {
pct <- NA_real_
}
}
if (is.numeric(pct) && length(pct) > 0L && !is.na(pct[[1]])) {
value <- as.numeric(pct[[1]])
if (value <= 1.0) value <- value * 100.0
pct_int <- as.integer(max(0, min(100, floor(value))))
if (pct_int > last) {
cat(sprintf('[%3d%%] %s\\n', pct_int, msg))
last <<- pct_int
}
}
}
})
# Use: on_progress = progress_cb
Recommended Execution Pattern
- Validate tool visibility first.
- Run with explicit session.
- Capture progress for long operations.
- Persist outputs and re-open typed objects for post-processing.
Working with Rasters
This chapter documents practical raster workflows in WbW-R with emphasis on inspection, iteration, modification, and persistence.
Raster processing usually alternates between backend tools for heavy transformations and array-level edits for custom logic. The key design choice is to use tool operations for scale and consistency, then reserve manual array passes for domain-specific adjustments that are hard to express with existing tools.
Raster Lifecycle
This lifecycle makes assumptions explicit before computation and keeps your workflow reviewable.
Typical lifecycle:
- Read raster.
- Inspect metadata.
- Transform values (tool-driven or array-driven).
- Persist outputs with explicit options when needed.
library(whiteboxworkflows)
r <- wbw_read_raster('dem.tif')
meta <- r$metadata()
print(meta$rows)
print(meta$columns)
print(meta$nodata)
Memory-Backed Rasters for Pipeline Efficiency
For workflows that chain multiple tool operations, memory-backed rasters eliminate disk I/O between steps. This is especially valuable when processing large rasters in complex pipelines. Rasters remain in process memory, accessible to subsequent tools without writing to disk.
Load a raster into memory with file_mode = "m":
library(whiteboxworkflows)
# Read directly into memory; no disk path required for subsequent ops
r1 <- wbw_read_raster('dem.tif', file_mode = "m")
r2 <- wbw_read_raster('slope.tif', file_mode = "m")
# Both rasters are now memory-backed. Chain operations without disk:
result <- r1 + r2
print(result$file_path()) # prints: memory://raster/...
Memory-backed paths are compatible with all downstream raster operations:
library(whiteboxworkflows)
r <- wbw_read_raster('dem.tif', file_mode = "m")
# Inspect and transform
meta <- r$metadata()
scaled <- wbw_multiply(input = r$file_path(), multiplier = 1.5)
# Export to disk when ready
wbw_write_raster(scaled, 'dem_scaled_1p5x.tif')
Memory Lifecycle and Cleanup
Memory-backed rasters persist in the process store until explicitly removed or cleared. For long-running jobs, manage memory explicitly to avoid accumulation:
library(whiteboxworkflows)
# Check current memory usage
count_before <- wbw_raster_memory_count()
bytes_before <- wbw_raster_memory_bytes()
cat('Rasters in memory:', count_before, '\n')
cat('Bytes used:', bytes_before, '\n')
# Read two rasters
r1 <- wbw_read_raster('large1.tif', file_mode = "m")
r2 <- wbw_read_raster('large2.tif', file_mode = "m")
cat('After reads:', wbw_raster_memory_count(), '\n')
# Remove one raster when done
wbw_remove_raster_from_memory(r1)
cat('After remove:', wbw_raster_memory_count(), '\n')
# Or clear all rasters at once
wbw_clear_raster_memory()
cat('After clear:', wbw_raster_memory_count(), '\n')
Best practices:
- Use
file_mode = "m"for intermediate results in tool chains. - Export memory-backed rasters to disk with
write()when persisting results. - Call
remove_raster_from_memory()after a raster is no longer needed. - Use
clear_raster_memory()between independent job phases. - Use
wbw_clear_memory()when resetting all in-process raster/vector/lidar stores together. - Monitor
raster_memory_count()andraster_memory_bytes()in large pipelines.
Iterating Through Grid Cells
Use this only for logic that cannot be expressed through existing tools or vectorized operations.
Use to_array() for cell-level logic.
library(whiteboxworkflows)
r <- wbw_read_raster('dem.tif')
a <- r$to_array()
meta <- r$metadata()
nr <- dim(a)[1]
nc <- dim(a)[2]
for (row in seq_len(nr)) {
for (col in seq_len(nc)) {
z <- a[row, col]
if (!is.na(z) && z != meta$nodata) {
if (z < 0) {
a[row, col] <- 0
}
}
}
}
Fast Random Cell Access with Pinning
For neighbourhood logic or flow-path traversal that performs frequent random cell reads/writes, use pinned raster views. Pinning loads the raster values once and avoids repeated conversion overhead inside tight loops.
Single-raster pinning:
library(whiteboxworkflows)
r <- wbw_read_raster("dem.tif")
p <- wbw_pinned_raster(r)
v <- p$get_value(100, 200)
p$set_value(100, 200, v + 1)
p$close()
Two-raster read/write scan loop:
library(whiteboxworkflows)
src <- wbw_read_raster("D8Pointer.tif")
dst <- wbw_read_raster("output_template.tif")
wbw_with_pinned_rasters(src, dst, .f = function(srcp, dstp) {
meta <- src$metadata()
for (row in seq_len(meta$rows)) {
for (col in seq_len(meta$columns)) {
value <- srcp$get_value(row, col)
dstp$set_value(row, col, value)
}
}
})
Notes:
wbw_with_pinned_rasters()closes all pins automatically.wbw_pin_rasters(...)is available when manual close control is preferred.- Pinned write-back currently targets file-backed rasters in wbw_r.
Writing Modified Data Back
This demonstrates creating a derived raster while preserving base geospatial context.
library(whiteboxworkflows)
base <- wbw_read_raster('dem.tif')
a <- base$to_array()
a <- a * 1.05
out <- wbw_array_to_raster(a, base, output_path = 'dem_scaled.tif')
print(out)
Supported raster write keys and valid values are documented in Output Controls.
Multi-Band Iteration
Use this when transform rules depend on band identity or per-band thresholds.
library(whiteboxworkflows)
r <- wbw_read_raster('multiband.tif')
a <- r$to_array()
# If array is [rows, cols, bands], loop accordingly.
d <- dim(a)
if (length(d) == 3) {
nr <- d[1]
nc <- d[2]
nb <- d[3]
for (b in seq_len(nb)) {
for (row in seq_len(nr)) {
for (col in seq_len(nc)) {
v <- a[row, col, b]
if (!is.na(v) && v < 0) {
a[row, col, b] <- 0
}
}
}
}
}
wbw_array_to_raster(a, r, output_path = 'multiband_clamped.tif')
Tool-First Raster Processing
Prefer this pattern for heavy processing: let optimized tools do most work, then apply targeted custom edits.
library(whiteboxworkflows)
s <- wbw_session()
dem <- wbw_read_raster('dem.tif')
wbw_fill_depressions(dem = dem$file_path(), output = 'filled.tif')
filled <- wbw_read_raster('filled.tif')
slope <- filled$square() # placeholder unary op example
slope$write('slope_out.tif', overwrite = TRUE)
NoData and Performance Guidance
- Always account for
metadata()$nodatain per-cell loops. - Prefer tool operations for heavy transforms.
- Use array loops only for custom logic not available as tools.
Raster Object Method Reference
Metadata and Conversion
| Method | Description |
|---|---|
metadata | Return raster metadata (dimensions, extent, nodata, CRS fields). |
file_path | Return the backing raster path. |
band_count | Return raster band count. |
active_band | Return active band index. |
get_value, set_value | Read/write single cell values using 1-based row/column/band indices. |
crs_epsg, crs_wkt | Inspect CRS metadata. |
to_array | Convert raster to in-memory array for custom processing. |
to_stars | Convert raster to a stars object (requires terra support path). |
pin | Create a pinned view for low-overhead random cell access in tight loops. |
Arithmetic and Unary Transform Methods
| Method | Description |
|---|---|
add, subtract, multiply, divide | Cellwise binary arithmetic with another raster/path operand. |
abs, ceil, floor, round, square, sqrt | Common unary numeric transforms. |
log10, log2, exp, exp2 | Log and exponential transforms. |
sin, cos, tan, sinh, cosh, tanh | Trigonometric and hyperbolic transforms. |
Persistence
| Method | Description |
|---|---|
deep_copy | Copy raster to a new output path and return a raster object. |
write | Write raster to disk with optional output options. |
Working with Vectors
This chapter covers schema inspection, feature iteration, attribute reads/writes, and persistence workflows.
Reliable vector workflows depend on stable schema and attribute contracts as much as geometry itself. The patterns in this chapter emphasize inspecting structure early, applying deterministic edits, and validating outputs after persistence so downstream analysis remains predictable.
See Also: Online Sources
If your workflow starts by downloading vectors from web providers (starting with OSM Overpass), use the dedicated chapter:
Read and Inspect
Begin with schema and metadata inspection so edits are grounded in the actual field model.
library(whiteboxworkflows)
v <- wbw_read_vector('roads.gpkg')
schema <- v$schema()
print(schema)
print(v$metadata())
Memory-Backed Vectors for Pipeline Efficiency
For workflows that chain multiple vector operations, memory-backed vectors eliminate disk I/O between steps. This is valuable for complex pipelines where intermediate results are passed between spatial operations.
Load a vector into memory with file_mode = "m":
library(whiteboxworkflows)
# Read directly into memory
roads <- wbw_read_vector('roads.gpkg', file_mode = "m")
rivers <- wbw_read_vector('rivers.gpkg', file_mode = "m")
print(roads$path) # prints: memory://vector/...
Memory-backed vectors are compatible with all downstream operations:
library(whiteboxworkflows)
v <- wbw_read_vector('polygons.gpkg', file_mode = "m")
# Inspect schema and metadata
schema <- v$schema()
meta <- v$metadata()
# Pass to spatial tools
centroid_path <- wbw_centroid_vector(input = v$path, output = 'centroids')
# Export to disk when ready
result <- wbw_read_vector(centroid_path)
result$write('centroids_final.gpkg')
Vector Memory Lifecycle
Memory-backed vectors persist until explicitly removed or cleared. For long-running vector pipelines, manage memory explicitly:
library(whiteboxworkflows)
# Check current memory
cat('Vectors in memory:', wbw_vector_memory_count(), '\n')
# Read vectors
v1 <- wbw_read_vector('large1.gpkg', file_mode = "m")
v2 <- wbw_read_vector('large2.gpkg', file_mode = "m")
cat('After reads:', wbw_vector_memory_count(), '\n')
# Remove when done
wbw_remove_vector_from_memory(v1)
cat('After remove:', wbw_vector_memory_count(), '\n')
# Or clear all
wbw_clear_vector_memory()
cat('After clear:', wbw_vector_memory_count(), '\n')
Implicit Memory Output from Tools
All vector-output tools store their result in memory automatically when the
output argument is omitted (NULL). You do not need to pass file_mode = "m"
or choose a temporary path — simply leave output out and the returned
wbw_vector object is already memory-backed:
library(whiteboxworkflows)
wbe <- wbw_make_session()
roads <- wbw_read_vector('roads.gpkg')
# No output path — result is stored in memory automatically
centroids <- wbe$centroid_vector(input = roads$path)
cat(centroids$path, '\n') # prints: memory://vector/...
# Chain operations without any intermediate files
clipped <- wbe$clip(input = centroids$path, clip = 'boundary.gpkg')
cat(clipped$path, '\n') # also memory://vector/...
# Persist the final result only
wbw_write_vector(clipped, 'result.gpkg')
This applies to all tool categories — GIS, hydrology, geomorphometry, and stream
network tools all follow the same rule. Providing an explicit output path
writes to disk as before.
Best practices:
- Use
file_mode = "m"for intermediate spatial analysis results. - Export memory-backed vectors to disk with
write()when persisting final outputs. - Call
remove_vector_from_memory()after a vector is no longer needed. - Use
clear_vector_memory()between independent analysis phases. - Use
wbw_clear_memory()when resetting all in-process raster/vector/lidar stores together.
Iterate Through Features
Use this for quality checks, custom filters, and record-level diagnostics.
library(whiteboxworkflows)
v <- wbw_read_vector('roads.gpkg')
count <- v$metadata()$feature_count
for (i in seq_len(count)) {
attrs <- v$attributes(i)
# attrs is a named list
print(attrs)
}
Read and Update Attribute Table
This example combines common edit actions: single-value updates, grouped updates, and field creation.
library(whiteboxworkflows)
v <- wbw_read_vector('roads.gpkg')
name1 <- v$attribute(1, 'name')
print(name1)
v$update_attribute(1, 'name', 'Main Street')
v$update_attributes(2, list(speed = 50, class = 'collector'))
v$add_field('reviewed', field_type = 'integer', default_value = 0)
Persist Vector Outputs
This pattern demonstrates tool-driven persistence and post-write verification.
For complete write-option keys and allowed values, see Output Controls.
library(whiteboxworkflows)
s <- wbw_session()
roads <- wbw_read_vector('roads.gpkg')
wbw_centroid_vector(input = roads$file_path(), output = 'roads_centroids.gpkg')
centroids <- wbw_read_vector('roads_centroids.gpkg')
print(centroids$metadata())
Practical Notes
- Call
schema()first to confirm field names and expected types. - Use
update_attributes()for grouped feature edits. - Re-read output files to validate schema and values after writes.
Vector Object Method Reference
Metadata and Structure
| Method | Description |
|---|---|
metadata | Return vector metadata (geometry type, feature count, CRS, fields). |
schema | Return field names and types as a data frame. |
path | Return backing vector path. |
to_terra, to_sf | Convert to terra/sf objects for ecosystem workflows. |
Attribute Access and Edits
| Method | Description |
|---|---|
attributes | Return all attribute values for one feature index. |
attribute | Return one field value for one feature index. |
update_attributes | Update multiple fields for one feature index. |
update_attribute | Update one field for one feature index. |
add_field | Add a new field with declared type and default value. |
Persistence
| Method | Description |
|---|---|
deep_copy | Copy vector to a new path with optional write options. |
write | Write vector to a new output path. |
Working with Lidar
This chapter documents lidar workflows in WbW-R, including file-backed processing, metadata checks, and output control patterns.
Lidar workflows are strongly shaped by dataset size and I/O cost. The guiding pattern here is to use file-backed objects and vectorized matrix operations for normal workloads, then switch to chunked processing when point counts exceed comfortable memory limits.
Baseline Workflow
Use this as a first-run validation before introducing matrix edits or chunked processing.
library(whiteboxworkflows)
l <- wbw_read_lidar('survey.las')
print(l$metadata())
copy <- l$deep_copy('survey_copy.las', overwrite = TRUE)
print(copy$metadata())
Memory-Backed Lidar for Pipeline Efficiency
For workflows that chain multiple lidar operations, memory-backed lidar objects eliminate disk I/O between steps. This is valuable when processing large point clouds through sequential filtering or classification steps.
Load a point cloud into memory with file_mode = "m":
library(whiteboxworkflows)
# Read directly into memory
survey <- wbw_read_lidar('survey.las', file_mode = "m")
print(survey$file_path()) # prints: memory://lidar/...
Memory-backed lidar objects support the full matrix/data-frame API and all downstream operations:
library(whiteboxworkflows)
# Read into memory
survey <- wbw_read_lidar('survey.las', file_mode = "m")
# Inspect and process
meta <- survey$metadata()
cat('Points:', meta$point_count, '\n')
# Extract and edit points
pts <- survey$to_matrix(fields = c('x', 'y', 'z', 'classification'))
high <- pts[, 3] > 250
pts[high, 4] <- 6
# Write edits back to disk
edited <- survey$from_matrix(
pts,
output_path = 'survey_filtered.laz',
overwrite = TRUE,
fields = c('x', 'y', 'z', 'classification')
)
Lidar Memory Lifecycle
Memory-backed lidar objects persist until explicitly removed or cleared. For long-running lidar pipelines, manage memory explicitly:
library(whiteboxworkflows)
# Check current memory
cat('Lidar objects in memory:', wbw_lidar_memory_count(), '\n')
# Read point clouds
survey1 <- wbw_read_lidar('large1.las', file_mode = "m")
survey2 <- wbw_read_lidar('large2.las', file_mode = "m")
cat('After reads:', wbw_lidar_memory_count(), '\n')
# Remove when done
wbw_remove_lidar_from_memory(survey1)
cat('After remove:', wbw_lidar_memory_count(), '\n')
# Or clear all
wbw_clear_lidar_memory()
cat('After clear:', wbw_lidar_memory_count(), '\n')
Implicit Memory Output from Tools
All lidar-output tools store their result in memory automatically when the
output argument is omitted (NULL). You do not need to pass file_mode = "m"
or choose a temporary path — simply leave output out and the returned
wbw_lidar object is already memory-backed:
library(whiteboxworkflows)
wbe <- wbw_make_session()
survey <- wbw_read_lidar('survey.laz')
# No output path — result is stored in memory automatically
filtered <- wbe$filter_lidar_classes(input = survey$path, excluded_classes = list(7L))
cat(filtered$path, '\n') # prints: memory://lidar/...
# Chain operations without any intermediate files
thinned <- wbe$lidar_thin(input = filtered$path, resolution = 0.5)
cat(thinned$path, '\n') # also memory://lidar/...
# Persist the final result only
wbw_write_lidar(thinned, 'survey_clean.copc.laz')
This applies to all lidar tools. Providing an explicit output argument writes
to disk as before.
Best practices:
- Use
file_mode = "m"for intermediate point cloud processing. - Export memory-backed lidar to disk with
write()when persisting final outputs. - Call
remove_lidar_from_memory()after a point cloud is no longer needed. - Use
clear_lidar_memory()between independent analysis phases. - Use
wbw_clear_memory()when resetting all in-process raster/vector/lidar stores together. - Monitor
lidar_memory_count()for large processing jobs.
Iterating Through Lidar Points
Stable WbW-R lidar objects are file-backed and tool-oriented, with explicit columnar point access through matrix/data-frame APIs. Direct point-by-point iteration is still not the primary API path.
Recommended point-level workflow:
- Use
to_matrix()orto_data_frame()with selected point fields. - Apply vectorized edits in base R/tidy workflows.
- Write updates with
from_matrix(...)orfrom_data_frame(...).
The example below uses a simple reclassification rule to illustrate the matrix roundtrip pattern.
library(whiteboxworkflows)
l <- wbw_read_lidar('survey.las')
pts <- l$to_matrix(fields = c('x', 'y', 'z', 'classification'))
ground <- pts[, 4] == 2
pts[ground, 4] <- 6
edited <- l$from_matrix(
pts,
output_path = 'survey_reclassified.laz',
overwrite = TRUE,
fields = c('x', 'y', 'z', 'classification')
)
print(edited$point_count())
Tool-Driven Lidar Processing
Use tool-driven processing when extracting QA outputs and diagnostics from lidar datasets.
For complete lidar write-option keys and allowed values, see Output Controls.
library(whiteboxworkflows)
s <- wbw_session()
wbw_lidar_info(input = 'survey.las', output = 'survey_info.html')
Chunked Matrix Streaming
For very large point clouds, use chunked matrix streaming to avoid keeping the full point matrix in memory.
Recommended chunked workflow:
- Read chunks with
to_matrix_chunks(...). - Apply vectorized edits in each chunk.
- Write edited chunks with
from_matrix_chunks(...).
Use this when full-matrix operations would exceed available memory.
library(whiteboxworkflows)
l <- wbw_read_lidar('survey.las')
fields <- c('x', 'y', 'z', 'classification')
chunks <- l$to_matrix_chunks(chunk_size = 200000, fields = fields)
for (i in seq_along(chunks)) {
high <- chunks[[i]][, 3] > 250
chunks[[i]][high, 4] <- 6
}
edited <- l$from_matrix_chunks(
chunks,
output_path = 'survey_chunked_reclassified.laz',
overwrite = TRUE,
fields = fields
)
print(edited$point_count())
Notes:
- LAS/LAZ chunk outputs use shared core streaming rewrite.
- Other output formats currently fall back to non-streaming assembly in this API path.
Best Practices
- Validate CRS before and after reprojection.
- Keep source lidar immutable; write derived products to new files.
- Prefer COPC/LAZ outputs for large cloud workflows.
Lidar Object Method Reference
Metadata and Access
| Method | Description |
|---|---|
metadata | Return lidar metadata (bounds, point format, CRS, counts). |
point_count | Return total number of points. |
file_path, path | Return backing lidar path. |
get_short_filename | Return basename of lidar file. |
Matrix and Data-Frame Conversion
| Method | Description |
|---|---|
to_matrix | Read selected lidar fields as numeric matrix. |
to_data_frame | Read selected lidar fields as data frame. |
to_matrix_chunks | Read selected lidar fields in chunked matrix blocks. |
Writing Edited Point Data
| Method | Description |
|---|---|
from_matrix | Write edited matrix data to lidar output. |
from_data_frame | Write edited data frame fields to lidar output. |
from_matrix_chunks | Write chunked matrix edits to lidar output. |
Persistence
| Method | Description |
|---|---|
deep_copy | Copy lidar to a new path with optional write options. |
write | Write lidar to a new output path. |
Working with Sensor Bundles
This chapter documents supported sensor bundle families and common workflows.
Bundle APIs provide a common operational interface across heterogeneous sensor families. The conceptual goal is to standardize ingestion and inspection steps even when archive layout, naming conventions, or QA assets differ between providers.
Supported Families
- Generic auto-detect:
wbw_read_bundle(...) - Landsat:
wbw_read_landsat(...) - Sentinel-1 SAFE:
wbw_read_sentinel1(...) - Sentinel-2 SAFE:
wbw_read_sentinel2(...) - PlanetScope:
wbw_read_planetscope(...) - ICEYE:
wbw_read_iceye(...) - DIMAP:
wbw_read_dimap(...) - Maxar/WorldView:
wbw_read_maxar_worldview(...) - RADARSAT-2:
wbw_read_radarsat2(...) - RCM:
wbw_read_rcm(...)
Common Inspection Pattern
Start here to establish what each bundle contains before choosing analysis channels.
library(whiteboxworkflows)
b <- wbw_read_bundle('BUNDLE_ROOT')
print(b$family)
print(b$key_summary())
print(b$list_band_keys())
print(b$list_measurement_keys())
print(b$list_qa_keys())
print(b$list_asset_keys())
Family-Specific Examples
These examples follow one shared shape across providers: load, inspect, sample key channels, then generate QA-ready outputs.
Sentinel-2
Use this for optical band workflows where band identity is explicit.
s2 <- wbw_read_sentinel2('S2_SCENE.SAFE')
red <- s2$read_band('B04')
nir <- s2$read_band('B08')
rgb <- s2$write_true_colour('s2_true_colour.tif')
Landsat
Use this when metadata such as cloud cover and processing level drive filtering.
ls <- wbw_read_landsat('LC09_SCENE')
print(ls$processing_level())
print(ls$cloud_cover_percent())
preview <- ls$read_band(ls$list_band_keys()[[1]])
Sentinel-1 / SAR Families
Use this pattern for SAR measurement access and quick false-colour QA.
s1 <- wbw_read_sentinel1('S1_SCENE.SAFE')
print(s1$polarizations())
meas <- s1$read_measurement(s1$list_measurement_keys()[[1]])
fc <- s1$write_false_colour('s1_false_colour.tif')
PlanetScope / ICEYE / DIMAP / Maxar-WorldView / RADARSAT-2 / RCM
Use this loop for multi-provider intake checks with a consistent script shape.
loaders <- list(
wbw_read_planetscope,
wbw_read_iceye,
wbw_read_dimap,
wbw_read_maxar_worldview,
wbw_read_radarsat2,
wbw_read_rcm
)
paths <- list('PLANETSCOPE_SCENE', 'ICEYE_SCENE', 'DIMAP_SCENE', 'MAXAR_SCENE', 'RADARSAT2_SCENE', 'RCM_SCENE')
for (i in seq_along(loaders)) {
b <- loaders[[i]](paths[[i]])
print(c(b$family, b$bundle_root))
}
Recommended Workflow
- Open with family-specific reader when known.
- Inspect key groups with
key_summary()andlist_*_keys(). - Read representative channels via
read_any()or family-specific methods. - Generate preview/composite rasters for QA.
- Persist derived outputs and record source family + key choices.
Calibration Contract Notes (Landsat/Sentinel-2)
Remote-sensing radiometric and thermal tools in WbW-R now rely on a
standardized sensor-bundle calibration contract in wbraster.
- Sentinel-2 bundle metadata provides quantification values used for DN to TOA reflectance scaling.
- Landsat bundles provide typed per-band reflectance and thermal constants used in TOA reflectance and LST workflows.
For best results, keep original SAFE/MTL metadata with scene rasters when moving or staging bundle data for analysis.
Sensor Bundle Object Method Reference
Metadata and Key Discovery
| Method | Description |
|---|---|
metadata | Return bundle metadata (family, product descriptors, CRS hints). |
family, bundle_root, path | Return family ID and resolved bundle root/path. |
key_summary | Summarize available key groups and counts. |
list_band_keys, list_measurement_keys | List band/measurement keys. |
list_qa_keys, list_aux_keys, list_asset_keys | List QA, auxiliary, and asset keys. |
resolve_key, has_key | Resolve and verify key existence across key types. |
Raster Access by Key
| Method | Description |
|---|---|
read_any | Read key by searching configured key types. |
read_band | Read band key as raster. |
read_measurement | Read measurement key as raster. |
read_qa_layer, read_aux_layer, read_asset | Read QA/auxiliary/asset keys as rasters. |
read_preview_raster | Return selected preview raster descriptor. |
Composite Generation
| Method | Description |
|---|---|
write_true_colour | Write true-colour composite raster. |
write_false_colour | Write false-colour composite raster. |
Common Metadata Accessors
| Method | Description |
|---|---|
acquisition_datetime_utc | Return acquisition timestamp when available. |
processing_level, product_type | Return processing/product descriptors. |
tile_id, mission, acquisition_mode | Return common platform and acquisition descriptors. |
cloud_cover_percent, polarizations | Return cloud or polarization metadata when available. |
Output Controls
This chapter documents practical output controls for raster, vector, and lidar workflows in WbW-R.
Output configuration is where reproducibility is made explicit. Defaults are useful during exploration, but production scripts should pin extensions and format options so artifacts remain comparable across runs and environments. Treat this chapter as the policy layer for how outputs are persisted.
General Principles
- Start with defaults until explicit format constraints are required.
- Use explicit output extensions for reproducibility.
- Re-open outputs and validate metadata after writes.
Raster Output Controls
Raster objects expose write(...) and deep_copy(...) with optional options.
Use explicit raster options when output layout and compression behavior must be stable across environments.
library(whiteboxworkflows)
r <- wbw_read_raster('dem.tif')
# Default write
r$write('dem_default.tif', overwrite = TRUE)
# Write with options list
r$write(
'dem_cog.tif',
overwrite = TRUE,
options = list(
compress = TRUE,
strict_format_options = TRUE,
geotiff = list(
layout = 'cog',
tile_size = 512,
compression = 'deflate',
bigtiff = FALSE
)
)
)
Raster Write Option Reference
Raster write options are supplied as an R list. The current top-level keys
are:
compress: logical convenience switch for GeoTIFF-family outputs.strict_format_options: logical validation switch.geotiff: nested list for GeoTIFF / BigTIFF / COG-specific controls.jpeg2000: nested list for JPEG2000 (.jp2) controls.
compress
compress is a convenience flag used for GeoTIFF-family outputs.
TRUE: maps to GeoTIFFdeflatecompression.FALSE: maps to uncompressed GeoTIFF output.
Default behavior:
compressis unset by default (notTRUEand notFALSE).- For GeoTIFF-family outputs, an unset
compressfalls through to the GeoTIFF writer default compression, which isdeflate. - For non-GeoTIFF outputs,
compresshas no effect.
If geotiff$compression is also supplied, the explicit
geotiff$compression value takes precedence.
strict_format_options
strict_format_options must be TRUE or FALSE.
FALSE(default): GeoTIFF-specific options are ignored when writing a non-GeoTIFF output; JPEG2000-specific options are ignored when writing a non-.jp2output.TRUE: GeoTIFF-specific options on a non-GeoTIFF output path, or JPEG2000-specific options on a non-.jp2output path, raise an error.
jpeg2000
The nested jpeg2000 list supports these keys:
compression: character scalar compression mode.quality_db: numeric quality target in dB used whencompression = 'lossy'.decomp_levels: non-negative integer decode-resolution level hint (0to255).
Default values when keys are omitted:
compression:'lossy'.quality_db:35.0whencompression = 'lossy'and no explicitquality_dbis provided.decomp_levels: writer default (unset).
Supported jpeg2000$compression values:
'lossless''lossy'
Notes:
quality_dbis optional; when omitted withcompression = 'lossy', the writer default quality is used.- JPEG2000 color-space controls are not exposed in the R wrapper yet.
geotiff
The nested geotiff list supports these keys:
compression: character scalar naming the compression codec.bigtiff: logical.layout: character scalar naming the layout.rows_per_strip: positive integer used whenlayout = 'stripped'.tile_width: positive integer used whenlayout = 'tiled'.tile_height: positive integer used whenlayout = 'tiled'.tile_size: positive integer shortcut for COG tile size, and also accepted as a shortcut for both tile width and tile height whenlayout = 'tiled'.cog_tile_size: positive integer alias fortile_sizewhenlayout = 'cog'.
Default values when keys are omitted:
compression:'deflate'.bigtiff:FALSE.layout:'standard'.rows_per_strip:1whenlayout = 'stripped'.tile_width:512whenlayout = 'tiled'.tile_height: defaults totile_widthwhenlayout = 'tiled'.tile_size/cog_tile_size:512whenlayout = 'cog'.
Supported geotiff$compression values:
'none''off''uncompressed''deflate''zip''lzw''packbits''pack_bits''jpeg''webp''web_p''jpegxl''jpeg_xl''jxl'
These are accepted aliases for the same underlying codecs:
'none','off', and'uncompressed''deflate'and'zip''packbits'and'pack_bits''webp'and'web_p''jpegxl','jpeg_xl', and'jxl'
Supported geotiff$layout values:
'standard': default GeoTIFF writer behavior.'stripped': strip-organized GeoTIFF.'striped': alias for'stripped'.'tiled': tiled GeoTIFF.'cog': Cloud-Optimized GeoTIFF.
Layout-specific parameter behavior:
layout = 'standard': ignores strip/tile size keys.layout = 'stripped'or'striped': usesrows_per_strip. Default is1if omitted.layout = 'tiled': usestile_widthandtile_height.tile_widthdefaults to512if omitted.tile_heightdefaults totile_width.tile_sizeis accepted as a shortcut for both dimensions.layout = 'cog': usestile_sizeorcog_tile_size. Default is512if neither is supplied.
Extensionless Raster Outputs
If you omit the output extension, raster writes default to .tif. In that
case the wrapper also defaults the layout to COG unless you explicitly specify
another layout.
# Writes my_surface.tif and defaults to COG-style layout.
r$write('my_surface', overwrite = TRUE)
Practical Patterns
# Explicit uncompressed standard GeoTIFF
r$write(
'out_standard_uncompressed.tif',
overwrite = TRUE,
options = list(
compress = FALSE,
geotiff = list(layout = 'standard')
)
)
# Stripped GeoTIFF with 64 rows per strip
r$write(
'out_stripped.tif',
overwrite = TRUE,
options = list(
geotiff = list(layout = 'stripped', rows_per_strip = 64)
)
)
# Tiled GeoTIFF using a single tile_size shortcut
r$write(
'out_tiled.tif',
overwrite = TRUE,
options = list(
geotiff = list(layout = 'tiled', tile_size = 256)
)
)
# COG with explicit codec and BigTIFF toggle
r$write(
'out_cog.tif',
overwrite = TRUE,
options = list(
strict_format_options = TRUE,
geotiff = list(
layout = 'cog',
tile_size = 512,
compression = 'deflate',
bigtiff = FALSE
)
)
)
Memory Lifecycle and Cleanup
For workflows that use memory-backed rasters, vectors, and lidar objects
(file_mode = "m"), explicit lifecycle management prevents unbounded memory
growth in long-running jobs.
When to use memory mode
Memory mode is most valuable when:
- Chaining multiple operations on the same data without disk I/O.
- Processing intermediate results that are never persisted to disk.
- Running batched analysis where you load, process, and clear per batch.
- Working with smaller datasets where memory is not a constraint.
Avoid memory mode when:
- Working with data larger than available RAM.
- Processing single operations on large files.
- Running unattended long-running jobs without explicit cleanup.
Explicit cleanup in long-running pipelines
library(whiteboxworkflows)
# Long-running batch analysis
for (tile_id in 1:1000) {
cat('Processing tile', tile_id, '\n')
# Read data into memory for this tile
r <- wbw_read_raster(sprintf('tile_%d.tif', tile_id), file_mode = "m")
v <- wbw_read_vector(sprintf('bounds_%d.gpkg', tile_id), file_mode = "m")
# Process
result <- wbw_clip_raster_by_polygon(input = r$file_path(), polygon = v$file_path(),
output = sprintf('clipped_%d.tif', tile_id))
# Explicit cleanup before next iteration
wbw_remove_raster_from_memory(r)
wbw_remove_vector_from_memory(v)
}
Monitoring memory usage
For production scripts, track memory explicitly:
library(whiteboxworkflows)
cat('Initial raster memory:', wbw_raster_memory_bytes() / 1e6, 'MB\n')
cat('Initial vector memory:', wbw_vector_memory_bytes() / 1e6, 'MB\n')
# ... run operations ...
# Before returning or starting new phase
cat('Final raster count:', wbw_raster_memory_count(), '\n')
cat('Final raster memory:', wbw_raster_memory_bytes() / 1e6, 'MB\n')
# Explicit reset if needed
wbw_clear_memory()
cat('After clear:', wbw_raster_memory_count(), '\n')
Lidar Output Controls
Lidar objects expose write(...) and deep_copy(...) with optional options.
The standalone wbw_write_lidar() function persists a wbw_lidar result
returned by a tool call directly to disk.
When a session method is called without an output argument the result is
stored in memory automatically; pass it to wbw_write_lidar() to persist it:
library(whiteboxworkflows)
wbe <- wbw_make_session()
survey <- wbw_read_lidar('survey.laz')
# Omit output — result is memory-backed automatically
filtered <- wbe$filter_lidar_classes(input = survey$path, excluded_classes = list(7L))
cat(filtered$path, '\n') # memory://lidar/...
# Persist when ready
wbw_write_lidar(filtered, 'survey_clean.copc.laz')
Write options for wbw_write_lidar() and l$write():
Use these options to tune archive size, cloud-read behavior, and downstream compatibility.
library(whiteboxworkflows)
l <- wbw_read_lidar('survey.las')
# LAZ controls
l$write(
'survey_out.laz',
overwrite = TRUE,
options = list(
laz = list(
chunk_size = 25000,
compression_level = 7
)
)
)
# COPC controls
l$write(
'survey_out.copc.laz',
overwrite = TRUE,
options = list(
copc = list(
max_points_per_node = 75000,
max_depth = 8,
node_point_ordering = 'hilbert'
)
)
)
Lidar Write Option Reference
For lidar writes, the options list supports these top-level keys:
laz: nested list with LAZ writer controls.copc: nested list with COPC hierarchy controls.
laz
Supported keys:
chunk_size: positive integer (> 0).compression_level: integer in the range0to9.
Default values when keys are omitted:
chunk_size:50000.compression_level:6.
copc
Supported keys:
max_points_per_node: positive integer (> 0).max_depth: positive integer (> 0).node_point_ordering: one of:'auto''morton''hilbert'
Default values when keys are omitted:
max_points_per_node:100000.max_depth:8.node_point_ordering:'auto'.
Notes:
- If no output extension is provided, lidar writes default to
.copc.laz. - COPC options are relevant when writing COPC output (
.copc.laz/.copc.las).
# Extensionless output defaults to COPC
l$write(
'survey_out',
overwrite = TRUE,
options = list(
copc = list(
max_points_per_node = 75000,
max_depth = 8,
node_point_ordering = 'hilbert'
)
)
)
# Explicit LAZ controls
l$write(
'survey_out.laz',
overwrite = TRUE,
options = list(
laz = list(
chunk_size = 25000,
compression_level = 7
)
)
)
Vector Output Controls
wbw_write_vector(...) persists a wbw_vector object to disk. When a session
method is called without an output argument, the result is automatically
stored in memory and can be written to disk with wbw_write_vector().
library(whiteboxworkflows)
wbe <- wbw_make_session()
roads <- wbw_read_vector('roads.gpkg')
# Omit output — result is memory-backed automatically
centroids <- wbe$centroid_vector(input = roads$path)
cat(centroids$path, '\n') # memory://vector/...
# Persist when ready
wbw_write_vector(centroids, 'roads_centroids.gpkg')
# Or supply output explicitly to write directly to disk
wbe$centroid_vector(input = roads$path, output = 'roads_centroids_direct.gpkg')
Vector Write Option Reference
For vector writes, the options list supports these keys:
strict_format_options: logical validation switch.geoparquet: nested list with GeoParquet writer controls.
strict_format_options
FALSE(default): format-specific controls are ignored when they do not apply to the selected output format.TRUE: format-specific controls on incompatible output formats raise an error.
geoparquet
Supported keys:
max_rows_per_group: positive integer.data_page_size_limit: positive integer.write_batch_size: positive integer.data_page_row_count_limit: positive integer.compression: character scalar.
Default values when keys are omitted:
max_rows_per_group:1_048_576.data_page_size_limit: Parquet library default page size.write_batch_size: Parquet library default write batch size.data_page_row_count_limit: Parquet library default row-count limit.compression: Parquet library default compression codec.
Supported geoparquet$compression values:
'none''snappy''gzip''lz4''zstd''brotli'
Notes:
- GeoParquet controls are only applied for
.parquetoutputs. - If no output extension is provided, vector writes default to
.gpkg.
wbw_write_vector(
buffered,
'roads.parquet',
options = list(
strict_format_options = TRUE,
geoparquet = list(
compression = 'zstd',
max_rows_per_group = 250000,
data_page_size_limit = 1048576,
write_batch_size = 8192,
data_page_row_count_limit = 20000
)
)
)
Reproducibility Checklist
- Pin output extension explicitly.
- Capture option list values in scripts.
- Verify metadata after write (
metadata()and CRS values). - Keep source files immutable; write derived outputs separately.
Supported Data Formats
This chapter summarizes practical format support exposed through WbW-R.
Choosing formats is a workflow architecture decision, not just a file-extension choice. You should evaluate read/write support together with ecosystem fit, compression behavior, and long-term maintainability of outputs shared across toolchains.
Backend support comes from core crates:
- Raster:
wbraster - Vector:
wbvector - Lidar:
wblidar
Raster Formats
Exhaustive raster format support in the current WbW-R build:
| Format | Read (wbw_read_raster) | Write (wbw_write_raster) | Common extensions / path rules |
|---|---|---|---|
| DTED | Yes | Yes | .dt0, .dt1, .dt2 (DTED 0, 1, 2 elevation data; WGS-84 geographic only) |
| Esri ASCII Grid | Yes | Yes | .asc (and .grd when detected as ASCII) |
| Esri Binary Grid workspace | Yes | Backend-only | Esri Binary workspace directory (hdr.adf + w001001.adf) or .adf |
| Esri Float Grid | Yes | Yes | .flt, .hdr (single-band float grid with header file) |
| ERDAS IMAGINE (HFA) | Yes | No | .img - read-only MVP; RLC (run-length) compression supported |
| GRASS ASCII Raster | Yes | Yes | .txt / .asc when GRASS header keys are detected |
| Surfer GRD | Yes | Yes | .grd (DSAA / DSRB signatures) |
| PCRaster | Yes | Yes | .map (CSF signature) |
| SAGA Binary Grid | Yes | Yes | .sdat, .sgrd |
| Idrisi / TerrSet Raster | Yes | Yes | .rst, .rdc |
| ER Mapper | Yes | Yes | .ers |
| ENVI HDR-labelled raster | Yes | Yes | .hdr, or data files (.img, .dat, .bin, .raw, .bil, .bsq, .bip) with .hdr sidecar |
| GeoTIFF / BigTIFF / COG | Yes | Yes | .tif, .tiff |
| GeoPackage raster | Yes | Yes | .gpkg |
| JPEG2000 / GeoJP2 | Yes | Yes | .jp2 |
| JPEG + World File | Yes | Yes | .jpg, .jpeg with .jgw, .jpgw, .jpegw, or .wld world file |
| PNG + World File | Yes | Yes | .png with .pgw, .pngw, or .wld world file |
| Zarr | Yes | Yes | .zarr store (directory / suffix) |
| XYZ ASCII Grid | Yes | Yes | .xyz (whitespace or comma-delimited X Y Z points) |
Typical pattern:
library(whiteboxworkflows)
r <- wbw_read_raster('dem.tif')
wbw_write_raster(r, 'dem_out.tif')
Vector Formats
Exhaustive vector format support in the current WbW-R build:
| Format | Read (wbw_read_vector) | Write (wbw_write_vector) | Extensions / notes |
|---|---|---|---|
| FlatGeobuf | Yes | Yes | .fgb |
| GeoJSON | Yes | Yes | .geojson, .json |
| TopoJSON | Yes | Yes | .topojson |
| GeoPackage | Yes | Yes | .gpkg |
| GeoParquet | Yes | Yes | .parquet |
| GML | Yes | Yes | .gml |
| GPX | Yes | Yes | .gpx |
| KML | Yes | Yes | .kml |
| KMZ | Yes | Yes | .kmz |
| MapInfo Interchange | Yes | Yes | .mif with .mid sidecar |
| OSM PBF | Yes | No | .osm.pbf (read workflows only) |
| ESRI Shapefile | Yes | Yes | .shp plus dataset sidecars |
When wbw_write_vector(...) is called without an extension, WbW-R defaults output to .gpkg.
Typical pattern:
library(whiteboxworkflows)
v <- wbw_read_vector('roads.gpkg')
wbw_write_vector(v, 'roads_out.gpkg')
Lidar Formats
Exhaustive lidar format support in the current WbW-R build:
| Format | Read (wbw_read_lidar) | Write (wbw_write_lidar) | Extensions / notes |
|---|---|---|---|
| LAS | Yes | Yes | .las |
| LAZ | Yes | Yes | .laz |
| COPC | Yes | Yes | .copc.las, .copc.laz |
| PLY | Yes | Yes | .ply |
| E57 | Yes | Yes | .e57 |
When wbw_write_lidar(...) is called without an extension, WbW-R defaults output to .copc.laz.
Typical pattern:
library(whiteboxworkflows)
l <- wbw_read_lidar('survey.las')
wbw_write_lidar(l, 'survey_out.copc.laz')
Sensor Bundle Families
Supported bundle readers include:
wbw_read_bundle(...)(auto-detect)wbw_read_landsat(...)wbw_read_sentinel1(...)wbw_read_sentinel2(...)wbw_read_planetscope(...)wbw_read_iceye(...)wbw_read_dimap(...)wbw_read_maxar_worldview(...)wbw_read_radarsat2(...)wbw_read_rcm(...)
Bundle inputs may be either extracted directories or supported archives:
.zip.tar.tar.gz.tgz
See Working with Sensor Bundles for family-specific examples.
Validation Guidance
- Prefer stable interchange formats (
.tif,.gpkg,.copc.laz) for production pipelines. - Re-open outputs and verify metadata after write operations.
- Use explicit options where format behavior must be reproducible.
Reprojection and CRS
This chapter covers reprojection and CRS validation workflows in WbW-R.
CRS operations are correctness-critical. A workflow can run successfully while still producing invalid spatial interpretation if source and destination reference systems are misunderstood. The patterns here prioritize explicit CRS inspection, controlled reprojection calls, and immediate validation of outputs.
Inspect CRS
Run this check before any reprojection to catch missing or incorrect source CRS assumptions.
library(whiteboxworkflows)
r <- wbw_read_raster('dem.tif')
v <- wbw_read_vector('roads.gpkg')
l <- wbw_read_lidar('survey.las')
print(r$crs_epsg())
print(v$crs_epsg())
print(l$crs_epsg())
Assigning Projection Metadata
Projection assignment and reprojection are different operations:
- Assignment updates CRS metadata only.
- Reprojection changes coordinate values.
In current WbW-R, direct object-level CRS assignment helpers are not exposed in the same way as WbW-Py object methods. The practical assignment pattern is to use R spatial libraries for metadata repair, then re-open data in WbW-R.
library(whiteboxworkflows)
library(terra)
library(sf)
# Raster CRS assignment (metadata only)
r <- rast('dem_without_crs.tif')
crs(r) <- 'EPSG:26917'
writeRaster(r, 'dem_with_crs.tif', overwrite = TRUE)
# Vector CRS assignment (metadata only)
v <- st_read('roads_without_crs.gpkg', quiet = TRUE)
v <- st_set_crs(v, 26917)
st_write(v, 'roads_with_crs.gpkg', delete_dsn = TRUE, quiet = TRUE)
# Re-open in WbW-R for downstream analysis
r_wbw <- wbw_read_raster('dem_with_crs.tif')
v_wbw <- wbw_read_vector('roads_with_crs.gpkg')
print(r_wbw$crs_epsg())
print(v_wbw$crs_epsg())
If you need coordinate changes, use reprojection workflows in the next sections rather than metadata assignment.
Raster Reprojection Pattern
The core raster API provides six reprojection method patterns (documented here so behavior is explicit across language bindings):
- Full-options reprojection (
reproject) - Nearest convenience (
reproject_nearest) - Bilinear convenience (
reproject_bilinear) - Reproject to match another raster grid (
reproject_to_match_grid) - Reproject to match another raster resolution (
reproject_to_match_resolution) - Reproject to target EPSG while matching a reference resolution
(
reproject_to_match_resolution_in_epsg)
In WbW-R, practical workflows typically call reprojection tools through
wbw_<tool>(...) wrappers (or wbw_run_tool(...) for dynamic tool-id workflows)
and then reopen outputs as typed objects.
Available resampling methods (wbraster)
Use these method strings in reprojection workflows:
nearestbilinearcubiclanczosaverageminmaxmodemedianstddev
Method guidance:
- Categorical/class rasters:
nearest(ormodewhere majority behavior is desired). - Continuous rasters:
bilinear,cubic, orlanczos. - Statistical downscaling/generalization:
average,min,max,median,stddev.
Example: explicit raster reprojection
library(whiteboxworkflows)
s <- wbw_session()
wbw_reproject_raster(input = 'dem.tif',
output = 'dem_utm.tif',
epsg = 32618,
method = 'bilinear')
dem_utm <- wbw_read_raster('dem_utm.tif')
print(dem_utm$crs_epsg())
Example: match-grid categorical reprojection
library(whiteboxworkflows)
s <- wbw_session()
wbw_reproject_raster(input = 'landcover_4326.tif',
output = 'landcover_utm_aligned.tif',
epsg = 32618,
method = 'nearest')
Automatic reprojection in raster-stack tools
Stack-based tools now support automatic alignment controls:
auto_reproject(defaulttrue)auto_reproject_method(optional override)
Behavior for raster stacks:
inputs[0]/input_rasters[0]is the reference raster.- CRS-mismatched stack members are auto-reprojected to the reference grid when
auto_reproject=true. - If
auto_reproject_methodis not set:- categorical rasters infer
nearest - continuous rasters infer
bilinear
- categorical rasters infer
- Non-overlapping extents are treated as hard validation errors.
This matters most for tools that combine raster stacks (overlay, weighted sum, PCA, inverse PCA, raster calculator, segmentation).
library(whiteboxworkflows)
s <- wbw_session()
wbw_weighted_sum(input_rasters = c('slope_utm.tif', 'landcover_4326.tif', 'distance_utm.tif'),
weights = c(0.4, 0.35, 0.25),
auto_reproject = TRUE,
auto_reproject_method = '',
output = 'weighted_sum.tif')
Vector Reprojection Pattern
Use this when downstream geometry processing depends on a specific projected CRS.
library(whiteboxworkflows)
s <- wbw_session()
wbw_reproject_vector(input = 'roads.gpkg', output = 'roads_utm.gpkg', epsg = 32618)
roads_utm <- wbw_read_vector('roads_utm.gpkg')
print(roads_utm$crs_epsg())
Lidar Reprojection Pattern
Use this when point-cloud alignment and metric operations require a target CRS.
library(whiteboxworkflows)
s <- wbw_session()
wbw_reproject_lidar(input = 'survey.las', output = 'survey_utm.laz', epsg = 32618)
survey_utm <- wbw_read_lidar('survey_utm.laz')
print(survey_utm$crs_epsg())
Georeference Raster from Control Points
Use this when a raster/image lacks reliable georeferencing and you have control points mapping pixel coordinates to map coordinates.
Required CSV fields:
source_colsource_rowtarget_xtarget_y
library(whiteboxworkflows)
s <- wbw_session()
wbw_georeference_raster_from_control_points(input = 'historical_scan.tif',
control_points = 'historical_scan_gcps.csv',
epsg = 32618,
resample = 'bilinear',
output = 'historical_scan_georef.tif',
report = 'historical_scan_georef_report.json')
Projection Utility Functions
These functions provide CRS diagnostics and point-level coordinate transforms outside of full dataset reprojection workflows.
WKT and EPSG identification
library(whiteboxworkflows)
# Convert EPSG to OGC WKT.
wkt <- wbw_projection_to_ogc_wkt(32618)
cat(wkt, '\n')
# Identify EPSG from WKT or CRS text.
epsg <- wbw_projection_identify_epsg(wkt)
print(epsg) # 32618
# Reproject a batch of points.
pts <- data.frame(x = -79.3832, y = 43.6532)
result <- wbw_projection_reproject_points(pts, src_epsg = 4326L, dst_epsg = 32618L)
print(result)
Parse a PROJ string
Use wbw_projection_from_proj_string when you have a PROJ4-style string from a
legacy file header or third-party metadata source and need the corresponding
EPSG code or OGC WKT.
The function returns a named list with exactly one element:
list(epsg = integer)— EPSG code identifiedlist(wkt = character)— no EPSG match, WKT representation availablelist(unknown = TRUE)— PROJ string parsed but CRS could not be resolved
library(whiteboxworkflows)
proj_str <- '+proj=utm +zone=17 +datum=NAD83 +units=m +no_defs'
result <- wbw_projection_from_proj_string(proj_str)
if (!is.null(result$epsg)) {
cat('Identified EPSG:', result$epsg, '\n') # e.g. 26917
} else if (!is.null(result$wkt)) {
cat('WKT:', result$wkt, '\n')
} else {
cat('CRS unknown\n')
}
This is the recommended approach for legacy rasters or vectors whose metadata
carries only a PROJ4 string. WbW-R uses this path internally in
wbw_projection_identify_epsg as the third fallback step.
Area-of-use bounding box
Use wbw_projection_area_of_use to retrieve the geographic domain of valid use
for an EPSG code. This is useful for validating that data falls within the CRS
before or after reprojection.
Returns a named list list(lon_min, lat_min, lon_max, lat_max), or NULL if no
bounding box is registered for the code.
library(whiteboxworkflows)
bbox <- wbw_projection_area_of_use(32618) # UTM Zone 18N
if (!is.null(bbox)) {
cat(sprintf('valid lon: %.1f to %.1f\n', bbox$lon_min, bbox$lon_max))
cat(sprintf('valid lat: %.1f to %.1f\n', bbox$lat_min, bbox$lat_max))
}
# Returns NULL for unregistered codes.
print(wbw_projection_area_of_use(9999)) # NULL
Best Practices
- Confirm source CRS before transformation.
- Use interpolation appropriate to data type for raster reprojection.
- Re-open outputs and verify CRS metadata.
- Keep transform arguments explicit in reproducible scripts.
Topology Utilities
WbW-R currently emphasizes topology through tool workflows (category-driven) rather
than a dedicated R-native topology utility namespace equivalent to Python.
At the same time, session-level topology helpers provide a fast path for geometry QA checks and validation gates before heavier vector operations.
Topology Workflow Pattern
A robust topology-first script pattern is:
- Validate CRS compatibility first.
- Run fast predicate checks to detect obvious incompatibilities.
- Repair invalid polygon geometries if needed.
- Re-run critical predicates after repair.
- Continue into heavier vector processing only after checks pass.
This keeps failures early, localized, and easier to diagnose.
Session-Level Topology Predicate Checks
Use these methods when you need script-level yes/no checks on WKT geometries.
library(whiteboxworkflows)
s <- wbw_session()
poly <- 'POLYGON((0 0,10 0,10 10,0 10,0 0))'
pt <- 'POINT(5 5)'
print(s$topology_contains_wkt(poly, pt))
print(s$topology_intersects_wkt(poly, pt))
print(s$topology_within_wkt(pt, poly))
print(s$topology_touches_wkt(poly, pt))
print(s$topology_disjoint_wkt(poly, pt))
Topology via Tool Workflows
Use session execution and topology/geometry tool IDs through category discovery.
library(whiteboxworkflows)
s <- wbw_session()
# Discover likely topology-related tools
hits <- wbw_search_tools('topology')
print(hits)
# Inspect a specific candidate tool
if (length(hits) > 0) {
first_hit <- hits[[1]]
tool_id <- if (is.list(first_hit) && !is.null(first_hit$tool_id)) first_hit$tool_id else as.character(first_hit)
print(wbw_describe_tool(tool_id))
}
Use this pattern when topology checks are part of larger, file-based vector pipelines that should remain in Whitebox tooling end to end.
Vector Topology Pattern
library(whiteboxworkflows)
s <- wbw_session()
# Example pattern: run a topology-oriented vector tool once selected.
# Replace 'tool_id_here' and args with the concrete tool from discovery.
# wbw_run_tool(
# 'tool_id_here',
# args = list(input = 'input.gpkg', output = 'output.gpkg'),
# session = s
# )
Use this template after selecting a concrete tool ID through discovery.
Geometry Validation and Repair
Use session helpers for pure WKT checks and repairs.
library(whiteboxworkflows)
s <- wbw_session()
invalid <- 'POLYGON((0 0,4 4,4 0,0 4,0 0))'
print(s$topology_is_valid_polygon_wkt(invalid))
fixed <- s$topology_make_valid_polygon_wkt(invalid)
print(fixed)
buf <- s$topology_buffer_wkt('LINESTRING(0 0, 10 0)', 1.5)
print(buf)
For broader in-memory feature editing, an sf interop path is still practical:
library(whiteboxworkflows)
library(sf)
v <- wbw_read_vector('polygons.gpkg')
g <- v$to_sf()
valid_flags <- st_is_valid(g)
print(table(valid_flags))
g_fixed <- st_make_valid(g)
st_write(g_fixed, 'polygons_valid.gpkg', delete_dsn = TRUE, quiet = TRUE)
Relationship and Distance
Use relation/distance methods when binary predicates are not expressive enough.
library(whiteboxworkflows)
s <- wbw_session()
a <- 'LINESTRING(0 0, 10 0)'
b <- 'LINESTRING(0 1, 10 1)'
print(s$topology_distance_wkt(a, b))
print(s$topology_relate_wkt(a, b))
Topology Method Reference
| Session Method | Description |
|---|---|
topology_intersects_wkt | Return TRUE when two geometries share any space. |
topology_contains_wkt | Return TRUE when geometry A strictly contains geometry B. |
topology_within_wkt | Return TRUE when geometry A is strictly within geometry B. |
topology_touches_wkt | Return TRUE when geometries meet at boundaries only. |
topology_disjoint_wkt | Return TRUE when geometries do not intersect. |
topology_crosses_wkt | Return TRUE when geometries cross with dimensional reduction behavior. |
topology_overlaps_wkt | Return TRUE when same-dimension geometries partially overlap. |
topology_covers_wkt | Boundary-aware containment test (A covers B). |
topology_covered_by_wkt | Boundary-aware containment test (A covered by B). |
topology_relate_wkt | Return DE-9IM relationship text for exact topology-rule evaluation. |
topology_distance_wkt | Return shortest distance between geometries. |
topology_vector_feature_relation | Evaluate relation between indexed features in vector objects. |
topology_is_valid_polygon_wkt | Check polygon validity before topology-sensitive workflows. |
topology_make_valid_polygon_wkt | Repair an invalid polygon WKT representation. |
topology_buffer_wkt | Create a buffered geometry from WKT and distance. |
Guidance
- Use
wbw_search_tools(...)+wbw_describe_tool(...)to select backend topology tools. - Use session topology helpers for fast script-level predicates and repairs.
- Use
sffor broader in-memory feature editing when needed. - Re-open outputs with
wbw_read_vector(...)and verify schema/CRS after topology operations.
Interoperability
This chapter provides practical roundtrip patterns between WbW-R and R spatial tooling.
Interoperability should be treated as deliberate boundary crossing. Each conversion step can affect metadata fidelity, CRS representation, numeric precision, and schema details. The examples here emphasize explicit handoff points and validation checkpoints so multi-package workflows remain defensible.
Copy-Boundary Model
- Array exchange via
to_array()andwbw_array_to_raster(...)is an explicit in-memory boundary. - terra/stars/sf workflows are typically file or object conversion boundaries.
- Always validate metadata after roundtrip.
terra Roundtrip
Use this when your raster workflow depends on terra-native functions.
library(whiteboxworkflows)
library(terra)
r <- wbw_read_raster('dem.tif')
terra_r <- r$to_terra()
# terra-side operation
terra_r2 <- terra::focal(terra_r, w = 3, fun = mean, na.rm = TRUE)
terra::writeRaster(terra_r2, 'dem_terra_smoothed.tif', overwrite = TRUE)
r_back <- wbw_read_raster('dem_terra_smoothed.tif')
print(r_back$metadata())
stars Roundtrip
Use this for labeled-array operations and grid math in stars workflows.
library(whiteboxworkflows)
library(stars)
r <- wbw_read_raster('dem.tif')
st <- r$to_stars()
# stars-side operation
st2 <- st * 1.05
st_as_stars <- st_as_stars(st2)
write_stars(st_as_stars, 'dem_stars_scaled.tif', driver = 'GTiff')
r_back <- wbw_read_raster('dem_stars_scaled.tif')
print(r_back$metadata())
sf Roundtrip (Vector)
Use this when vector editing and validity checks are more convenient in sf.
library(whiteboxworkflows)
library(sf)
v <- wbw_read_vector('roads.gpkg')
sf_obj <- v$to_sf()
# sf-side edit
sf_obj$len_m <- as.numeric(st_length(sf_obj))
sf_obj <- sf_obj[sf_obj$len_m > 20, ]
st_write(sf_obj, 'roads_sf_filtered.gpkg', delete_dsn = TRUE, quiet = TRUE)
v_back <- wbw_read_vector('roads_sf_filtered.gpkg')
print(v_back$schema())
Validation Checklist
- Re-check CRS and bounds after conversion.
- Re-check schema and representative attributes for vector flows.
- Prefer stable interchange formats (
.tif,.gpkg) for routine roundtrips.
Licensing
This chapter documents licensing modes, tier models, and interactive activation workflows in WbW-R.
Licensing mode is an operational dependency that should be explicit in scripts. The objective is to make startup behavior predictable and auditable: define which mode is expected, how fallback is handled, and what diagnostics are captured when activation fails.
License Tiers
Whitebox NG is available in two tiers:
-
Open Tier (
open): Governed by MIT/Apache 2.0 dual licensing. All Open-tier tools are free and open-source with no entitlement required. -
Pro Tier (
pro): Proprietary commercial software. Pro-tier tools require activation with a valid license key and are subject to End-User License Agreement (EULA) terms.
Open Mode
Use this mode for OSS-only workflows or environments without entitlement needs. No activation required.
library(whiteboxworkflows)
s <- wbw_session()
print(s)
Interactive License Management
For end users and interactive workflows, activate and manage Pro licenses directly within R. Activation persists local license state so subsequent runs automatically load the license without re-entry.
Activating a License
library(whiteboxworkflows)
# User calls activate with their license key
result <- wbw_activate_license(
key = 'YOUR_LICENSE_KEY',
firstname = 'John',
lastname = 'Smith',
email = 'john@example.com',
agree_to_license_terms = TRUE
# Optional: provider_url, machine_id, customer_id
)
print(result) # Activation confirmation message
What happens:
- Server validates the key and issues a signed entitlement.
- Entitlement is verified and persisted to
~/.whitebox/wbw_ng_license_state.json. - Subsequent
wbw_session()calls automatically load local state. - If local state is expired or invalid, fallback to open tier.
Checking License Status
library(whiteboxworkflows)
info <- wbw_license_info()
print(info)
# List with fields:
# $valid: TRUE
# $effective_tier: "pro"
# $seconds_remaining: 2592000
# $expires_at_unix: 1234567890
# $now_unix: 1234567890
Querying Time Remaining Directly
Use the dedicated helper when you only need remaining time values:
library(whiteboxworkflows)
remaining <- wbw_license_time_remaining()
print(remaining)
# List with fields:
# $active: TRUE
# $valid: TRUE
# $seconds_remaining: 2592000
# $days_remaining: 30
# $expires_at_unix: 1234567890
# $now_unix: 1234567890
If no local license exists, the call returns active = FALSE with
seconds_remaining = 0 and days_remaining = 0.
Transferring a License
To move a license to another machine, call transfer which returns a portable payload and clears local state:
library(whiteboxworkflows)
payload <- wbw_transfer_license()
print(payload) # Contains activation credentials for the destination machine
# Local state is now cleared on this machine
Deactivating a License
library(whiteboxworkflows)
result <- wbw_deactivate_license()
print(result) # Confirmation message
# Local state is cleared; future runs fall back to open tier
Local State Persistence
Active license state is stored at ~/.whitebox/wbw_ng_license_state.json (or
override via WBW_LICENSE_STATE_PATH environment variable). On each startup:
- If local state exists and is valid, it is automatically loaded.
- If local state is expired or missing, the runtime falls back to open tier.
- You do not need to re-authenticate on every run once activated.
Programmatic Modes: Signed Entitlement and Floating License
For automated or managed deployments, use programmatic licensing modes where entitlements are supplied directly at runtime.
Signed Entitlement Mode
Use this for managed deployments with entitlement payload verification.
library(whiteboxworkflows)
signed_entitlement_json <- '...'
s <- wbw_session(
signed_entitlement_json = signed_entitlement_json,
public_key_kid = 'k1',
public_key_b64url = 'REPLACE_WITH_PROVIDER_KEY',
include_pro = TRUE,
tier = 'open'
)
print(s)
Floating License Mode
Use this for centrally managed license allocation across users or machines.
library(whiteboxworkflows)
s <- wbw_session(
floating_license_id = 'fl_12345',
include_pro = TRUE,
tier = 'open',
provider_url = 'https://license.example.com',
machine_id = 'machine-01',
customer_id = 'customer-abc'
)
print(s)
Failure Handling Guidance
- Validate session creation at script startup and fail early.
- Capture and log runtime startup errors for entitlement/floating modes.
- Use open mode fallback only when policy allows.
Security and Operations Notes
- Keep entitlement payloads and keys out of source control.
- Prefer environment-variable or secret-store injection.
- Record runtime version and startup mode for reproducibility.
API Reference Strategy
Manual chapters provide narrative and recipes, and now include a dedicated API reference section near the end of the manual.
This separation remains intentional:
- workflow chapters focus on design and usage patterns
- API chapters focus on argument contracts and callable surfaces
Detailed tool-level contracts are sourced from shared generated tool docs to minimize drift.
Reference Boundaries
- This manual focuses on concepts, workflow patterns, and runnable examples.
- This manual now also includes API chapters for non-tool facade/session APIs and tool wrappers.
- Source-of-truth tool contracts remain in shared generated tool docs.
Navigation
- Discovery and execution patterns: Session and Discovery
- Data-object workflows: Working with Rasters, Working with Vectors, Working with Lidar
- Concrete runnable scripts: Script Index
- API-first lookup: API Reference
Terrain Analysis and Geomorphometry
Digital terrain analysis in WbW-R encompasses the full range of operations from surface derivatives (slope, aspect, curvature) through multi-scale geomorphometric indices and geomorphological classification. All computation is performed by the Whitebox backend; this chapter shows how to wire those tools into reproducible R workflows.
Core Concepts
Terrain analysis relies on these fundamental concepts:
- Slope: The gradient of the land surface, typically expressed in degrees (0–90) or percent. High values indicate steep terrain; low values indicate flat terrain. Critical for erosion, landslide, and hydrology models.
- Aspect: Compass direction a slope faces (0–360°, measured clockwise from north). Flat cells are typically -1 or nodata. Controls solar radiation, drainage direction, and habitat quality.
- Curvature: Rate of change of slope (usually planform and profile separately). Positive profile curvature indicates acceleration zones (ridges); negative indicates deceleration zones (valleys).
- Flow direction: The steepest downslope direction from each cell. Forms the basis for flow accumulation, drainage network delineation, and watershed boundaries.
- Flow accumulation: Number of upslope cells draining to each cell, proportional to contributing area. High values indicate stream channels and valley bottoms.
- Topographic Wetness Index (TWI): Ln(upslope area / tan(slope)), predicts persistent moisture. High TWI indicates probable saturated zones; used in soil moisture and flood risk mapping.
- Landform classification: Categorizing terrain into types (e.g. summits, ridges, valleys, footslopes) via multivariate analysis. Provides interpretable terrain structure without tuning thresholds.
- Multiscale analysis: Deriving terrain metrics at multiple scales. Single-scale derivatives can miss important structure; multiscale approaches reveal process-relevant scales.
- Viewshed: Set of cells visible from a vantage point. Used in landscape perception, military analysis, and wind farm siting.
Session Setup
library(whiteboxworkflows)
s <- wbw_session()
# Set working directory for relative file paths
setwd('/data/terrain')
Reading a DEM
dem <- wbw_read_raster('dem.tif')
meta <- dem$metadata()
cat('Rows:', meta$rows, ' Cols:', meta$columns, '\n')
cat('Cell size:', meta$resolution_x, 'm\n')
cat('NoData:', meta$nodata, '\n')
Surface Derivatives
Slope
# Slope in degrees
slope_deg <- wbw_slope(dem = dem$file_path(),
output = 'slope_deg.tif',
units = 'degrees',
z_factor = 1.0)
slope <- wbw_read_raster('slope_deg.tif')
Aspect
wbw_aspect(dem = dem$file_path(),
output = 'aspect.tif',
zero_aspect = FALSE)
Hillshade
wbw_hillshade(dem = dem$file_path(),
output = 'hillshade.tif',
azimuth = 315.0,
altitude = 30.0)
Profile Curvature, Plan Curvature, Tangential Curvature
wbw_profile_curvature(dem = dem$file_path(), output = 'profc.tif')
wbw_plan_curvature(dem = dem$file_path(), output = 'planc.tif')
wbw_tangential_curvature(dem = dem$file_path(), output = 'tangc.tif')
Mean Curvature and Other Modes
wbw_mean_curvature(dem = dem$file_path(), output = 'meanc.tif')
wbw_minimal_curvature(dem = dem$file_path(), output = 'minc.tif')
wbw_maximal_curvature(dem = dem$file_path(), output = 'maxc.tif')
wbw_gaussian_curvature(dem = dem$file_path(), output = 'gaussc.tif')
Topographic Wetness and Flow Accumulation
wbw_wetness_index(sca = 'sca.tif',
slope = 'slope_deg.tif',
output = 'twi.tif')
Computing the specific contributing area (SCA) first:
wbw_d_inf_flow_accum(dem = dem$file_path(),
output = 'sca.tif',
out_type = 'sca',
threshold = 0.0,
log = FALSE,
clip = FALSE)
Relief and Position Indices
Relative Topographic Position
wbw_relative_topographic_position(dem = dem$file_path(),
output = 'rtp.tif',
filterx = 101,
filtery = 101)
TPI, Deviation from Mean, Scale Standardised Elevation
wbw_topographic_position_index(dem = dem$file_path(),
output = 'tpi.tif',
minrad = 1.0,
maxrad = 25.0,
steps = 10,
num_sig_digits = 3)
wbw_deviation_from_mean_elevation(dem = dem$file_path(),
output = 'dev_mean.tif',
filterx = 11,
filtery = 11)
wbw_elev_above_pit(dem = dem$file_path(),
output = 'elev_above_pit.tif')
Multi-Scale Roughness and Complexity
wbw_multiscale_roughness(dem = dem$file_path(),
out_mag = 'ms_rough_mag.tif',
out_scale = 'ms_rough_scale.tif',
min_scale = 1,
max_scale = 100,
step = 1)
wbw_vector_ruggedness_measure(dem = dem$file_path(),
output = 'vrm.tif',
filterx = 11,
filtery = 11)
wbw_ruggedness_index(dem = dem$file_path(),
output = 'tri.tif')
Terrain Smoothing
DEM-derived curvature, landform classes, and terrain-position indices can be overly sensitive to short-range roughness. Whitebox Next Gen now includes a multiscale feature-preserving smoother that is better aligned with modern terrain-analysis workflows than relying only on the older single-scale tool.
wbw_feature_preserving_smoothing_multiscale(input = dem$file_path(),
output = 'dem_smooth_multiscale.tif',
smoothing_amount = 0.65,
edge_preservation = 0.80,
scale_levels = 4,
fidelity = 0.45,
z_factor = 1.0)
dem_smooth <- wbw_read_raster('dem_smooth_multiscale.tif')
The key idea is coarse-to-fine smoothing: larger-scale terrain form is stabilized first, then finer detail is reintroduced while preserving major breaks-in-slope. This is especially useful before curvature, geomorphon, and terrain-position workflows.
Geomorphons — Landform Classification
wbw_geomorphons(dem = dem$file_path(),
output = 'geomorphons.tif',
search = 50,
threshold = 1.0,
fdist = 0,
skip = 0,
forms = TRUE,
residuals = FALSE)
Geomorphon class codes: 1=flat, 2=peak, 3=ridge, 4=shoulder, 5=spur, 6=slope, 7=hollow, 8=footslope, 9=valley, 10=pit.
Multi-Scale Topographic Position
wbw_multiscale_topographic_position_image(local = 'tpi_local.tif',
meso = 'tpi_meso.tif',
broad = 'tpi_broad.tif',
output = 'mstpi_rgb.tif',
hillshade = 'hillshade.tif')
Solar and Horizon Analysis
wbw_time_in_daylight(dem = dem$file_path(),
output = 'daylight_hrs.tif',
lat = 43.5,
long = -80.5,
az_fraction = 10.0,
max_dist = 100.0,
utc_offset = '-5:00',
start_day = 172,
end_day = 172,
start_time = '06:00:00',
end_time = '20:00:00')
WbW-Pro Spotlight: Terrain Constraint and Conflict Analysis
- Problem: Screen terrain constraints early for siting and corridor decisions.
- Tool:
terrain_constraint_and_conflict_analysis - Typical inputs: DEM, optional wetness, optional flood-risk surface, optional land-cover penalty, slope threshold.
- Typical outputs: Terrain-conflict score raster, conflict classes, and summary outputs.
result <- s$terrain_constraint_and_conflict_analysis(
dem = 'dem.tif',
wetness = 'wetness_index_norm.tif',
flood_risk = 'flood_risk_norm.tif',
landcover_penalty = 'landcover_penalty_norm.tif',
slope_limit_deg = 15.0,
output_prefix = 'terrain_conflict_corridor_a'
)
print(result)
Note: This workflow requires a session initialized with a valid Pro licence.
Pro Sweep Diagnostics for Siting Workflows
For scenario testing in Pro siting workflows, wind_turbine_siting and
solar_site_suitability_analysis accept a sweep_spec list and emit
additional sweep outputs:
run_matrix_summary(CSV)sensitivity_report(JSON)sensitivity_report_html(HTML)stability_map(GeoTIFF;3=high,2=medium,1=low)
The sensitivity JSON includes a normalized span and stability classifier:
metrics.primary_metricmetrics.primary_relative_spanmetrics.stability_class(high,medium,low)
s <- wbw_session()
sweep_spec <- list(
schema_version = "1.0.0",
sweep_mode = "grid",
parameters = list(
list(name = "candidate_threshold", values = list(0.65, 0.70, 0.75))
)
)
result <- s$wind_turbine_siting(
dem = "dem.tif",
settlements = "settlements.gpkg",
sweep_spec = sweep_spec,
output_prefix = "wind_sweep"
)
Complete Terrain Analysis Workflow
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/terrain_workflow')
dem <- wbw_read_raster('dem.tif')
# Smooth the DEM before derivative-heavy work.
wbw_feature_preserving_smoothing_multiscale(input = dem$file_path(),
output = 'dem_smooth_multiscale.tif',
smoothing_amount = 0.65,
edge_preservation = 0.80,
scale_levels = 4,
fidelity = 0.45)
dem_smooth <- wbw_read_raster('dem_smooth_multiscale.tif')
# Derivatives
for (tool in c('slope', 'aspect')) {
wbw_run_tool(tool, args = list(dem = dem_smooth$file_path(),
output = paste0(tool, '.tif')), session = s)
}
wbw_profile_curvature(dem = dem_smooth$file_path(), output = 'profc.tif')
wbw_plan_curvature(dem = dem_smooth$file_path(), output = 'planc.tif')
# Hillshade for visualisation
wbw_hillshade(dem = dem_smooth$file_path(), output = 'hillshade.tif',
azimuth = 315.0, altitude = 30.0)
# TWI
wbw_d_inf_flow_accum(dem = dem_smooth$file_path(), output = 'sca.tif',
out_type = 'sca')
wbw_wetness_index(sca = 'sca.tif', slope = 'slope.tif',
output = 'twi.tif')
# Roughness and classification
wbw_vector_ruggedness_measure(dem = dem_smooth$file_path(), output = 'vrm.tif', filterx = 11, filtery = 11)
wbw_geomorphons(dem = dem_smooth$file_path(), output = 'geomorphons.tif', search = 50, threshold = 1.0,
fdist = 0, skip = 0, forms = TRUE, residuals = FALSE)
cat('Terrain analysis complete.\n')
Tips
- Pre-process your DEM: Remove spikes, pits, and fill sinks before computing derivatives. Use
breach_depressions_least_cost()(preserves real depressions) orfill_depressions()(infills) depending on your application. - Resolution matters: Coarse DEMs (e.g. 30 m) are smoothed and may miss local process features. Fine DEMs (e.g. 1 m LiDAR) can be noisy. Choose resolution to match your process scale.
- Flow direction algorithms: D8 (8-directional) is faster but can cause artificial flow alignments. D-infinity and Dinf-Rho distribute flow more naturally and are preferred for continuous analyses.
- Curvature is scale-dependent: Always compute curvature at the scale matching your DEM resolution. A 10 m window on a 1 m DEM can overinterpret noise; a 1 m window on a 30 m DEM misses important structure.
- Multiscale position classification: Run classification at 3–5 scales (e.g. local, neighbourhood, regional) and examine layer coherence. Inconsistent multi-scale patterns suggest model overfitting.
- Viewshed validation: Viewshed results are sensitive to DEM quality and observer height assumptions. Always validate against ground observation or high-res ortho imagery.
- Hydrological thresholds are empirical: Contributing area thresholds for stream initiation vary by geology and climate (typically 0.5–5 km²). Calibrate against observed stream networks.
- Openness and exposure: Sky-view factor (SVF) and terrain openness support better hillshading and visibility assessment than raw slope or aspect. Use for visual interpretation and photogrammetry.
Spatial Hydrology
Hydrological analysis in WbW-R covers the full DEM-to-drainage workflow: depression removal, flow routing, stream extraction, watershed delineation, and hydrological indices. All heavy computation runs in the Whitebox backend via wbw_<tool>(...) wrappers (or wbw_run_tool(...) for dynamic tool-id workflows); R handles orchestration, conditional logic, and result inspection.
Session Setup
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/hydrology')
dem <- wbw_read_raster('dem.tif')
Depression Removal
Raw DEMs often contain spurious pits that block modelled drainage. Choose the method appropriate to your landscape and accuracy requirements.
Breach Depressions — Least-Cost
The preferred pre-treatment for most applications. Carves the minimum-width, minimum-depth channel through each depression barrier:
wbw_breach_depressions_least_cost(dem = dem$file_path(),
output = 'dem_breached.tif',
dist = 500, # maximum breach distance (cells)
max_cost = -1.0, # -1 = no cost limit
min_dist = TRUE,
flat_increment = 0.0001,
fill_deps = FALSE)
Fill Depressions — Wang & Liu
Use fill after breach, or alone on smooth low-relief landscapes:
wbw_fill_depressions_wang_and_liu(dem = dem$file_path(),
output = 'dem_filled.tif',
fix_flats = TRUE,
flat_increment = 0.001,
max_depth = -1.0)
Burn-in Stream Network
If you have a mapped stream network, burn it into the DEM before filling to improve drainage coherence:
streams <- wbw_read_vector('streams.shp')
wbw_burn_streams_at_roads(dem = dem$file_path(),
streams = streams$file_path(),
roads = 'roads.shp',
output = 'dem_burn.tif',
width = 6.0)
Flow Routing
D8 Flow Pointer and Accumulation
wbw_d8_pointer(dem = 'dem_breached.tif',
output = 'd8_ptr.tif',
esri_pntr = FALSE)
wbw_d8_flow_accum(i = 'd8_ptr.tif',
output = 'd8_acc.tif',
out_type = 'cells',
log = FALSE,
clip = FALSE,
pntr = TRUE)
D-Infinity Routing
Distributes flow across two cells proportionally:
wbw_d_inf_pointer(dem = 'dem_breached.tif',
output = 'dinf_ptr.tif')
wbw_d_inf_flow_accum(dem = 'dem_breached.tif',
output = 'dinf_sca.tif',
out_type = 'sca',
log = FALSE)
FD8 Multi-Flow
wbw_fd8_flow_accum(dem = 'dem_breached.tif',
output = 'fd8_acc.tif',
out_type = 'cells',
exponent = 1.1,
threshold = 0.0,
log = FALSE,
clip = FALSE)
Stream Extraction
wbw_extract_streams(flow_accum = 'd8_acc.tif',
output = 'streams.tif',
threshold = 5000,
zero_background = TRUE)
Extract Valley Bottom by Region Growing
wbw_extract_valley_bottoms(dem = 'dem_breached.tif',
output = 'valley_bottoms.tif',
threshold = 0.5,
line_thin = TRUE)
Watershed Delineation
Snap Pour Points
outlets <- wbw_read_vector('gauges.shp')
wbw_snap_pour_points(pour_pts = outlets$file_path(),
flow_accum = 'd8_acc.tif',
output = 'gauges_snapped.shp',
snap_dist = 200.0)
Single and Multi-Watershed Delineation
wbw_watershed(d8_pntr = 'd8_ptr.tif',
pour_pts = 'gauges_snapped.shp',
output = 'watersheds.tif',
esri_pntr = FALSE)
Unnest Basins
wbw_unnest_basins(d8_pntr = 'd8_ptr.tif',
pour_pts = 'gauges_snapped.shp',
output = 'unnested_basins.tif',
esri_pntr = FALSE)
Flow Path Analysis
# Downslope flowpath length
wbw_downslope_flowpath_length(d8_pntr = 'd8_ptr.tif',
output = 'ds_flowpath_len.tif',
watersheds = '',
weights = '',
esri_pntr = FALSE)
# Distance to stream outlet
wbw_distance_to_outlet(d8_pntr = 'd8_ptr.tif',
streams = 'streams.tif',
output = 'dist_to_outlet.tif',
esri_pntr = FALSE,
zero_background = TRUE)
# HAND — Height Above Nearest Drainage
wbw_elevation_above_stream(dem = 'dem_breached.tif',
streams = 'streams.tif',
output = 'hand.tif')
Hydrological Indices
Topographic Wetness Index
wbw_wetness_index(sca = 'dinf_sca.tif',
slope = 'slope.tif',
output = 'twi.tif')
Sediment Transport Index
wbw_sediment_transport_index(sca = 'dinf_sca.tif',
slope = 'slope.tif',
output = 'sti.tif',
sca_exponent = 0.4,
slope_exponent = 1.3)
Stream Power Index
wbw_stream_power_index(sca = 'dinf_sca.tif',
slope = 'slope.tif',
output = 'spi.tif',
exponent = 1.0)
Isobasins — Equal-Area Basin Partitioning
wbw_isobasins(dem = 'dem_breached.tif',
output = 'isobasins.tif',
size = 5000,
connections = TRUE,
csv_file = 'isobasin_connectivity.csv')
Stochastic Depression Analysis
wbw_stochastic_depression_analysis(dem = dem$file_path(),
output = 'prob_flooded.tif',
rmse = 0.18,
range = 20.0,
iterations = 1000)
Complete Hydrological Analysis Workflow
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/hydro_workflow')
dem <- wbw_read_raster('dem.tif')
# 1. Breach depressions
wbw_breach_depressions_least_cost(dem = dem$file_path(), output = 'dem_b.tif', dist = 500,
flat_increment = 0.0001, fill_deps = FALSE)
# 2. D8 routing
wbw_d8_pointer(dem = 'dem_b.tif', output = 'd8_ptr.tif')
wbw_d8_flow_accum(i = 'd8_ptr.tif', output = 'd8_acc.tif',
out_type = 'cells', pntr = TRUE)
# 3. DInf SCA for TWI
wbw_d_inf_flow_accum(dem = 'dem_b.tif', output = 'sca.tif',
out_type = 'sca')
# 4. Slope for indices
wbw_slope(dem = 'dem_b.tif', output = 'slope.tif',
units = 'degrees')
# 5. Streams
wbw_extract_streams(flow_accum = 'd8_acc.tif',
output = 'streams.tif', threshold = 3000, zero_background = TRUE)
# 6. Watershed
outlets <- wbw_read_vector('gauges.shp')
wbw_snap_pour_points(pour_pts = outlets$file_path(),
flow_accum = 'd8_acc.tif', output = 'gauges_snap.shp', snap_dist = 100.0)
wbw_watershed(d8_pntr = 'd8_ptr.tif',
pour_pts = 'gauges_snap.shp', output = 'watersheds.tif')
# 7. Indices
wbw_wetness_index(sca = 'sca.tif', slope = 'slope.tif',
output = 'twi.tif')
wbw_elevation_above_stream(dem = 'dem_b.tif',
streams = 'streams.tif', output = 'hand.tif')
cat('Hydrological analysis complete.\n')
LiDAR Processing
LiDAR point cloud processing in WbW-R covers the full pipeline from raw flight-line data through to classified point clouds and derived raster products. All processing tools run in the Whitebox backend; R handles session management, file discovery, and result validation.
Core Concepts
Before processing LiDAR data, understand these foundational terms:
- Return number: Which reflection from a single laser pulse. Pulse 1 is the first (often canopy top); pulse 2–5 capture midstory and ground returns.
- Point classification: ASPRS standard categories — ground (2), low veg (3), medium veg (4), high veg (5), buildings (6), noise (7), overlap (12), and others.
- Intensity: Reflectance value (0–65535) proportional to target brightness. Useful for vegetation density estimation and water detection.
- Ground filtering: Separating terrain points (classification 2) from vegetation and buildings; critical for accurate digital terrain models (DTMs).
- Digital terrain model (DTM): Raster surface of bare earth, computed from ground returns only. Used for hydrology, geomorphometry, and flood modelling.
- Digital surface model (DSM): Raster surface of highest returns (canopy top). Used for building detection and volume calculations.
- Canopy height model (CHM): DSM minus DTM; represents vegetation height above ground. Standard input for tree detection and segmentation.
- Point density: Points per square unit (typically points/m²). Higher density enables finer segmentation; lower density requires smoothing.
- Normalization: Converting raw Z-values to height-above-ground by subtracting DTM, creating a normalized point cloud for structural analysis.
Session Setup and File Discovery
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/lidar')
# List all LAS/LAZ files in the project folder
las_files <- list.files('.', pattern = '\\.(las|laz)$', full.names = TRUE,
recursive = TRUE)
cat('Found', length(las_files), 'point cloud files.\n')
Reading and Inspecting LiDAR Files
las <- wbw_read_lidar('survey.las')
meta <- las$metadata()
cat('Point count:', meta$number_of_points, '\n')
cat('X range:', meta$min_x, 'to', meta$max_x, '\n')
cat('Y range:', meta$min_y, 'to', meta$max_y, '\n')
cat('Z range:', meta$min_z, 'to', meta$max_z, '\n')
cat('Point density per m²:', meta$point_density, '\n')
Point Cloud Filtering and Outlier Removal
# Remove isolated low and high points
wbw_lidar_elevation_slice(i = 'survey.las',
output = 'survey_sliced.las',
minz = 0.0,
maxz = 200.0,
cls = FALSE)
# Statistical outlier removal
wbw_lidar_remove_outliers(i = 'survey.las',
output = 'survey_clean.las',
radius = 2.0,
elev_diff = 25.0,
use_median = FALSE)
Ground Point Classification
Progressive Morphological Filter
wbw_lidar_ground_point_filter(i = 'survey_clean.las',
output = 'survey_classified.las',
radius = 2.0,
min_elev_diff = 0.15,
max_elev_diff = 1.3,
num_iter = 5,
threshold = 0.15,
slope_threshold = 0.15,
height_threshold = 1.0,
classify = TRUE,
slope = FALSE,
height_diff = TRUE,
filter_return_all = FALSE)
Digital Elevation Model Interpolation
Tin Gridding (TIN Interpolation)
wbw_tin_gridding(i = 'survey_classified.las',
output = 'dtm.tif',
returns = 'last',
resolution = 1.0,
exclude_cls = '1,3,4,5,6,7',
minz = -50.0,
maxz = 250.0)
LiDAR IDW Interpolation
wbw_lidar_idw_interpolation(i = 'survey_classified.las',
output = 'dtm_idw.tif',
parameter = 'elevation',
returns = 'last',
resolution = 1.0,
weight = 1.0,
radius = 2.5,
exclude_cls = '1,3,4,5,6,7')
Normalised Height Above Ground
wbw_normalize_lidar(i = 'survey_classified.las',
ground = 'survey_classified.las',
output = 'survey_normalised.las',
ignore_ground_distance = FALSE)
Canopy Height Model (CHM) and DSM
# First return DSM
wbw_lidar_idw_interpolation(i = 'survey_classified.las',
output = 'dsm.tif',
parameter = 'elevation',
returns = 'first',
resolution = 1.0,
weight = 1.0,
radius = 2.5,
exclude_cls = '7')
# Canopy Height Model = DSM - DTM
wbw_subtract(input1 = 'dsm.tif',
input2 = 'dtm.tif',
output = 'chm.tif')
Point Density and Distribution Analysis
wbw_lidar_point_stats(i = 'survey.las',
resolution = 1.0,
num_points = TRUE,
num_pulses = FALSE)
wbw_lidar_density(i = 'survey.las',
output = 'density.tif',
resolution = 1.0,
returns = 'all',
exclude_cls = '7')
Scan-Angle and Return Analysis
# Filter by scan angle
wbw_filter_lidar_scan_angles(i = 'survey.las',
output = 'survey_nadir.las',
threshold = 15.0)
# Intensity image
wbw_lidar_idw_interpolation(i = 'survey_nadir.las',
output = 'intensity.tif',
parameter = 'intensity',
returns = 'all',
resolution = 1.0,
weight = 1.0,
radius = 2.5)
Tile Management
Working with large surveys requires tiling:
# Tile large dataset
wbw_lidar_tile(i = 'full_survey.las',
width = 500.0,
height = 500.0,
origin_x = 0.0,
origin_y = 0.0)
# Add a buffer overlap to each tile
wbw_lidar_tile_footprint(i = 'tile_000_000.las',
output = 'tile_000_000_footprint.shp',
hull = FALSE)
Segmentation and Vegetation Analysis
# Individual tree segmentation from normalised LiDAR
wbw_individual_tree_detection(i = 'survey_normalised.las',
output = 'tree_tops.shp',
min_search_radius = 1.0,
min_height = 2.0,
max_search_radius = 5.0,
max_height = 40.0)
# Canopy cover (fraction first return above height threshold)
wbw_lidar_segmentation_based_filter(i = 'survey_classified.las',
output = 'survey_seg_filtered.las',
slope_threshold = 15.0,
max_edge_length = 0.5,
classify = TRUE)
WbW-Pro Spotlight: LiDAR Change and Disturbance Analysis
- Problem: Compare repeat LiDAR epochs to detect disturbance in a repeatable way.
- Tool:
lidar_change_and_disturbance_analysis - Typical inputs: Baseline tile set, monitoring tile set, output resolution, minimum change threshold.
- Typical outputs: Change rasters plus summary metrics for affected area, hotspot intensity, and QA review.
result <- s$lidar_change_and_disturbance_analysis(
baseline_tiles = '/data/lidar_epoch_2022/',
monitor_tiles = '/data/lidar_epoch_2025/',
resolution = 1.0,
min_change_m = 0.5,
output_prefix = 'disturbance_2025_vs_2022'
)
print(result)
Note: This workflow requires a session initialized with a valid Pro licence.
Complete LiDAR Processing Workflow
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/lidar_project')
las_file <- 'raw_survey.las'
# 1. Remove outliers
wbw_lidar_remove_outliers(i = las_file, output = 'clean.las', radius = 2.0, elev_diff = 25.0)
# 2. Ground classification
wbw_lidar_ground_point_filter(i = 'clean.las', output = 'classified.las', radius = 2.0,
min_elev_diff = 0.15, max_elev_diff = 1.3, num_iter = 5,
threshold = 0.15, slope_threshold = 0.15, height_threshold = 1.0,
classify = TRUE, slope = FALSE, height_diff = TRUE,
filter_return_all = FALSE)
# 3. DTM
wbw_tin_gridding(i = 'classified.las', output = 'dtm.tif', returns = 'last',
resolution = 1.0, exclude_cls = '1,3,4,5,6,7')
# 4. DSM and CHM
wbw_lidar_idw_interpolation(i = 'classified.las', output = 'dsm.tif', parameter = 'elevation',
returns = 'first', resolution = 1.0, weight = 1.0, radius = 2.5,
exclude_cls = '7')
wbw_subtract(input1 = 'dsm.tif', input2 = 'dtm.tif', output = 'chm.tif')
# 5. Normalise for vegetation analysis
wbw_normalize_lidar(i = 'classified.las', ground = 'classified.las',
output = 'normalised.las', ignore_ground_distance = FALSE)
# 6. Tree detection
wbw_individual_tree_detection(i = 'normalised.las', output = 'tree_tops.shp',
min_search_radius = 1.0, min_height = 2.0,
max_search_radius = 5.0, max_height = 40.0)
# 7. Point density
wbw_lidar_density(i = 'classified.las', output = 'density.tif',
resolution = 1.0, returns = 'all', exclude_cls = '7')
cat('LiDAR processing complete.\n')
Tips
- Choose your format wisely: LAS is universal and compact; LAZ adds compression and is ideal for archival or transmission. COPC is cloud-optimized and best for remote HTTP range-request access. Use LAZ or LAS for terrestrial/airborne surveys; COPC for cloud-native workflows.
- Always validate classifications: Use
lidar_histogram()andlidar_info()to inspect point distributions by return and classification. Misclassified ground points silently corrupt DTMs and downstream hydrology. - DTM vs. DSM vs. CHM: Generate all three at the same resolution so derivatives align. A common pitfall is mixing DTM and DSM resolution.
- Ground filtering is critical: Outliers and noise (classification 7) should be excluded before gridding. Use
lidar_filter_for_ground()to remove spikes and erratic points. - Normalization enables vegetation analysis: Always normalize point clouds (subtract DTM) before individual tree detection or canopy structural metrics.
- Monitor memory for large surveys: Point clouds are memory-intensive. For datasets > 1 GB, use streaming APIs (
lidar_read_chunked()) rather than loading the entire tile at once. - Coordinate reference systems matter: LAS headers carry CRS as WKT. Verify WKT matches your project CRS before gridding or merging tiles.
- Density and grid resolution: If point density is < 0.5 pts/m², consider upsampling or smoothing the output grid to avoid isolated pits or peaks.
Remote Sensing Analysis
Remote sensing workflows in WbW-R cover multispectral and hyperspectral image analysis: spectral index computation, image enhancement, principal component analysis, image segmentation, unsupervised and supervised classification, accuracy assessment, and change detection. All computation runs in the Whitebox backend.
Sensor Bundle First: When working with Sentinel-2, Landsat, PlanetScope, or SAR product folders, open the scene as a sensor bundle using
wbw_sensor_bundle_from_path(). Bundles provide automatic metadata discovery, key-based band access, and one-call true/false-colour composites without hardcoding file names.
Core Concepts
Remote sensing image analysis requires familiarity with these core ideas:
- Spectral bands: Distinct wavelength ranges (e.g. blue 450–510 nm, red 620–750 nm, NIR 750–900 nm). Different materials reflect different bands, enabling material discrimination.
- Spectral indices: Normalized ratios of bands that isolate phenomena. NDVI (Normalized Difference Vegetation Index) uses NIR and red to measure greenness; NDWI uses NIR and SWIR for water content.
- Spatial resolution: Pixel size in meters (Sentinel-2: 10 m for visible/NIR, 20 m for SWIR; Landsat: 30 m; SAR: 5–30 m depending on mode).
- Temporal resolution: Revisit interval (Sentinel-2: 5 days; Landsat: 16 days; PlanetScope: daily or higher).
- Atmospheric effects: Raw radiance is affected by aerosols, water vapour, and ozone. Surface reflectance products are atmospherically corrected; still require relative normalization for multi-date analysis.
- Cloud masking: Cloud and cloud shadow pixels must be identified and excluded before classification or change detection using quality/QA bands.
- Supervised classification: Training polygons with known labels teach a model to assign classes to unlabelled pixels. Training quality directly controls classification accuracy.
- Unsupervised classification: Clustering algorithms (K-means, ISODATA) discover spectral clusters without training labels; useful for exploratory analysis.
- Change detection: Comparing indices or classifications across dates to identify land-use changes, disturbance, or phenological shifts.
Session Setup
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/remote_sensing')
Sensor Bundles — Cross-Family Scene Ingestion
wbw_sensor_bundle_from_path() wraps a product folder and returns a bundle object with a consistent interface across sensor families.
Opening a Bundle
# Works with Sentinel-2, Landsat 8/9, PlanetScope, SPOT, SAR, etc.
bundle <- wbw_sensor_bundle_from_path(
'/data/S2B_MSIL2A_20240601T105619_N0510_R094_T32TPT.SAFE',
session = s
)
# Or from a zip archive — WbW extracts it automatically
bundle <- wbw_sensor_bundle_from_path('/data/LC09_L2SP_017030_20240610.tar', session = s)
Discovering Available Layers
meta <- bundle$metadata()
cat('Family: ', meta$family, '\n')
cat('Mission: ', meta$mission, '\n')
cat('Tile: ', meta$tile_id, '\n')
cat('Level: ', meta$processing_level, '\n')
cat('Cloud %: ', meta$cloud_cover_percent, '\n')
cat('Datetime: ', meta$acquisition_datetime_utc, '\n')
print(bundle$list_band_keys()) # e.g. c('B02', 'B03', 'B04', 'B08', ...)
print(bundle$list_measurement_keys()) # e.g. c('ndvi', 'ndwi')
print(bundle$list_qa_keys()) # e.g. c('SCL', 'QA_PIXEL')
print(bundle$list_aux_keys()) # e.g. c('AOT', 'WVP')
print(bundle$list_asset_keys())
Reading Bands by Key
# Keys follow sensor-native naming — no need to memorise file paths
blue <- bundle$read_band('B02') # Sentinel-2 blue
green <- bundle$read_band('B03')
red <- bundle$read_band('B04')
nir <- bundle$read_band('B08')
swir1 <- bundle$read_band('B11')
swir2 <- bundle$read_band('B12')
# Landsat 9 uses different key names
# blue <- bundle$read_band('SR_B2')
# nir <- bundle$read_band('SR_B5')
# QA / cloud mask
scl <- bundle$read_qa_layer('SCL') # Sentinel-2 scene classification
Quick-Look Composites
# True-colour GeoTIFF (auto-enhanced by default)
bundle$write_true_colour(output_path = 'true_colour.tif')
# False-colour (NIR-Red-Green) composite
bundle$write_false_colour(output_path = 'false_colour.tif')
Cross-Family NDVI Pattern
compute_ndvi_from_bundle <- function(bundle_path, output_path, session = NULL) {
b <- wbw_sensor_bundle_from_path(bundle_path, session = session)
meta <- b$metadata()
if ('ndvi' %in% b$list_measurement_keys()) {
ndvi_r <- b$read_measurement('ndvi')
wbw_write_raster(ndvi_r, output_path)
} else {
# Fall back to band-based NDVI
if (meta$family == 'sentinel2') {
red_r <- b$read_band('B04')
nir_r <- b$read_band('B08')
} else {
red_r <- b$read_band('SR_B4')
nir_r <- b$read_band('SR_B5')
}
wbw_normalized_difference_index(input1 = nir_r$file_path(), input2 = red_r$file_path(),
output = output_path)
}
}
compute_ndvi_from_bundle('/data/S2B_MSIL2A_20240601.SAFE', 'ndvi_s2.tif', s)
compute_ndvi_from_bundle('/data/LC09_L2SP_017030.tar', 'ndvi_l9.tif', s)
Cloud and No-Data Masking
# Sentinel-2 SCL: 3=cloud shadow, 8=med cloud, 9=high cloud, 10=thin cirrus
scl <- bundle$read_qa_layer('SCL')
wbw_raster_calculator(output = 'red_cloud_free.tif',
statement = paste0("if('", scl$file_path(), "' == 3 or '", scl$file_path(), "' == 8 ",
"or '", scl$file_path(), "' == 9 or '", scl$file_path(), "' == 10, ",
"nodata, '", red$file_path(), "')"))
# Landsat Collection 2 QA_PIXEL — use bitwise expressions via raster_calculator
# qa <- bundle$read_qa_layer('QA_PIXEL')
Reading Multi-Band Imagery (Individual Files)
When bundles are not available (e.g., reprojected mosaics, custom composites, legacy archives), load individual band files in the conventional way:
b2 <- wbw_read_raster('LC08_B2_blue.tif')
b3 <- wbw_read_raster('LC08_B3_green.tif')
b4 <- wbw_read_raster('LC08_B4_red.tif')
b5 <- wbw_read_raster('LC08_B5_nir.tif')
b6 <- wbw_read_raster('LC08_B6_swir1.tif')
b7 <- wbw_read_raster('LC08_B7_swir2.tif')
# Resample if bands have different resolutions
wbw_resample(inputs = b6$file_path(),
output = 'b6_10m.tif',
cell_size = 0.0,
base = b4$file_path(),
method = 'bilinear')
Spectral Indices
Normalised Difference Vegetation Index (NDVI)
$$NDVI = \frac{NIR - Red}{NIR + Red}$$
# Using bands read from a bundle
wbw_normalized_difference_index(input1 = nir$file_path(), # NIR
input2 = red$file_path(), # Red
output = 'ndvi.tif')
Common Water, Snow, and Urban Indices
# Define index triplets: (output name, numerator band, denominator band)
indices <- list(
list(name = 'ndwi', b1 = green, b2 = nir), # open water; Green/NIR
list(name = 'mndwi', b1 = green, b2 = swir1), # urban water; Green/SWIR1
list(name = 'nbr', b1 = nir, b2 = swir2), # fire severity; NIR/SWIR2
list(name = 'ndsi', b1 = green, b2 = swir1), # snow/ice; Green/SWIR1
list(name = 'ndbi', b1 = swir1, b2 = nir) # built-up; SWIR1/NIR
)
for (idx in indices) {
wbw_normalized_difference_index(input1 = idx$b1$file_path(),
input2 = idx$b2$file_path(),
output = paste0(idx$name, '.tif'))
}
EVI (Enhanced Vegetation Index)
$$EVI = 2.5 \cdot \frac{NIR - Red}{NIR + 6 \cdot Red - 7.5 \cdot Blue + 1}$$
wbw_raster_calculator(output = 'evi.tif',
statement = paste0("2.5 * ('", nir$file_path(), "' - '", red$file_path(), "') / (",
"'", nir$file_path(), "' + 6.0 * '", red$file_path(), "' - 7.5 * '",
blue$file_path(), "' + 1.0)"))
Image Enhancement
Percentage Linear Stretch
wbw_percentage_contrast_stretch(i = b4$file_path(),
output = 'b4_stretched.tif',
clip = 1.0,
tail = 'both',
num_tones = 256)
Standard Deviation Stretch
wbw_standard_deviation_contrast_stretch(i = b4$file_path(),
output = 'b4_sd_stretch.tif',
stdev = 2.0,
num_tones = 256)
Gamma Correction
wbw_gamma_correction(i = b4$file_path(),
output = 'b4_gamma.tif',
gamma = 0.55)
Histogram Matching
wbw_histogram_matching(i = 'image_target.tif',
histo_file = 'reference_histogram.html',
output = 'image_matched.tif')
IHS Colour Space and Pan-Sharpening
wbw_rgb_to_ihs(intensity = b4$file_path(),
hue = b3$file_path(),
saturation = b2$file_path(),
output = 'ihs.tif')
# Pan-sharpen
wbw_ihs_to_rgb(intensity = 'pan_band.tif',
hue = 'ihs_hue.tif',
saturation = 'ihs_sat.tif',
output = 'pansharpened.tif')
Spatial Filtering
# Gaussian smoothing
wbw_gaussian_filter(i = b5$file_path(), output = 'b5_gauss.tif', sigma = 2.0)
# Edge detection — Canny
wbw_canny_edge_detection(i = b4$file_path(), output = 'edges.tif', sigma = 0.5,
low_threshold = 0.05, high_threshold = 0.15, add_back = FALSE)
# General-purpose GLCM texture (multiband output)
wbw_glcm_texture(input = b5$file_path(),
window_size = 9,
distance = 1,
angles = '0,45,90,135',
features = 'contrast,homogeneity,entropy',
direction_aggregation = 'mean',
levels = 32,
output = 'glcm_texture.tif')
Principal Component Analysis
# Supply a comma-separated list of band files
all_bands <- paste(c(b2$file_path(), b3$file_path(), b4$file_path(),
b5$file_path(), b6$file_path(), b7$file_path()),
collapse = ';')
wbw_principal_component_analysis(inputs = all_bands,
output = 'pca_loadings.html',
num_comp = 6,
standardised = FALSE)
# PC scores are written as pc1.tif, pc2.tif, ... in the working directory
Image Segmentation
wbw_image_segmentation(inputs = all_bands,
output = 'segments.tif',
threshold = 30.0,
steps = 10,
min_area = 10)
Object-Based Image Analysis (OBIA) Baseline
Phase 1 open-core OBIA tools are available through standard wbw_<tool>(...)
wrappers and can be discovered as a grouped set:
obia_tools <- wbw_tools_in_remote_sensing_obia(session = s)
print(obia_tools$id)
# 1) Segment imagery into compact object candidates
wbw_segment_slic_superpixels(inputs = all_bands,
region_size = 18,
compactness = 12.0,
output = 'segments_slic.tif')
# 2) Merge undersized regions
wbw_segments_merge_small_regions(segments = 'segments_slic.tif',
min_size = 12,
method = 'longest',
output = 'segments_clean.tif')
# 3) Extract spectral/shape/texture object features
wbw_object_features_spectral_basic(segments = 'segments_clean.tif',
inputs = all_bands,
output = 'object_features_spectral.csv')
wbw_object_features_shape_basic(segments = 'segments_clean.tif',
output = 'object_features_shape.csv')
wbw_object_features_texture_glcm_basic(segments = 'segments_clean.tif',
input = b5$file_path(),
levels = 16,
output = 'object_features_texture.csv')
# 4) Train/apply object-level RF model
wbw_classify_objects_random_forest(features = 'object_features_all.csv',
training = 'training_segments.csv',
output = 'object_predictions.csv')
# 5) Evaluate object-level accuracy
wbw_evaluate_object_classification_accuracy(predictions = 'object_predictions.csv',
reference = 'validation_segments.csv',
output = 'object_accuracy.json')
# Optional one-call baseline pipeline
wbw_obia_pipeline_basic(inputs = all_bands,
training = 'training_segments.csv',
output_prefix = 'obia_field01',
segment_method = 'slic')
Advanced OBIA Capabilities (Open Tier)
The OBIA surface now includes advanced open-tier tools. You can list them from
the grouped discovery helper and run each directly with wbw_<tool>(...) wrappers
(or with wbw_run_tool(...) for dynamic tool-id dispatch).
Segmentation and scale control:
segment_watershed_markerssegment_multiresolution_hierarchicalsegment_scale_parameter_optimizersegments_split_low_cohesion
Object conversion and interoperability:
segments_to_polygonspolygons_to_segments
Advanced features:
object_features_context_neighborsobject_features_topology_relations
Advanced classification:
classify_objects_svmclassify_objects_ensemble_proclassify_objects_rules_basicclassify_objects_rules_hierarchicalobject_class_probability_mapsobject_uncertainty_diagnostics_pro
Hierarchy and propagation:
build_object_hierarchy_multiscalepropagate_labels_across_hierarchy
Post-processing and quality:
objects_enforce_min_mapping_unitobjects_boundary_refinement_proevaluate_segmentation_quality_pro
Workflow operations:
obia_batch_orchestrator_proobia_audit_report_pro
# 1) Build multiscale hierarchy products
wbw_segment_multiresolution_hierarchical(inputs = all_bands,
coarse_k = 900.0,
fine_k = 280.0,
output_prefix = 'site01_hier')
# 2) Context and topology features for difficult class boundaries
wbw_object_features_context_neighbors(segments = 'site01_hier_segments_fine.tif',
output = 'site01_context.csv')
wbw_object_features_topology_relations(segments = 'site01_hier_segments_fine.tif',
output = 'site01_topology.csv')
# 3) Ensemble and rule-hierarchical object classification
wbw_classify_objects_ensemble_pro(features = 'site01_features_all.csv',
training = 'site01_training_segments.csv',
output = 'site01_pred_ensemble.csv')
wbw_classify_objects_rules_hierarchical(features = 'site01_features_all.csv',
rules = 'site01_rules.csv',
output = 'site01_pred_rules.csv')
# 4) Probability maps and uncertainty diagnostics
wbw_object_class_probability_maps(predictions = 'site01_pred_ensemble.csv',
output = 'site01_probabilities.csv')
wbw_object_uncertainty_diagnostics_pro(probabilities = 'site01_probabilities.csv',
low_conf_threshold = 0.7,
output = 'site01_uncertainty.json')
# Batch orchestration for multi-scene runs
wbw_obia_batch_orchestrator_pro(jobs = list(
list(
inputs = list('s1_red.tif', 's1_green.tif', 's1_nir.tif'),
training = 's1_training.csv',
output_prefix = 'prod/s1',
segment_method = 'graph'
),
list(
inputs = list('s2_red.tif', 's2_green.tif', 's2_nir.tif'),
training = 's2_training.csv',
output_prefix = 'prod/s2',
segment_method = 'slic'
)
),
output = 'prod/obia_batch_report.json')
wbw_obia_audit_report_pro(artifacts = list(
'prod/s1_object_predictions.csv',
'prod/s2_object_predictions.csv',
'prod/obia_batch_report.json'
),
output = 'prod/obia_audit.json')
Use segments_to_polygons and polygons_to_segments when analysts need to
edit object boundaries in vector format and then return those objects back into
raster-segment workflows.
Unsupervised Classification
KMeans
wbw_modified_k_means_clustering(inputs = all_bands,
output = 'kmeans.tif',
out_html = 'kmeans_report.html',
start_clusters = 5,
end_clusters = 10,
max_iterations = 25,
class_change = 2.0)
DBSCAN
wbw_dbscan(inputs = all_bands,
output = 'dbscan.tif',
search_dist = 2.5,
min_points = 10)
Supervised Classification
Random Forest
# 1. Fit the model
wbw_random_forest_classification_fit(inputs = all_bands,
training = 'training_polygons.shp',
field = 'CLASS_ID',
output = 'rf_model.bin',
n_trees = 100,
min_leaf_size = 1,
max_features = 0.0)
# 2. Apply the model
wbw_random_forest_classification_predict(inputs = all_bands,
model = 'rf_model.bin',
output = 'rf_classification.tif')
Support Vector Machine
wbw_svm_classification(inputs = all_bands,
training = 'training_polygons.shp',
field = 'CLASS_ID',
output = 'svm_classification.tif',
c = 200.0,
gamma = 50.0,
cost = 10.0,
tolerance = 0.1,
test_proportion = 0.2)
K-Nearest Neighbours
wbw_knn_classification(inputs = all_bands,
training = 'training_polygons.shp',
field = 'CLASS_ID',
output = 'knn_classification.tif',
k = 5,
scaling = TRUE,
test_proportion = 0.2)
Accuracy Assessment
wbw_kappa_index(i1 = 'rf_classification.tif',
i2 = 'reference_classification.tif',
output = 'accuracy_report.html')
Change Detection
Image Differencing
wbw_change_vector_analysis(date1 = paste(c('t1_b2.tif','t1_b3.tif','t1_b4.tif','t1_b5.tif'), collapse=';'),
date2 = paste(c('t2_b2.tif','t2_b3.tif','t2_b4.tif','t2_b5.tif'), collapse=';'),
magnitude = 'cva_magnitude.tif',
direction = 'cva_direction.tif')
Additional Change, Thermal, and Spectral Sprint Tools
The newest remote sensing tools are available through session tool execution, which is useful while dedicated R helper wrappers are still catching up:
# Image difference change detection
img_diff <- s$run_tool('image_difference_change_detection', list(
t1_inputs = c('t1_b2.tif', 't1_b3.tif', 't1_b4.tif'),
t2_inputs = c('t2_b2.tif', 't2_b3.tif', 't2_b4.tif'),
mode = 'magnitude',
threshold_sigma = 2.0,
output = 'img_diff_mag.tif',
output_signed = 'img_diff_signed.tif',
output_mask = 'img_diff_mask.tif'
))
# Post-classification change with class remapping
post_class <- s$run_tool('post_classification_change', list(
t1_classified = 'lulc_t1.tif',
t2_classified = 'lulc_t2.tif',
transition_scale = 1000,
t1_class_remap = list('11' = 1, '12' = 1),
t2_class_remap = list('41' = 4, '42' = 4),
output = 'post_class_transition.tif'
))
# PCA-based change detection
pca_change <- s$run_tool('pca_based_change_detection', list(
t1_inputs = c('t1_b2.tif', 't1_b3.tif', 't1_b4.tif'),
t2_inputs = c('t2_b2.tif', 't2_b3.tif', 't2_b4.tif'),
component = 1,
threshold_sigma = 2.0,
output = 'pca_change_pc1.tif',
output_mask = 'pca_change_mask.tif',
output_report = 'pca_change_report.json'
))
# Dark object subtraction and DN->TOA reflectance
dos <- s$run_tool('dark_object_subtraction', list(
inputs = c('B02.tif', 'B03.tif', 'B04.tif', 'B08.tif'),
percentile = 1.0,
output = 'dos_stack.tif',
output_diagnostic_offsets = 'dos_offsets.tif'
))
toa <- s$run_tool('dn_to_toa_reflectance', list(
inputs = c('B02.tif', 'B03.tif', 'B04.tif', 'B08.tif'),
sensor_bundle_root = '/data/LC09_L1TP_017030_20240420_20240426_02_T1',
output = 'toa_stack.tif'
))
# Thermal emissivity and LST
emiss <- s$run_tool('ndvi_based_emissivity', list(
red_input = 'B04.tif',
nir_input = 'B08.tif',
output = 'emissivity.tif'
))
lst_sc <- s$run_tool('land_surface_temperature_single_channel', list(
thermal_input = 'B10.tif',
sensor_bundle_root = '/data/LC09_L1TP_017030_20240420_20240426_02_T1',
output = 'lst_single_channel.tif'
))
lst_sw <- s$run_tool('land_surface_temperature_split_window', list(
thermal1_input = 'B10.tif',
thermal2_input = 'B11.tif',
emissivity_mean_constant = 0.98,
emissivity_delta_constant = 0.0,
output = 'lst_split_window.tif'
))
# Spectral analytics
sam <- s$run_tool('spectral_angle_mapper', list(
inputs = c('B02.tif', 'B03.tif', 'B04.tif', 'B08.tif'),
endmembers = list(
list(name = 'water', values = c(0.03, 0.02, 0.01, 0.00)),
list(name = 'veg', values = c(0.05, 0.10, 0.06, 0.40))
),
output = 'sam_classes.tif',
output_angle = 'sam_angle.tif'
))
cont <- s$run_tool('continuum_removal', list(
inputs = c('hyp_b1.tif', 'hyp_b2.tif', 'hyp_b3.tif'),
wavelengths = c(450.0, 550.0, 650.0),
output = 'continuum_removed.tif'
))
unmix <- s$run_tool('linear_spectral_unmixing', list(
inputs = c('B02.tif', 'B03.tif', 'B04.tif', 'B08.tif'),
endmembers = list(
list(name = 'soil', values = c(0.18, 0.20, 0.22, 0.24)),
list(name = 'veg', values = c(0.05, 0.09, 0.06, 0.40))
),
output = 'unmix_frac.tif',
output_residual = 'unmix_residual.tif'
))
mnf <- s$run_tool('minimum_noise_fraction', list(
inputs = c('B02.tif', 'B03.tif', 'B04.tif', 'B08.tif'),
num_components = 3,
output = 'mnf_components.tif',
output_inverse = 'mnf_inverse.tif'
))
lib_match <- s$run_tool('spectral_library_matching', list(
inputs = c('B02.tif', 'B03.tif', 'B04.tif', 'B08.tif'),
metric = 'sam',
library = list(
list(name = 'water', values = c(0.03, 0.02, 0.01, 0.00)),
list(name = 'soil', values = c(0.18, 0.20, 0.22, 0.24))
),
output = 'lib_class.tif',
output_score = 'lib_score.tif'
))
# PolSAR decomposition tools
cp <- s$run_tool('cloude_pottier_decomposition', list(
inputs = c('t11.tif', 't22.tif', 't33.tif'),
matrix_format = 'diag3',
output = 'cloude_pottier_haa.tif'
))
fd <- s$run_tool('freeman_durden_decomposition', list(
inputs = c('c11.tif', 'c22.tif', 'c33.tif'),
matrix_format = 'diag3',
output = 'freeman_durden.tif',
output_clip_mask = 'freeman_clip.tif'
))
WbW-Pro Spotlight: In-Season Crop Stress Intervention Planning
- Problem: Turn in-season crop stress signals into actionable intervention priorities.
- Tool:
in_season_crop_stress_intervention_planning - Typical inputs: NDVI raster, canopy-temperature raster, soil-moisture raster.
- Typical outputs: Intervention-priority and intervention-class products with summary reporting.
result <- s$in_season_crop_stress_intervention_planning(
ndvi = 'ndvi_latest.tif',
canopy_temperature = 'lst_latest.tif',
soil_moisture = 'soil_moisture_latest.tif',
output_prefix = 'field_07_stress'
)
print(result)
Note: This workflow requires a session initialized with a valid Pro licence.
Complete Remote Sensing Workflow
The following end-to-end example uses a sensor bundle for ingestion and random forest for land-cover mapping:
library(whiteboxworkflows)
s <- wbw_session()
# 1. Open scene as a bundle — works with S2, Landsat 9, PlanetScope, etc.
bundle <- wbw_sensor_bundle_from_path(
'/data/S2B_MSIL2A_20240601T105619_N0510_R094_T32TPT.SAFE',
session = s
)
meta <- bundle$metadata()
cat(sprintf('Family: %s, tile: %s, clouds: %.1f%%\n',
meta$family, meta$tile_id, meta$cloud_cover_percent))
if (meta$cloud_cover_percent > 20) {
stop('Too cloudy for classification')
}
# 2. Read bands by key (family-agnostic)
blue <- bundle$read_band('B02')
green <- bundle$read_band('B03')
red <- bundle$read_band('B04')
nir <- bundle$read_band('B08')
wbw_resample(inputs = bundle$read_band('B11')$file_path(), output = 'swir1_10m.tif',
cell_size = 0.0, base = red$file_path(), method = 'bilinear')
wbw_resample(inputs = bundle$read_band('B12')$file_path(), output = 'swir2_10m.tif',
cell_size = 0.0, base = red$file_path(), method = 'bilinear')
swir1 <- wbw_read_raster('swir1_10m.tif')
swir2 <- wbw_read_raster('swir2_10m.tif')
bands <- list(blue, green, red, nir, swir1, swir2)
band_paths <- paste(sapply(bands, function(b) b$file_path()), collapse = ';')
# 3. Mask clouds using SCL
scl <- bundle$read_qa_layer('SCL')
# 4. Spectral indices
wbw_normalized_difference_index(input1 = nir$file_path(), input2 = red$file_path(),
output = 'ndvi.tif')
wbw_normalized_difference_index(input1 = green$file_path(), input2 = swir1$file_path(),
output = 'mndwi.tif')
wbw_normalized_difference_index(input1 = nir$file_path(), input2 = swir2$file_path(),
output = 'nbr.tif')
ndvi <- wbw_read_raster('ndvi.tif')
mndwi <- wbw_read_raster('mndwi.tif')
nbr <- wbw_read_raster('nbr.tif')
# 5. PCA decorrelation
wbw_principal_component_analysis(inputs = band_paths,
output = 'pca_loadings.html',
num_comp = 4,
standardised = TRUE)
pc_paths <- paste(paste0('pc', 1:4, '.tif'), collapse = ';')
# 6. Feature stack = bands + indices + PCA scores
feature_paths <- paste(c(band_paths, 'ndvi.tif', 'mndwi.tif', 'nbr.tif', pc_paths),
collapse = ';')
# 7. Train random forest
wbw_random_forest_classification_fit(inputs = feature_paths,
training = 'training_polygons.shp',
field = 'CLASS',
output = 'rf_model.bin',
n_trees = 500,
test_proportion = 0.25)
# 8. Predict
wbw_random_forest_classification_predict(inputs = feature_paths,
model = 'rf_model.bin',
output = 'lulc.tif')
# 9. Generalise
wbw_generalize_classified_raster(i = 'lulc.tif', output = 'lulc_clean.tif', min_size = 9)
# 10. Accuracy assessment
wbw_kappa_index(i1 = 'lulc_clean.tif', i2 = 'validation_reference.tif',
output = 'accuracy.html')
# 11. Quick-look composite for QC
bundle$write_true_colour(output_path = 'quicklook_truecolour.tif')
cat('Remote sensing workflow complete.\n')
Tips
- Use bundles for scene-level ingestion:
wbw_sensor_bundle_from_path()eliminates hardcoded band filenames and works identically across Sentinel-2, Landsat, PlanetScope, and other supported families. - Screen cloud cover before processing: Check bundle metadata
cloud_cover_percentbefore loading all bands to skip unusable scenes early in a batch workflow. - Atmospheric correction is iterative: Raw digital numbers and even surface reflectance products may still carry illumination and atmospheric artefacts. Histogram matching across scenes is a simple relative normalisation that works well when no reference spectrum is available.
- Align band resolution before stacking: Sentinel-2 delivers 10 m (Blue, Green, Red, NIR) and 20 m (Red Edge, SWIR) bands. Upscale the 20 m bands to 10 m using bilinear resampling before combining them in a feature stack.
- Always mask clouds and cloud shadows: Use quality bands (Sentinel-2 SCL or Landsat QA_PIXEL) and apply bitwise tests via raster calculator to isolate valid pixels.
- Balance training data: Training datasets often over-represent dominant classes (e.g., forest) relative to rare classes (e.g., wetland). Sample training polygons proportional to expected class area, or oversample rare classes to improve model accuracy.
- Check spectral separability: If accuracy assessment reports Jeffries-Matusita distance < 1.5 between any two classes, consider merging classes or collecting more spectrally diverse training polygons.
- Use time-series techniques for change detection: Multi-date classifications can show spurious change due to atmospheric variation. Spectral indices are more robust; consider computing NDVI or NDWI time series and detecting change directly in index space.
- Memory is your bottleneck: Large multispectral stacks fill RAM quickly. Use band-by-band processing or out-of-memory methods for scenes > 1 GB.
Raster Analysis
Raster analysis in WbW-R covers the end-to-end workflow of reading, transforming, and writing gridded data — from simple cell-value arithmetic through multi-layer overlays, proximity operations, interpolation, and statistical testing. All heavy computation runs in the Whitebox backend.
Core Concepts
Raster analysis requires understanding these fundamental terms:
- Cell (pixel): The smallest unit of a raster. Each cell stores a single value (integer or floating-point) and has a uniform spatial extent (e.g. 10 m × 10 m).
- Data type: Integer (Int8, Int16, Int32) for categorical data; Float32 or Float64 for continuous measurements. Data type affects precision, file size, and computation speed.
- NoData value: Sentinel value representing missing or invalid data (e.g. -9999 or NaN). Critical for masking water, clouds, or invalid measurements in focal operations.
- Spatial reference (CRS): Coordinate system and projection. Mismatched CRS between rasters causes silent misalignment; always verify before overlay operations.
- Extent: The bounding box (xmin, ymin, xmax, ymax) of the raster in real-world coordinates.
- Cell size (resolution): Cell width and height in map units. Coarser resolution is faster but loses detail; finer resolution requires more memory and computation.
- Focal operation: Uses neighbourhood values (e.g. 3×3 kernel) to compute output. Examples: moving average, Sobel edge detection, local extrema.
- Zonal operation: Aggregates grid values by zone (polygon or categorical layer). Examples: mean by land-cover class, sum by administrative boundary.
- Reclassification: Reassigning cell values according to lookup rules. Common for categorizing continuous data (e.g. slope classes) or remapping land-cover codes.
- Resampling: Changing cell size or alignment. Methods: nearest-neighbour (preserves categories), bilinear (smooth), cubic (smoother).
Session Setup
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/raster')
Reading and Inspecting Rasters
r <- wbw_read_raster('input.tif')
meta <- r$metadata()
cat('Rows:', meta$rows, ' Cols:', meta$columns, '\n')
cat('Cell size:', meta$resolution_x, 'x', meta$resolution_y, '\n')
cat('EPSG:', meta$epsg, '\n')
cat('NoData:', meta$nodata, '\n')
cat('Data type:', meta$data_type, '\n')
Raster Calculator
raster_calculator evaluates an algebraic expression that combines one or more raster inputs:
# Single-raster expression — multiply by constant
wbw_raster_calculator(statement = "'elevation.tif' * 3.28084",
output = 'elevation_ft.tif')
# Multi-raster NDVI expression
wbw_raster_calculator(statement = "('nir.tif' - 'red.tif') / ('nir.tif' + 'red.tif')",
output = 'ndvi.tif')
# Conditional expression using isnull() and nodata()
wbw_raster_calculator(statement = "if(isnull('input.tif'), nodata(), 'input.tif' + 100.0)",
output = 'result.tif')
Special tokens available in statements: nodata(), isnull(), if(), abs(), sqrt(), log(), log2(), exp(), min(), max(), pi, integer constants, and floating-point constants.
Reclassification
# Reclassify using from-to-becomes triplets
# Format: "from;to;new;from;to;new;..."
wbw_reclass(i = 'slope.tif',
output = 'slope_class.tif',
reclass_vals = '0;5;1;5;15;2;15;30;3;30;45;4;45;90;5',
assign_mode = FALSE)
# Equal-interval reclassification
wbw_reclass_equal_interval(i = 'ndvi.tif',
output = 'ndvi_class.tif',
interval = 0.1,
start_val = -1.0,
end_val = 1.0)
# Reclassify from a CSV lookup table
wbw_reclass_from_file(i = 'landcover.tif',
reclass_file = 'reclass_table.txt',
output = 'landcover_reclassed.tif')
Focal Statistics (Moving Windows)
# Gaussian filter
wbw_gaussian_filter(i = 'dem.tif', output = 'dem_gauss.tif', sigma = 1.5)
# Median filter (feature-preserving)
wbw_median_filter(i = 'dem.tif', output = 'dem_median.tif', filterx = 5, filtery = 5,
sig_digits = 2)
# Feature-preserving smoothing (Zhang et al.)
wbw_feature_preserving_smoothing(dem = 'dem.tif', output = 'dem_fps.tif', filter = 11,
norm_diff = 8.0, num_iter = 3, max_diff = 0.5, zfactor = 1.0)
# Standard deviation in a window
wbw_standard_dev_filter(i = 'dem.tif', output = 'dem_sd.tif', filterx = 11, filtery = 11)
# Percentile filter
wbw_percentile_filter(i = 'dem.tif', output = 'dem_pct75.tif', filterx = 11, filtery = 11,
sig_digits = 2)
Morphological Operations
# Morphological closing (fills gaps in foreground)
wbw_closing(i = 'binary.tif', output = 'binary_close.tif', filterx = 3, filtery = 3)
# Morphological opening (removes small foreground blobs)
wbw_opening(i = 'binary.tif', output = 'binary_open.tif', filterx = 3, filtery = 3)
# Top-hat transform (white)
wbw_tophat_transform(i = 'raster.tif', output = 'tophat.tif', filterx = 11, filtery = 11,
variant = 'white')
Global and Zonal Statistics
# Global statistics (summary of entire raster)
wbw_raster_histogram(i = 'dem.tif', output = 'dem_histogram.html')
# Zonal statistics — mean elevation per watershed zone
wbw_zonal_statistics(i = 'dem.tif',
features = 'watersheds.tif',
output = 'watershed_stats.html',
stat = 'mean',
out_raster = 'watershed_mean_elev.tif')
Raster Overlay Operations
# Weighted sum (multi-criteria suitability)
wbw_weighted_sum(inputs = 'soil.tif;slope.tif;distance.tif',
weights = '0.3;0.5;0.2',
output = 'suitability.tif')
# Weighted overlay (MCE) with constraint
wbw_weighted_overlay(inputs = 'factor1.tif;factor2.tif;factor3.tif',
weights = '0.4;0.4;0.2',
output = 'suitability_mce.tif',
scale_max = 5.0,
scale_min = 0.0,
scale_factor = 1.0)
Resampling and Aggregation
wbw_resample(inputs = 'dem.tif',
output = 'dem_10m.tif',
cell_size = 10.0,
method = 'bilinear')
wbw_aggregate_raster(i = 'dem.tif', output = 'dem_agg.tif', agg_factor = 5,
type = 'mean')
Proximity Analysis
# Euclidean distance
wbw_euclidean_distance(i = 'sources.tif', output = 'euclidean_dist.tif')
# Cost-distance accumulation
wbw_cost_distance(source = 'sources.tif',
cost = 'friction.tif',
out_accum = 'cost_accum.tif',
out_backlink = 'cost_backlink.tif')
# Least-cost path
wbw_cost_pathway(destination = 'destinations.tif',
backlink = 'cost_backlink.tif',
output = 'least_cost_path.tif',
zero_background = FALSE)
# Raster buffer
wbw_buffer_raster(i = 'features.tif', output = 'buffered.tif',
size = 250.0, gridcells = FALSE)
Raster Object Analysis
# Label connected patches (foreground = non-zero)
wbw_clump(i = 'binary.tif', output = 'patches.tif',
diag = TRUE, zero_back = TRUE)
# Remove small patches below area threshold (10 000 m²)
wbw_remove_spurs(i = 'patches.tif', output = 'patches_clean.tif',
iterations = 10)
# Raster area of each patch value
wbw_raster_area(i = 'patches.tif', output = 'patch_area.tif',
out_text = FALSE, units = 'map units', zero_back = TRUE)
Interpolation from Points
pts <- wbw_read_vector('sample_points.shp')
# IDW
wbw_idw_interpolation(i = pts$file_path(),
field = 'ELEV',
output = 'idw_surf.tif',
use_z = FALSE,
weight = 2.0,
radius = 2.5,
min_points = 2,
cell_size = 5.0)
# Natural Neighbour
wbw_natural_neighbour_interpolation(i = pts$file_path(),
field = 'ELEV',
output = 'nn_surf.tif',
use_z = FALSE,
cell_size = 5.0)
# Radial Basis Function
wbw_radial_basis_function_interpolation(i = pts$file_path(),
field = 'ELEV',
output = 'rbf_surf.tif',
num_points = 8,
cell_size = 5.0,
func_type = 'ThinPlateSpline',
poly_order = 1,
weight = 0.1)
Statistical Tests
# Kolmogorov-Smirnov normality test
wbw_ks_test_for_normality(i = 'dem.tif', output = 'ks_normality.html')
# Two-raster paired samples t-test
wbw_paired_sample_t_test(input1 = 'dem_2010.tif', input2 = 'dem_2020.tif',
output = 'ttest.html', num_samples = 1000)
Contour Generation
wbw_contours_from_raster(i = 'dem.tif',
output = 'contours.shp',
interval = 10.0,
base = 0.0,
smooth = 5,
tolerance = 10.0)
WbW-Pro Spotlight: Field Trafficability and Operation Planning
- Problem: Plan equipment timing and field access under variable moisture and weather conditions.
- Tool:
field_trafficability_and_operation_planning - Typical inputs: DEM, normalized soil-moisture raster, optional rainfall-risk raster.
- Typical outputs: Trafficability score raster, operation-class raster, and summary outputs.
result <- s$field_trafficability_and_operation_planning(
dem = 'field_dem.tif',
soil_moisture = 'soil_moisture_norm.tif',
rainfall_forecast = 'rainfall_risk_norm.tif',
output_prefix = 'field_12_trafficability'
)
print(result)
Note: This workflow requires a session initialized with a valid Pro licence.
Complete Raster Analysis Workflow
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/raster_workflow')
dem <- wbw_read_raster('dem.tif')
# 1. Smooth DEM
wbw_feature_preserving_smoothing(dem = dem$file_path(), output = 'dem_smooth.tif', filter = 11,
norm_diff = 8.0, num_iter = 3, max_diff = 0.5)
# 2. Slope
wbw_slope(dem = 'dem_smooth.tif', output = 'slope.tif', units = 'degrees')
# 3. Reclassify slope into erosion risk classes
wbw_reclass(i = 'slope.tif', output = 'slope_risk.tif',
reclass_vals = '0;5;1;5;15;2;15;30;3;30;90;4')
# 4. Euclidean distance to water
wbw_euclidean_distance(i = 'water_bodies.tif', output = 'dist_water.tif')
# 5. Multi-criteria suitability overlay
wbw_weighted_sum(inputs = paste('slope_risk.tif', 'dist_water.tif', 'soil_type.tif', sep=';'),
weights = '0.5;0.3;0.2',
output = 'suitability.tif')
# 6. Reclassify to binary mask (suitability > threshold)
wbw_raster_calculator(statement = "if('suitability.tif' >= 3.0, 1.0, 0.0)",
output = 'suitable_areas.tif')
# 7. Generate contours
wbw_contours_from_raster(i = dem$file_path(), output = 'contours_10m.shp',
interval = 10.0, base = 0.0, smooth = 3)
cat('Raster analysis complete.\n')
Tips
- Choose your data type: Use integers for categorical data (land cover, classifications) to minimize file size and computation time. Use floating-point (Float32 or Float64) only for continuous measurements (elevation, temperature, probability).
- Set NoData explicitly: Ensure your source rasters carry a valid NoData value. Missing NoData declarations can corrupt statistics and focal operations by including invalid pixels as zeros or false elevations.
- Compress carefully: LZW and DEFLATE compression work well for most data; avoid if you need rapid random access to interior tiles. Use COMPRESS=JPEG for photographic data only (lossy, unsuitable for analysis).
- Focal operations require buffering: Cells at raster edges cannot compute full neighbourhoods. Use
expand()or accept edge effects; never assume borders are valid in derivative rasters. - Zonal statistics are only as good as your zones: Ensure zone boundaries are topologically clean (no overlaps, no gaps). Overlapping zones cause double-counting; gaps cause NoData regions in output.
- Reclassification is fast but risky: Always validate output distributions (histogram) after reclassification. Off-by-one errors in class boundaries can silently produce wrong land-cover or suitability classes.
- Memory is the constraint for large rasters: Tiles > 2 GB require out-of-core or streaming processing. Use
read_by_block()for large files; avoid loading entire rasters into memory if they exceed available RAM. - Upsampling introduces artifacts: Never upsample (finer resolution) without a valid interpolation method. Nearest-neighbour upsampling creates blocky artefacts; bilinear is smoother but may violate data range (e.g. probability values > 1.0).
Vector Analysis
Vector GIS analysis in WbW-R covers attribute management, geometric measurement, shape analysis, spatial overlay, proximity tools, spatial joins, and vector-to-raster conversion. All computation runs in the Whitebox backend through wbw_<tool>(...) wrappers (or wbw_run_tool(...) when tool IDs are dynamic); R handles session management, sequencing, and result processing.
Core Concepts
Vector analysis depends on understanding these core concepts:
- Feature geometry: Points (single coordinate pairs), lines (ordered sequences of coordinate pairs), and polygons (rings of coordinates forming closed boundaries). Each feature type supports different analyses.
- Topology: The spatial relationships between features (adjacency, containment, intersection). Topological errors (overshoots, undershoots, self-intersections) corrupt overlay operations and topology queries.
- Attribute table: The database associated with each feature layer, carrying descriptive fields and values. Attribute queries filter features; joins link external tables.
- Spatial index: Internal index structure (R-tree or quadtree) enabling fast spatial queries. Used by intersection, containment, and proximity operations. Always build spatial indices on frequently queried layers.
- Envelope (bounding box): The minimum rectangular boundary of a feature or layer; used for quick spatial culling before geometry tests.
- Buffer: A polygon created at a fixed distance around a feature. Buffers model proximity zones and are fundamental to distance-based analysis.
- Overlay (intersection, union, difference): Combining two polygon layers to create a new layer. Union merges boundaries; intersection keeps overlapping area only; difference removes one layer from another.
- Dissolve (aggregation): Merging adjacent features with identical attribute values, creating larger aggregate features. Reduces feature count and simplifies geometry.
- Spatial join: Associating features from one layer with features from another based on spatial relationship (overlap, containment, proximity). Assigns attributes across layers.
- Proximity analysis: Finding nearest features, distances, or connectivity. Foundation for network analysis, market analysis, and accessibility studies.
Session Setup
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/vector')
Reading and Writing Vectors
polys <- wbw_read_vector('parcels.shp')
lines <- wbw_read_vector('roads.shp')
points <- wbw_read_vector('samples.shp')
meta <- polys$metadata()
cat('Feature count:', meta$num_features, '\n')
cat('Geometry type:', meta$geom_type, '\n')
cat('CRS:', meta$wkt, '\n')
Attribute Management
# Add a new field
wbw_add_field(i = polys$file_path(),
output = 'parcels_v2.shp',
field_name = 'AREA_HA',
field_type = 'Float')
# Delete an unwanted field
wbw_delete_field(i = 'parcels_v2.shp',
output = 'parcels_v3.shp',
field_name = 'OLD_FIELD')
# Rename a field
wbw_rename_field(i = 'parcels_v3.shp',
output = 'parcels_v4.shp',
input_field = 'AREA_HA',
output_field = 'HECTARES')
# Extract features by attribute value
wbw_extract_by_attribute(i = polys$file_path(),
output = 'large_parcels.shp',
field = 'AREA_M2',
filter_value = 10000.0,
filter_type = 'Greater Than')
Geometric Measurements
# Add area, perimeter, and basic shape metrics to polygon attribute table
wbw_add_polygon_coordinates_to_table(i = polys$file_path(),
output = 'parcels_geom.shp')
# Polygon shape index — compactness
wbw_compactness_ratio(i = polys$file_path(), output = 'parcels_compact.shp')
wbw_elongation_ratio(i = polys$file_path(), output = 'parcels_elong.shp')
wbw_related_circumscribing_circle(i = polys$file_path(), output = 'parcels_rcc.shp')
wbw_patch_orientation(i = polys$file_path(), output = 'parcels_orient.shp')
wbw_radius_of_gyration(i = polys$file_path(), output = 'parcels_rog.shp')
Geometric Operations
# Centroids
wbw_centroid_vector(i = polys$file_path(), output = 'centroids.shp')
# Convex hull
wbw_convex_hull(i = polys$file_path(), output = 'convex_hulls.shp')
# Minimum bounding envelopes
wbw_minimum_bounding_envelope(i = polys$file_path(), output = 'mbe.shp')
# Smooth vector polygons
wbw_smooth_vectors(i = polys$file_path(), output = 'parcels_smooth.shp', filter = 5)
# Simplify features (Douglas-Peucker)
wbw_simplify_line_or_polygon(i = polys$file_path(), output = 'parcels_simplified.shp',
dist = 5.0, remove_spurs = TRUE, errors_only = FALSE)
# Dissolve polygons on field value
wbw_dissolve(i = polys$file_path(), output = 'parcels_dissolved.shp',
field = 'LAND_USE', snap_tol = 0.001)
Spatial Overlay
# Clip
wbw_clip(i = polys$file_path(),
clip = 'study_area.shp',
output = 'clipped.shp',
snap_tol = 0.001)
# Intersect
wbw_intersect(i = polys$file_path(),
overlay = 'zones.shp',
output = 'intersection.shp',
snap_tol = 0.001)
# Erase
wbw_erase(i = polys$file_path(),
erase = 'exclusion_areas.shp',
output = 'erased.shp',
snap_tol = 0.001)
# Union
wbw_union(i = polys$file_path(),
overlay = 'other_layer.shp',
output = 'union.shp',
snap_tol = 0.001)
# Symmetrical difference
wbw_symmetrical_difference(i = polys$file_path(),
overlay = 'other_layer.shp',
output = 'symdiff.shp',
snap_tol = 0.001)
Proximity Analysis
# Euclidean distance from vector features
wbw_vector_points_to_raster(i = points$file_path(), output = 'points.tif', field = 'FID',
assign = 'last', nodata = TRUE, cell_size = 5.0, base = 'dem.tif')
wbw_euclidean_distance(i = 'points.tif', output = 'euclidean_dist.tif')
# Voronoi diagram
wbw_voronoi_diagram(i = points$file_path(), output = 'voronoi.shp')
Select by Location
wbw_select_by_location(input = polys$file_path(),
select = 'stream_buffer.shp',
output = 'parcels_near_streams.shp',
condition = 'within')
Spatial Join
wbw_spatial_join(target = points$file_path(),
join = polys$file_path(),
output = 'points_joined.shp',
condition = 'within',
attr = 'first')
Aggregation Strategies
# Join and aggregate field values from nearest polygon
for (stat in c('count', 'sum', 'mean', 'min', 'max')) {
wbw_spatial_join(target = 'zones.shp',
join = 'observations.shp',
output = paste0('zones_', stat, '.shp'),
condition = 'contains',
attr = stat)
}
Vector-to-Raster Conversion
# Rasterize polygon layer
wbw_vector_polygons_to_raster(i = polys$file_path(), output = 'parcels_raster.tif',
field = 'LAND_USE_ID', nodata = TRUE, cell_size = 5.0, base = 'dem.tif')
# Rasterize line layer
wbw_vector_lines_to_raster(i = lines$file_path(), output = 'roads_raster.tif',
field = 'FID', nodata = TRUE, cell_size = 5.0, base = 'dem.tif')
# Rasterize points
wbw_vector_points_to_raster(i = points$file_path(), output = 'points_raster.tif',
field = 'VALUE', assign = 'max', nodata = TRUE, cell_size = 5.0)
Field Calculator
# SQL-style field update through runtime tool invocation
fc_result <- s$run_tool(
'field_calculator',
list(
input = polys$file_path(),
field = 'AREA_HA',
field_type = 'float',
expression = 'CASE WHEN AREA_M2 IS NULL THEN NULL ELSE AREA_M2 / 10000.0 END',
overwrite = TRUE,
output = 'parcels_calc.gpkg'
)
)
# Preview-only mode (no output write); returns preview payload
fc_preview <- s$run_tool(
'field_calculator',
list(
input = polys$file_path(),
field = 'SPEED',
field_type = 'integer',
expression = "CASE TYPE WHEN 'motorway' THEN 100 ELSE 60 END",
overwrite = TRUE,
preview_rows = 10
)
)
print(fc_preview$outputs$preview)
field_calculator now supports SQL-style CASE, UPDATE ... SET ... WHERE ...
wrappers, SQL operators/null predicates, and CAST(... AS type) expressions.
Point Cluster Analysis
# Kernel density estimation (heat map)
wbw_kernel_density_estimation(i = points$file_path(),
output = 'heatmap.tif',
bandwidth = 200.0,
kernel_type = 'quartic',
cell_size = 5.0,
base = 'dem.tif')
# Hexagonal binning
wbw_create_hexagonal_vector_grid(i = 'study_area.shp', output = 'hex_grid.shp', width = 500.0, orientation = 'horizontal')
wbw_spatial_join(target = 'hex_grid.shp', join = points$file_path(),
output = 'hex_counts.shp', condition = 'contains', attr = 'count')
WbW-Pro Spotlight: Market Access and Site Intelligence
- Problem: Rank candidate sites using repeatable network-access and demand logic.
- Tool:
market_access_and_site_intelligence_workflow - Typical inputs: Network, existing sites, candidate sites, demand surface, drive-time rings.
- Typical outputs: Catchment polygons, competitive-overlap layer, candidate-ranking CSV, executive summary JSON.
result <- s$run_tool(
'market_access_and_site_intelligence_workflow',
list(
network = 'street_network.shp',
sites_existing = 'existing_sites.shp',
sites_candidates = 'candidate_sites.shp',
demand_surface = 'demand_points.shp',
ring_costs = c(5.0, 10.0, 15.0),
catchments_output = 'candidate_catchments.shp',
overlap_analysis_output = 'competitive_overlap.shp',
candidate_rank_csv = 'candidate_rankings.csv',
executive_summary_json = 'market_summary.json'
)
)
print(result)
Note: This workflow requires a session initialized with a valid Pro licence.
Complete Vector Analysis Workflow
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/vector_workflow')
parcels <- wbw_read_vector('parcels.shp')
study <- wbw_read_vector('study_area.shp')
streams <- wbw_read_vector('streams.shp')
# 1. Clip to study area
wbw_clip(i = parcels$file_path(), clip = study$file_path(),
output = 'parcels_clipped.shp', snap_tol = 0.001)
# 2. Add shape metrics
wbw_compactness_ratio(i = 'parcels_clipped.shp', output = 'parcels_shape.shp')
# 3. Buffer streams and intersect with parcels
wbw_buffer_raster(i = streams$file_path(), output = 'stream_buf.shp',
size = 30.0, gridcells = FALSE)
wbw_intersect(i = 'parcels_shape.shp', overlay = 'stream_buf.shp',
output = 'riparian_parcels.shp', snap_tol = 0.001)
# 4. Dissolve by land-use class
wbw_dissolve(i = 'riparian_parcels.shp', output = 'riparian_dissolved.shp',
field = 'LAND_USE', snap_tol = 0.001)
# 5. Rasterize result
wbw_vector_polygons_to_raster(i = 'riparian_dissolved.shp', output = 'riparian.tif',
field = 'LAND_USE_ID', nodata = TRUE, cell_size = 5.0)
cat('Vector analysis complete.\n')
Tips
- Always validate topology before analysis: Run
check_vector_topology()to detect overshoots, undershoots, self-intersections, and sliver polygons. Topological errors propagate through overlay and spatial join operations. - Build spatial indices on large layers: Large datasets (> 10,000 features) benefit from spatial indexing. Use
build_spatial_index()explicitly before repeated spatial queries; operations like containment or proximity are fast with indices. - Choose your overlay operation carefully: Union retains all boundaries and combines attributes (can create many small slivers). Intersection keeps only overlapping regions. Difference retains Polygon A minus Polygon B. Test on small subsets first.
- Dissolve reduces feature count and file size: After overlay, dissolve by ownership or category to collapse unnecessary edges. Dissolved layers render faster and are cleaner for publication.
- Spatial joins are sensitive to alignment: Ensure both input layers use the same CRS and are free of topology errors. Reproject to equal-area projection before computing buffer distances or areas for analysis.
- Buffer distance and units matter: Buffer distances are in map units (meters, feet, degrees). Use an equal-area projection if precise areas or distances are critical. Negative buffers can collapse small polygons (inset); test with small buffer values first.
- Attribute table size is a memory constraint: Attribute tables with millions of rows and dozens of fields consume RAM. Export to CSV or database for large tables; work with summaries or samples when memory is limited.
- Point-in-polygon operations scale with complexity: Containment tests are O(n) per point; on large datasets (> 1 million points), consider spatial index binning or vector-to-raster conversion for speed.
Online Data Downloads
This chapter covers downloading vector data directly from online providers into WbW-R workflows. The first provider is OpenStreetMap (OSM) through the Overpass API using tool ID download_osm_vector.
Scope and Current Provider
Current online-data tool:
download_osm_vector
In R, use wbw_run_tool(...) with explicit argument lists.
Quick Start
library(whiteboxworkflows)
session <- wbw_session()
result <- wbw_run_tool(
"download_osm_vector",
args = list(
west = -80.54,
south = 43.41,
east = -80.47,
north = 43.47,
filter_preset = "roads",
include_points = FALSE,
include_lines = TRUE,
include_polygons = FALSE,
output = "kitchener_roads.geojson"
),
session = session
)
print(result$outputs$path)
Presets and Filters
Preset classes:
allroadsbuildingswaterlandusetrailsparksrailamenitiesboundariestransitpoi
Optional custom filters:
filter_key = "amenity"filter_key_value = "amenity=school"
When custom filters are provided, they are used instead of preset filtering.
Geometry Controls
Use geometry toggles to reduce payload and output complexity:
include_pointsinclude_linesinclude_polygons
Examples:
- Streets only: points off, lines on, polygons off
- Building footprints: points off, lines off, polygons on
Phase 2 options:
split_output_by_geometry = TRUEwrites separate files with_points,_lines, and_polygonssuffixes.
Caching and Provenance
Use optional caching when running repeated AOI/filter requests:
cache_dir = ".wbw_cache/osm"cache_ttl_hours = 24(set0to disable TTL checks)
Use provenance_output to write a JSON sidecar with endpoint, bbox, filters, feature counts, and cache usage metadata.
wbw_run_tool(
"download_osm_vector",
args = list(
west = -80.54,
south = 43.41,
east = -80.47,
north = 43.47,
filter_preset = "trails",
include_points = FALSE,
include_lines = TRUE,
include_polygons = FALSE,
split_output_by_geometry = TRUE,
cache_dir = ".wbw_cache/osm",
cache_ttl_hours = 24,
provenance_output = "kitchener_trails_provenance.json",
output = "kitchener_trails.geojson"
),
session = session
)
Projection and Output
Rules:
- Query extent is in EPSG:4326 (longitude/latitude).
- Set
input_extent_epsgto provide west/south/east/north in another CRS (the bbox is transformed to EPSG:4326 before querying Overpass). - Use
output_epsgto reproject output. - Output format is inferred from output extension.
Endpoint selection:
overpass_profilesupports:main,kumi,fr,custom.overpass_urloverrides the selected profile URL when provided.
Large-AOI chunking:
chunk_large_aoi = TRUE(default) automatically tiles large query extents.chunk_max_area_deg2 = 4.0controls maximum area per chunk.max_chunk_count = 64caps the number of generated chunk requests.chunk_parallel_requests = 1(default) controls bounded parallel chunk fetch; set >1 to fetch chunks concurrently.
wbw_run_tool(
"download_osm_vector",
args = list(
west = -80.54,
south = 43.41,
east = -80.47,
north = 43.47,
filter_preset = "buildings",
include_points = FALSE,
include_lines = FALSE,
include_polygons = TRUE,
output_epsg = 32617,
output = "kitchener_buildings_utm17n.gpkg"
),
session = session
)
Operational Guidance
Overpass public endpoints have rate limits and shared infrastructure constraints.
Recommended practice:
- Use smaller AOIs
- Prefer thematic filters
- Cap responses with
max_elements - Increase
timeout_secondsonly when needed
Attribution and Licensing
OSM data are licensed under ODbL. Ensure appropriate OpenStreetMap attribution and verify obligations for redistributed outputs.
Companion Example
See:
crates/wbw_r/examples/osm_download_vector.R
Network Analysis
Whitebox Next Gen R brings the same deep network-analysis engine as the Python API: topology auditing, point-to-point routing, service areas, closest facility, OD cost matrices, location-allocation, accessibility metrics, sensitivity analysis, multimodal transit modelling, map matching, and fleet dispatch optimization. This chapter walks through those capabilities in order, mirroring the prepare-then-query-then-scale-up workflow used in practice.
Capability Note (Open Tier)
The workflows in this chapter target the open-tier engine and include advanced
network controls such as turn/u-turn penalties, node-entry costs, and optional
time-dependent edge profiles (temporal_cost_profile + departure_time) for
scenario and peak-period analysis.
Session Setup
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/network')
Core Concepts You Should Know First
Before running tools, it helps to align on a few core terms used throughout this chapter.
- Network: A graph made of edges (road or transit segments) and nodes (intersections, stops, junctions).
- Cost / impedance: The value minimized during routing. This can be distance, travel time, generalized cost, or another friction metric.
- Origin / destination (OD): Origins are trip start points; destinations are trip end points.
- OD matrix: A table of costs from many origins to many destinations. This is the standard structure for accessibility, market access, and assignment analyses.
- Shortest path: The minimum-cost path between one origin and one destination.
- K-shortest paths: The best k distinct alternatives between the same OD pair, useful for resilience and choice modelling.
- Service area (isochrone): The portion of the network reachable from an origin within a cost threshold (for example 10 minutes).
- Closest facility: For each incident or demand point, the least-cost route to the nearest candidate facility on the network.
- Location-allocation: Selecting facility sites that optimize a demand objective, such as minimizing total travel cost or maximizing coverage.
- Connectivity: Whether all required origins and destinations are in the same connected component. Disconnected components cause failed routes.
- Node degree: The number of edges touching a node. Degree supports basic network centrality interpretation and QA for odd junction structure.
- Multimodal routing: Pathfinding across multiple transport modes (walk/bus/rail) with transfer penalties and mode constraints.
- Map matching: Snapping GPS trajectories to the most plausible sequence of network edges.
If you keep these definitions in mind, each workflow step below becomes easier to interpret and validate.
Modeling Intersection Delay With Node Costs
Network tools in this chapter support optional node-entry cost modeling for intersections, gates, crossings, or turn-heavy junctions:
node_cost_points: point layer containing node-cost observations.node_cost_field: numeric field innode_cost_pointswith non-negative entry cost values.node_cost_snap_distance: optional max assignment distance from each node-cost point to the nearest network node.
Use node costs when edge impedance alone underestimates urban delay at intersections.
Step 1 — Prepare and Audit the Network
Every routing workflow should begin with a topology check.
Topology Audit
network_topology_audit scans a line network for dead ends, pseudo-nodes,
overshoots, and isolated islands, writing each flagged location as a point
feature and optionally producing a text report.
wbw_network_topology_audit(i = 'roads.shp',
output = 'topology_errors.shp',
snap_tolerance = 0.5,
one_way_field = 'ONEWAY',
report = 'topology_report.txt')
Review topology_report.txt to understand the error count and class
distribution before continuing.
Connected Components
network_connected_components assigns a component identifier to every edge so
you can identify and resolve disconnected islands before running OD queries.
wbw_network_connected_components(i = 'roads.shp',
output = 'roads_components.shp',
snap_tolerance = 0.5)
# Edges not in the dominant component are candidates for removal or bridging.
Node Degree
network_node_degree writes the degree of every node as a point layer.
Degree-1 nodes are dead ends; unusually high-degree nodes may be duplicates.
wbw_network_node_degree(i = 'roads.shp',
output = 'node_degree.shp',
snap_tolerance = 0.5)
Building Network Topology
If your raw network lacks proper topology (node points, edge connectivity structure), use build_network_topology() to construct nodes and validate edges. This is essential before running advanced analysis like service areas or facility location.
result <- wbw_build_network_topology(i=roads, snap_tolerance=0.5)
edges <- result$edges
nodes <- result$nodes
wbw_write_vector(edges, 'roads_noded.shp')
wbw_write_vector(nodes, 'network_nodes.shp')
Snapping Facilities and Demand Points
Before routing from facilities or demand points, snap them to the nearest network location. This ensures routing queries don't fail on "off-network" origins.
facilities <- wbw_read_vector('fire_stations.shp')
snapped <- wbw_snap_points_to_network(
network=edges,
points=facilities,
snap_distance=50.0 # meters
)
wbw_write_vector(snapped, 'fire_stations_snapped.shp')
# Output includes SNAP_DIST (offset to network) and snapped geometry.
Step 2 — Shortest Path and Alternatives
Single Shortest Path
shortest_path_network finds the minimum-cost path between two coordinates
using Dijkstra's algorithm. Supply edge_cost_field for travel-time routing;
omit it to route by Euclidean arc length.
wbw_shortest_path_network(i = 'roads.shp',
output = 'route_shortest.shp',
start_x = 454230.0,
start_y = 4823150.0,
end_x = 458900.0,
end_y = 4819700.0,
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY')
Turn penalties model the real cost of left, right, and U-turns in dense urban networks.
wbw_shortest_path_network(i = 'roads.shp',
output = 'route_with_turns.shp',
start_x = 454230.0,
start_y = 4823150.0,
end_x = 458900.0,
end_y = 4819700.0,
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY',
node_cost_points = 'intersection_delay_points.shp',
node_cost_field = 'DELAY_MIN',
node_cost_snap_distance = 25.0,
turn_penalty = 0.5,
u_turn_penalty = 3.0,
forbid_u_turns = TRUE)
K-Shortest Alternative Paths
k_shortest_paths_network returns the k least-cost distinct paths for the
same endpoints — useful for resilience analysis and presenting alternatives to
planners.
wbw_k_shortest_paths_network(i = 'roads.shp',
output = 'routes_k3.shp',
start_x = 454230.0,
start_y = 4823150.0,
end_x = 458900.0,
end_y = 4819700.0,
k = 3L,
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY')
# Each feature carries a PATH_RANK attribute (1 = shortest).
Step 3 — Service Areas
network_service_area delineates every part of the network reachable within a
cost threshold from one or more origins. Typical uses include drive-time
catchments for emergency services, walking isochrones around transit stops, and
delivery zones.
wbw_network_service_area(i = 'roads.shp',
origins = 'fire_stations.shp',
output = 'fire_catchment_5min.shp',
max_cost = 5.0,
snap_tolerance = 20.0,
output_mode = 'polygon',
polygon_merge_origins = TRUE,
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY')
To model rush-hour conditions, pass a temporal speed profile and apply turn penalties.
wbw_network_service_area(i = 'roads.shp',
origins = 'fire_stations.shp',
output = 'fire_catchment_5min_am_peak.shp',
max_cost = 5.0,
snap_tolerance = 20.0,
output_mode = 'polygon',
polygon_merge_origins = TRUE,
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY',
node_cost_points = 'intersection_delay_points.shp',
node_cost_field = 'DELAY_MIN',
node_cost_snap_distance = 25.0,
turn_penalty = 0.3,
u_turn_penalty = 2.0,
forbid_u_turns = TRUE,
temporal_cost_profile = 'rush_hour_profiles.csv',
temporal_edge_id_field = 'EDGE_ID',
departure_time = '2024-06-15T08:00:00Z',
temporal_mode = 'multiplier',
temporal_fallback = 'static_cost')
Use output_mode = 'edges' to retain actual road arcs inside the catchment
rather than fill a polygon — more appropriate when the network is sparse.
Step 4 — Closest Facility
closest_facility_network routes each incident point to its nearest facility,
measuring cost along the network rather than in straight-line distance. This
is the core tool for emergency-response siting, healthcare access studies, and
school-catchment delineation.
wbw_closest_facility_network(i = 'roads.shp',
incidents = 'accidents.shp',
facilities = 'hospitals.shp',
output = 'routes_to_hospital.shp',
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY')
# Output carries INCIDENT_FID, FACILITY_FID, and COST fields per route.
For peak-hour response-time analysis, combine turn penalties with a temporal speed profile.
wbw_closest_facility_network(i = 'roads.shp',
incidents = 'accidents.shp',
facilities = 'hospitals.shp',
output = 'routes_to_hospital_am_peak.shp',
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY',
node_cost_points = 'intersection_delay_points.shp',
node_cost_field = 'DELAY_MIN',
node_cost_snap_distance = 25.0,
turn_penalty = 0.5,
u_turn_penalty = 3.0,
forbid_u_turns = TRUE,
temporal_cost_profile = 'rush_hour_profiles.csv',
temporal_edge_id_field = 'EDGE_ID',
departure_time = '2024-06-15T08:00:00Z',
temporal_mode = 'multiplier',
temporal_fallback = 'static_cost')
Step 5 — OD Cost Matrix and Batch Route Export
OD Cost Matrix
network_od_cost_matrix solves all pairwise paths and writes results to a CSV.
Each row contains an origin identifier, a destination identifier, and the
network cost between them.
wbw_network_od_cost_matrix(i = 'roads.shp',
origins = 'schools.shp',
destinations = 'libraries.shp',
output = 'od_costs.csv',
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY')
od <- read.csv('od_costs.csv')
# Minimum travel time from each school to any library:
print(aggregate(COST ~ ORIGIN_FID, data = od, FUN = min))
For a time-of-day comparison, run a second matrix at AM-peak departure.
wbw_network_od_cost_matrix(i = 'roads.shp',
origins = 'schools.shp',
destinations = 'libraries.shp',
output = 'od_costs_am_peak.csv',
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY',
node_cost_points = 'intersection_delay_points.shp',
node_cost_field = 'DELAY_MIN',
node_cost_snap_distance = 25.0,
turn_penalty = 0.5,
temporal_cost_profile = 'am_peak_profiles.csv',
temporal_edge_id_field = 'EDGE_ID',
departure_time = '2024-06-15T08:00:00Z',
temporal_mode = 'multiplier',
temporal_fallback = 'static_cost')
Materializing OD Routes as Geometry
network_routes_from_od creates the actual path lines between OD pairs.
wbw_network_routes_from_od(i = 'roads.shp',
origins = 'schools.shp',
destinations = 'libraries.shp',
output = 'od_routes.shp',
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY')
Step 6 — Location-Allocation
location_allocation_network solves the p-median problem: given candidate
facility locations and weighted demand points, which p facilities minimise
total travel cost? Directly supports clinic siting, school consolidation, and
warehouse network design.
wbw_location_allocation_network(i = 'roads.shp',
demand_points = 'demand_points.shp',
facilities = 'candidate_sites.shp',
output = 'selected_facilities.shp',
facility_count = 4L,
solver_mode = 'minimize_impedance',
demand_weight_field = 'POP',
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES')
# SELECTED == 1 on the four chosen candidate sites.
# Demand points carry ASSIGNED_FID linking each to its nearest selected site.
Supported solver modes: minimize_impedance (p-median), maximize_coverage,
and maximize_attendance.
To optimise under peak-hour travel times, pass a temporal profile.
wbw_location_allocation_network(i = 'roads.shp',
demand_points = 'demand_points.shp',
facilities = 'candidate_sites.shp',
output = 'selected_facilities_am_peak.shp',
facility_count = 4L,
solver_mode = 'minimize_impedance',
demand_weight_field = 'POP',
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES',
node_cost_points = 'intersection_delay_points.shp',
node_cost_field = 'DELAY_MIN',
node_cost_snap_distance = 25.0,
temporal_cost_profile = 'am_peak_profiles.csv',
temporal_edge_id_field = 'EDGE_ID',
departure_time = '2024-06-15T08:00:00Z',
temporal_mode = 'multiplier',
temporal_fallback = 'static_cost')
Step 7 — Network Accessibility Metrics
compute_network_accessibility() is exposed as a typed facade wrapper. It
computes a gravity-model or cumulative-opportunity accessibility score per
origin — a standard indicator in transport equity analysis.
residents <- wbw_read_vector('resident_centroids.shp', session = s)
supermarkets <- wbw_read_vector('supermarkets.shp', session = s)
result <- s$compute_network_accessibility(
input = 'roads.shp',
origins = residents$file_path(),
destinations = supermarkets$file_path(),
output = 'food_accessibility.shp',
edge_cost_field = 'MINUTES',
node_cost_points = 'intersection_delay_points.shp',
node_cost_field = 'DELAY_MIN',
node_cost_snap_distance = 25.0,
impedance_cutoff = 30.0,
decay_function = 'negative_exponential',
decay_parameter = 0.1
)
# Each origin point carries an ACCESS_SCORE field.
Step 8 — OD Sensitivity Analysis
analyze_od_cost_sensitivity() quantifies how stable OD costs are under
stochastic perturbation of edge weights — useful for stress-testing a routing
model against travel-time uncertainty or hypothetical road-closure scenarios.
result <- s$analyze_od_cost_sensitivity(
input = 'roads.shp',
origins = 'schools.shp',
destinations = 'libraries.shp',
output = 'od_sensitivity.shp',
edge_cost_field = 'MINUTES',
node_cost_points = 'intersection_delay_points.shp',
node_cost_field = 'DELAY_MIN',
node_cost_snap_distance = 25.0,
impedance_disturbance_range = 0.2, # ±20 % perturbation
monte_carlo_samples = 500L
)
Step 9 — Multimodal Analysis
Whitebox Next Gen supports networks with a MODE field on each edge (e.g.
walk, cycle, bus, rail). Multimodal tools honour mode-specific speeds,
transfer penalties, and time-of-day profiles.
Multimodal OD Scenarios
analyze_multimodal_od_scenarios() runs a batch of named scenarios from a CSV,
each with different mode allowances, speed overrides, or departure times.
transit_net <- wbw_read_vector('transit_network.shp', session = s)
bus_stops <- wbw_read_vector('bus_stops.shp', session = s)
destinations <- wbw_read_vector('key_destinations.shp', session = s)
result <- s$analyze_multimodal_od_scenarios(
input = transit_net$file_path(),
origins = bus_stops$file_path(),
destinations = destinations$file_path(),
output = 'multimodal_od_scenarios.shp',
mode_field = 'MODE',
allowed_modes = 'walk,bus,rail',
transfer_penalty = 3.0,
edge_cost_field = 'MINUTES',
scenario_bundle_csv = 'scenarios.csv',
departure_time = '08:00',
temporal_mode = 'scheduled'
)
Exporting Multimodal Route Geometry
export_multimodal_routes_for_od_pairs() materializes the optimal multimodal
route for each OD pair with per-segment mode attributes.
result <- s$export_multimodal_routes_for_od_pairs(
input = transit_net$file_path(),
origins = bus_stops$file_path(),
destinations = destinations$file_path(),
output = 'multimodal_routes.shp',
mode_field = 'MODE',
allowed_modes = 'walk,bus,rail',
transfer_penalty = 3.0,
edge_cost_field = 'MINUTES'
)
Step 10 — Map Matching
map_matching_v1 snaps a raw GPS trajectory to the most plausible sequence of
network edges using a hidden Markov model with candidate expansion. It is the
first step in any floating-vehicle data or probe-data workflow.
wbw_map_matching_v1(i = 'roads.shp',
trajectory_points = 'gps_probe_points.shp',
timestamp_field = 'TIMESTAMP',
output = 'matched_route.shp',
search_radius = 30.0,
candidate_k = 5L,
snap_tolerance = 10.0,
edge_cost_field = 'MINUTES',
matched_points_output = 'matched_points.shp',
match_report = 'match_report.txt')
Step 11 — Fleet and Vehicle Routing (Pro)
fleet_routing_and_dispatch_optimizer solves CVRP and VRPTW problems: given
a fleet of vehicles and a set of service or delivery stops, it assigns and
sequences routes to minimise total cost subject to capacity and time-window
constraints.
result <- s$run_tool(
'fleet_routing_and_dispatch_optimizer',
list(
network = 'roads.shp',
depots = 'depots.shp',
stops = 'delivery_stops.shp',
vehicles_csv = 'fleet.csv',
route_output = 'fleet_routes.shp',
route_kpis_csv_output = 'fleet_kpis.csv',
edge_cost_field = 'MINUTES',
one_way_field = 'ONEWAY',
vrp_mode = 'VRPTW'
)
)
kpis <- read.csv('fleet_kpis.csv')
print(kpis)
Note: This tool requires a session initialised with a valid Pro licence.
Complete Workflow: Emergency Response Planning
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/emergency_planning')
# 1. Audit topology.
wbw_network_topology_audit(i = 'roads.shp', output = 'topology_errors.shp',
snap_tolerance = 0.5, report = 'topology_report.txt')
# 2. Five-minute drive catchments from existing stations.
wbw_network_service_area(i = 'roads.shp',
origins = 'fire_stations.shp',
output = 'existing_catchment_5min.shp',
max_cost = 5.0,
output_mode = 'polygon',
polygon_merge_origins = TRUE,
edge_cost_field = 'MINUTES',
snap_tolerance = 20.0)
# 3. Route historical incidents to nearest existing station.
wbw_closest_facility_network(i = 'roads.shp',
incidents = 'historical_incidents.shp',
facilities = 'fire_stations.shp',
output = 'incident_routes.shp',
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES')
# 4. Find two new station sites that maximise coverage.
wbw_location_allocation_network(i = 'roads.shp',
demand_points = 'historical_incidents.shp',
facilities = 'candidate_stations.shp',
output = 'new_station_sites.shp',
facility_count = 2L,
solver_mode = 'maximize_coverage',
snap_tolerance = 20.0,
edge_cost_field = 'MINUTES')
Tips
- Always run
network_topology_auditfirst — even one disconnected segment can cause a path query to return no result without an explicit error. - Use
network_connected_componentsto confirm all origins and destinations belong to the same component before running OD queries. - Supply
edge_cost_fieldpointing to a travel-time column for realistic routing; omit it only for pure geometric distance problems. - For scheduled transit, pass
temporal_cost_profileanddeparture_timeto load time-of-day speeds. - The
fleet_routing_and_dispatch_optimizerPro tool requires a session initialised with a valid Pro licence.
Linear Referencing
Linear referencing in WbW-R is the practice of locating events, measurements, or observations along a route using a distance-based measure rather than absolute coordinates. A road pavement database records a pothole at 2.4 km along route R-12; a pipeline corridor flags an anomaly at 847 m along a trunk line. Whitebox Next Gen provides the tools to locate observations onto measured routes, place events from tabular or spatial sources, and — with a Pro licence — audit the consistency of large linear asset datasets.
Session Setup
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/linear_referencing')
Route Calibration and M-Value Management
Measures are only useful when anchored to real-world control points. If your raw routes lack calibration, or have been edited, use the calibration tools to establish stable, field-verified measures.
Initial Calibration from Control Points
route_calibrate() establishes measure values on routes using control points
with known measures. For example, if you have kilometre posts at known
distances along a highway, calibration ensures your event locations align with
field reality.
routes <- wbw_read_vector('highway_centerlines.shp')
km_posts <- wbw_read_vector('km_post_locations.shp') # with ROUTE_ID and KNOWN_MEASURE fields
calibrated <- wbw_route_calibrate(
routes=routes,
control_points=km_posts,
control_measure_field='KNOWN_MEASURE',
route_id_field='ROUTE_ID',
snap_tolerance=10.0 # max control-point offset from route (meters)
)
wbw_write_vector(calibrated, 'highway_calibrated.shp')
# Output includes FROM_MEASURE and TO_MEASURE fields.
Recalibration After Edits
If you edit routes (split, merge, or regeometrize), use route_recalibrate()
to scale measures proportionally and maintain event alignment.
edited_routes <- wbw_read_vector('highway_edited.shp') # after geometric changes
recalibrated <- wbw_route_recalibrate(
original_routes=calibrated, # reference with valid measures
edited_routes=edited_routes,
route_id_field='ROUTE_ID'
)
wbw_write_vector(recalibrated, 'highway_recalibrated.shp')
Validating Event Snapping
Before placing events on routes, diagnose snapping issues with snap_events_to_routes().
This reports snap distance, offset, and any unmatched events.
obs_points <- wbw_read_vector('field_observations.shp')
diag <- wbw_snap_events_to_routes(
routes=calibrated,
events=obs_points,
max_offset_distance=15.0
)
wbw_write_vector(diag, 'observations_snap_diagnostics.shp')
# Output includes ROUTE_ID, MEASURE, and OFFSET fields; unmatched features are excluded.
Core Concepts
A linear-referencing workflow has three parts:
- Routes — line features defining the measurement axis. Each route has a unique identifier and M-values (cumulative distance from its start).
- Measures — the distance value used to locate a position along a route.
- Events — point or line observations located by (route_id, measure) or (route_id, from_measure, to_measure) pairs.
Common applications include road-pavement condition assessment, pipeline integrity monitoring, trail difficulty reporting, environmental transect sampling, and GPS probe data quality control.
Step 1 — Understand Your Route Geometry
Routes must be single-part polylines with a consistent digitizing direction. Before dropping events, confirm:
- Each route has a unique identifier stored in a field (e.g.
ROUTE_ID). - No route self-intersects.
- Routes forming a corridor are merged into one feature per identifier.
Use snap_endnodes and merge_line_segments via wbw_run_tool to clean
ragged street-centreline inputs before treating them as routes.
Step 2 — Locate Points Along Routes
locate_points_along_routes takes an existing point layer and finds the
nearest position on each matching route, writing back the M-value (measure)
for every point. Use this when field teams have collected GPS observation points
and you need to convert them to route-distance offsets.
wbw_locate_points_along_routes(routes = 'roads_measured.shp',
points = 'field_observations.shp',
output = 'observations_located.shp',
max_offset_distance = 15.0)
# Output adds ROUTE_ID, MEASURE, and OFFSET fields to every input point.
The MEASURE field is the along-route distance from the route start.
OFFSET is the perpendicular snap distance. Points beyond
max_offset_distance are excluded from the output.
Step 3 — Place Events from a Table
Point Events
route_event_points_from_table reads a CSV where each row specifies a route
identifier and a measure value, and places a point feature at that position.
This is the standard import path for lab results, inspection records, or
maintenance logs stored in external databases.
# pavement_defects.csv columns: ROUTE_ID, MEASURE, SEVERITY, NOTES
wbw_route_event_points_from_table(routes = 'roads_measured.shp',
events = 'pavement_defects.csv',
event_route_field = 'ROUTE_ID',
measure_field = 'MEASURE',
output = 'pavement_defects_located.shp')
Line (Interval) Events
route_event_lines_from_table reads FROM_MEASURE and TO_MEASURE columns
to produce line segments — useful for pavement condition ratings, speed zones,
or any attribute that applies to a stretch of route rather than a single point.
# pavement_condition.csv columns: ROUTE_ID, FROM_MEASURE, TO_MEASURE, IRI, CONDITION
wbw_route_event_lines_from_table(routes = 'roads_measured.shp',
events = 'pavement_condition.csv',
event_route_field = 'ROUTE_ID',
from_measure_field = 'FROM_MEASURE',
to_measure_field = 'TO_MEASURE',
output = 'pavement_condition_segments.shp')
Step 4 — Place Events from a Spatial Layer
When your event data is already a vector layer rather than a plain table, use
the _from_layer variants. These carry across all attributes of the source
feature and can optionally write the original FID and XY into the output.
Point Events from a Layer
wbw_route_event_points_from_layer(routes = 'roads_measured.shp',
events = 'manhole_inspections.shp',
event_route_field = 'ROUTE_ID',
measure_field = 'MEASURE',
output = 'manholes_on_routes.shp',
write_event_fid = TRUE,
write_event_xy = TRUE)
Line Events from a Layer
wbw_route_event_lines_from_layer(routes = 'roads_measured.shp',
events = 'speed_zone_events.shp',
event_route_field = 'ROUTE_ID',
from_measure_field = 'FROM_M',
to_measure_field = 'TO_M',
output = 'speed_zones_on_routes.shp',
write_event_fid = TRUE)
Step 5 — Linear Asset Governance (Pro)
route_event_governance_for_linear_assets audits a complete linear asset
dataset for measure gaps, overlaps, duplicate events, orphaned route
references, and out-of-range measures. It produces a flagged event output and
a structured report — essential for maintaining the integrity of a production
road or utility asset database.
result <- s$run_tool(
'route_event_governance_for_linear_assets',
list(
routes = 'roads_measured.shp',
events = 'pavement_condition.shp',
route_id_field = 'ROUTE_ID',
from_measure_field = 'FROM_MEASURE',
to_measure_field = 'TO_MEASURE',
flagged_output = 'event_flags.shp',
report = 'governance_report.csv'
)
)
flags <- read.csv('governance_report.csv')
print(table(flags$ERROR_CLASS))
Note: This tool requires a session initialised with a valid Pro licence.
Complete Workflow: Road Pavement Assessment
library(whiteboxworkflows)
s <- wbw_session()
setwd('/data/pavement_assessment')
# Step 1: Snap GPS observation points onto routes and extract M-values.
wbw_locate_points_along_routes(routes = 'roads_measured.shp',
points = 'field_inspection_gps.shp',
output = 'gps_on_routes.shp',
max_offset_distance = 10.0)
# Step 2: Place point defect records from the inspection database.
wbw_route_event_points_from_table(routes = 'roads_measured.shp',
events = 'defect_records.csv',
event_route_field = 'ROUTE_ID',
measure_field = 'MEASURE',
output = 'defects_located.shp')
# Step 3: Place condition rating intervals.
wbw_route_event_lines_from_table(routes = 'roads_measured.shp',
events = 'condition_ratings.csv',
event_route_field = 'ROUTE_ID',
from_measure_field = 'FROM_M',
to_measure_field = 'TO_M',
output = 'condition_segments.shp')
# Step 4 (Pro): Audit the condition layer for gaps and overlaps.
result <- s$run_tool(
'route_event_governance_for_linear_assets',
list(
routes = 'roads_measured.shp',
events = 'condition_segments.shp',
route_id_field = 'ROUTE_ID',
from_measure_field = 'FROM_M',
to_measure_field = 'TO_M',
flagged_output = 'condition_flags.shp',
report = 'governance_report.csv'
)
)
cat('Governance report:', 'governance_report.csv', '\n')
Tips
- Routes must have a consistent digitizing direction. Run
snap_endnodesand confirm that all segments in a route are digitized in the same direction before locating events. locate_points_along_routesexcludes points beyondmax_offset_distance. Inspect unmatched points to identify GPS outliers or route coverage gaps.- Use
route_event_points_from_tableandroute_event_lines_from_tablefor bulk imports from asset management databases where locations are already stored as route+measure pairs. - Use the
_from_layervariants when existing vector event layers already carry route identifier and measure fields. - The
route_event_governance_for_linear_assetsPro tool scales to production databases with millions of events and produces actionable error reports for integration into maintenance management systems.
API Reference
This section provides API-first documentation for:
- Tool wrappers (every available tool by theme).
- Non-tool session/facade functions.
The goal is to make API discovery stable and explicit, without relying only on autocomplete.
Sections
Source of Truth
- Facade/session API:
r-package/whiteboxworkflows/R/facade.R - Generated wrapper/session methods:
generated/wbw_tools_generated.R - Shared tool docs:
../wbw_python/docs/tools_*.md
Non-Tool Session And Facade API
This chapter documents non-tool APIs for whiteboxworkflows in R. Tool wrappers
are documented in Tool API Reference (All Tools).
Session Constructors
wbw_session(...)wbw_build_session(...)
License-aware startup modes are supported by constructor arguments for:
- open runtime
- floating license
- signed entitlement JSON/file
Tool Discovery And Execution (Generic)
wbw_tool_ids(session = ...)wbw_has_tool(tool_id, session = ...)wbw_search_tools(query, session = ...)wbw_describe_tool(tool_id, session = ...)get_tool_metadata_json(tool_id)get_tool_info_json(tool_id)wbw_run_tool(tool_id, args = list(), session = ...)wbw_run_tool_with_progress(tool_id, args = list(), session = ...)
Typed Data I/O
wbw_read_raster(path, session = ...)wbw_read_vector(path, session = ...)wbw_read_lidar(path, session = ...)wbw_read_bundle(path, session = ...)
Writers And Output Controls
wbw_write_raster(raster, output_path, ..., session = ...)wbw_write_rasters(rasters, output_paths, ..., session = ...)wbw_write_vector(vector, output_path, ..., session = ...)wbw_write_lidar(lidar, output_path, ..., session = ...)
Session-Level Utility Methods
wbw_build_session(...) provides session-bound helper methods, including:
- read/write helpers (
session$read_*,session$write_*) - metadata discovery helpers (
session$get_tool_metadata_json,session$get_tool_info_json) - memory management (
session$clear_memory, object-store clear/remove/count) - projection helpers (
session$projection_*) - topology helpers (
session$topology_*)
Projection Helpers
wbw_projection_to_ogc_wkt(...)wbw_projection_identify_epsg(...)wbw_projection_reproject_points(...)wbw_projection_reproject_point(...)wbw_projection_from_proj_string(...)wbw_projection_area_of_use(...)
Topology Helpers
wbw_topology_intersects_wkt(...)wbw_topology_contains_wkt(...)wbw_topology_within_wkt(...)wbw_topology_touches_wkt(...)wbw_topology_disjoint_wkt(...)wbw_topology_crosses_wkt(...)wbw_topology_overlaps_wkt(...)wbw_topology_covers_wkt(...)wbw_topology_covered_by_wkt(...)wbw_topology_relate_wkt(...)wbw_topology_distance_wkt(...)wbw_topology_vector_feature_relation(...)wbw_topology_is_valid_polygon_wkt(...)wbw_topology_make_valid_polygon_wkt(...)wbw_topology_buffer_wkt(...)
Generated Session Tool Methods
In addition to generic wbw_run_tool(...), generated session methods provide
direct tool wrappers (e.g., session$slope(...), session$d8_flow_accum(...),
etc.). These wrappers are generated and updated from runtime catalog metadata.
Tool API Reference (All Tools)
This chapter documents tool wrappers by theme.
For R usage, invoke tools either with:
- generic execution (
wbw_run_tool("tool_id", args = list(...), session = s)) - generated session wrappers (
s$tool_id(...))
Argument names and contracts in the shared tool docs map directly to R args
keys and wrapper parameters.
Important call-style note:
- Names shown in included lists are canonical tool identifiers.
- For generic execution, call by identifier through wbw_run_tool.
- For wrapper execution, use generated session methods on the session object.
- The nested category/subcategory convention is the canonical shape for Python WbEnvironment tool namespaces; in R, generated session wrappers and wbw_run_tool are the practical call surfaces.
For an exhaustive tool_id-to-R-call lookup, see Tool Call Paths (R).
Math And Statistics
Math and Statistical Tools
This document covers the Math tools currently ported into the new backend.
Unary Raster Math
These tools apply an element-wise mathematical operation to every non-nodata cell of a single input raster and write the result to an output raster.
Unary Tool Index
absarccosarcosharcsinarctanarsinhartanhbool_notceilcoscoshdecrementexpexp2floorincrementis_nodatalnlog10log2negatereciprocalroundsinsinhsqrtsquaretantanhto_degreesto_radianstruncate
abs
Calculates the absolute value of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.abs(input_raster, output_path="abs_dem.tif")
arccos
Computes the inverse cosine (in radians) of each non-nodata raster cell. Input values must be in the range [-1, 1].
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.arccos(input_raster, output_path="arccos_dem.tif")
arcosh
Computes the inverse hyperbolic cosine of each non-nodata raster cell. Input values must be ≥ 1.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.arcosh(input_raster, output_path="arcosh_dem.tif")
arcsin
Computes the inverse sine (in radians) of each non-nodata raster cell. Input values must be in the range [-1, 1].
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.arcsin(input_raster, output_path="arcsin_dem.tif")
arctan
Computes the inverse tangent (in radians) of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.arctan(input_raster, output_path="arctan_dem.tif")
arsinh
Computes the inverse hyperbolic sine of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.arsinh(input_raster, output_path="arsinh_dem.tif")
artanh
Computes the inverse hyperbolic tangent of each non-nodata raster cell. Input values must be in the range (-1, 1).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.artanh(input_raster, output_path="artanh_dem.tif")
ceil
Rounds each non-nodata raster cell upward to the nearest integer.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.ceil(input_raster, output_path="ceil_dem.tif")
cos
Computes the cosine (input in radians) of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.cos(input_raster, output_path="cos_dem.tif")
cosh
Computes the hyperbolic cosine of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.cosh(input_raster, output_path="cosh_dem.tif")
decrement
Subtracts 1 from each non-nodata raster cell value.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.decrement_raster(input_raster, output_path="dem_minus1.tif")
Note: The WbEnvironment method is named decrement_raster to avoid a name clash with the cell-level decrement helper method.
exp
Computes e raised to the power of each non-nodata raster cell value.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.exp(input_raster, output_path="exp_dem.tif")
exp2
Computes 2 raised to the power of each non-nodata raster cell value.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.exp2(input_raster, output_path="exp2_dem.tif")
floor
Rounds each non-nodata raster cell downward to the nearest integer.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.floor(input_raster, output_path="floor_dem.tif")
increment
Adds 1 to each non-nodata raster cell value.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.increment_raster(input_raster, output_path="dem_plus1.tif")
Note: The WbEnvironment method is named increment_raster to avoid a name clash with the cell-level increment helper method.
is_nodata
Outputs 1.0 for every nodata cell and 0.0 for every valid cell. Useful for creating nodata masks.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
mask = wbe.is_nodata_raster(input_raster, output_path="dem_nodata_mask.tif")
Note: The WbEnvironment method is named is_nodata_raster to avoid a name clash with the Raster-class is_nodata predicate.
ln
Computes the natural logarithm of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.ln(input_raster, output_path="ln_dem.tif")
log10
Computes the base-10 logarithm of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.log10(input_raster, output_path="log10_dem.tif")
log2
Computes the base-2 logarithm of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.log2(input_raster, output_path="log2_dem.tif")
negate
Negates each non-nodata raster cell value (multiplies by -1).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.negate(input_raster, output_path="neg_dem.tif")
reciprocal
Computes the reciprocal (1/x) of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.reciprocal(input_raster, output_path="recip_dem.tif")
round
Rounds each non-nodata raster cell to the nearest integer.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.round(input_raster, output_path="round_dem.tif")
sin
Computes the sine (input in radians) of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.sin(input_raster, output_path="sin_dem.tif")
sinh
Computes the hyperbolic sine of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.sinh(input_raster, output_path="sinh_dem.tif")
sqrt
Computes the square root of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.sqrt(input_raster, output_path="sqrt_dem.tif")
square
Squares each non-nodata raster cell value (x²).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.square(input_raster, output_path="square_dem.tif")
tan
Computes the tangent (input in radians) of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.tan(input_raster, output_path="tan_dem.tif")
tanh
Computes the hyperbolic tangent of each non-nodata raster cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.tanh(input_raster, output_path="tanh_dem.tif")
to_degrees
Converts each non-nodata raster cell from radians to degrees.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.to_degrees(input_raster, output_path="deg_dem.tif")
to_radians
Converts each non-nodata raster cell from degrees to radians.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.to_radians(input_raster, output_path="rad_dem.tif")
truncate
Truncates each non-nodata raster cell to its integer part (rounds toward zero).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.truncate(input_raster, output_path="trunc_dem.tif")
bool_not
Computes a logical NOT of each non-nodata raster cell, outputting 1 where the input cell value is 0 and 0 otherwise.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | yes | Input raster file path. |
output | string | yes | Output raster file path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.bool_not(input_raster, output_path="bool_not_dem.tif")
Binary Raster Math
These tools combine two rasters on a cell-by-cell basis.
Binary Tool Index
addatan2bool_andbool_orbool_xordivideequal_togreater_thaninteger_divisionless_thanmodulomultiplynot_equal_topowersubtract
All binary raster math tools share the same core parameter shape: input1, input2, and optional output.
WbEnvironment usage examples
sum_raster = wbe.raster.overlay_math.add(raster_a, raster_b, output_path="sum.tif")
pow_raster = wbe.raster.overlay_math.power(raster_a, raster_b, output_path="power.tif")
mask = wbe.raster.greater_than(raster_a, raster_b, output_path="gt_mask.tif")
logic = wbe.raster.overlay_math.bool_and(raster_a, raster_b, output_path="and_mask.tif")
Tool semantics:
atan2: four-quadrant inverse tangent, cell by cell.bool_and,bool_or,bool_xor: treat any non-zero value astrueand return1.0or0.0.equal_to,not_equal_to,greater_than,less_than: comparison predicates that return1.0or0.0.integer_division: divides and truncates the result toward zero.modulo: returns the remainder of division.power: raisesinput1to the power ofinput2.
See tools_gis.md for the older documentation context around add, subtract, multiply, and divide.
Statistical Raster Tools
Tool Index
raster_summary_statsraster_histogramlist_unique_values_rasterz_scoresrescale_value_rangemaxminquantileslist_unique_valuesroot_mean_square_errorrandom_fieldrandom_samplecumulative_distributioncrispness_indexks_normality_testinplace_addinplace_subtractinplace_multiplyinplace_divideattribute_histogramattribute_scattergramattribute_correlationcross_tabulationzonal_statisticsturning_bands_simulationtrend_surfacetrend_surface_vector_pointsraster_calculatorprincipal_component_analysisinverse_pca
raster_summary_stats
Computes summary statistics for valid raster cells and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster object. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.raster_summary_stats(input_raster)
raster_histogram
Builds a fixed-bin histogram for valid raster cells and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster object. |
bins | int | no | Number of bins (default 256). |
Outputs
return:str
WbEnvironment usage
hist_json = wbe.raster.raster_histogram(input_raster, bins=256)
list_unique_values_raster
Lists unique raster values (integers) up to a maximum count and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster object. |
max_values | int | no | Maximum values to return (default 10000). |
output_path | string | no | Optional output CSV path. |
Outputs
return:str
WbEnvironment usage
unique_json = wbe.raster.list_unique_values_raster(
classified_raster,
max_values=5000,
output_path="classified_unique_values.csv",
)
z_scores
Standardizes raster values to z-scores using global mean and standard deviation.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster object. |
output_path | string | no | Optional output raster path. |
Outputs
return:Raster
WbEnvironment usage
z = wbe.raster.z_scores(input_raster, output_path="z_scores.tif")
rescale_value_range
Linearly rescales raster values into a target output range.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster object. |
out_min | float | yes | Target minimum output value. |
out_max | float | yes | Target maximum output value. |
clip_min | float | no | Optional input clip minimum. |
clip_max | float | no | Optional input clip maximum. |
output_path | string | no | Optional output raster path. |
Outputs
return:Raster
WbEnvironment usage
rescaled = wbe.raster.rescale_value_range(input_raster, 0.0, 255.0, output_path="rescaled.tif")
max
Computes cellwise maximum using raster/raster or raster/constant operands.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | First operand. |
input2 | Raster | yes | Second operand. |
output_path | string | no | Optional output raster path. |
Outputs
return:Raster
WbEnvironment usage
maxed = wbe.raster.max(dem_a, dem_b, output_path="max_ab.tif")
maxed_const = wbe.raster.max(dem_a, 100.0, output_path="max_const.tif")
min
Computes cellwise minimum using raster/raster or raster/constant operands.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | First operand. |
input2 | Raster | yes | Second operand. |
output_path | string | no | Optional output raster path. |
Outputs
return:Raster
WbEnvironment usage
mined = wbe.raster.min(dem_a, dem_b, output_path="min_ab.tif")
mined_const = wbe.raster.min(dem_a, 0.0, output_path="min_const.tif")
quantiles
Assigns each valid raster cell to a quantile class from 1..num_quantiles.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster object. |
num_quantiles | int | no | Number of classes (default 5). |
output_path | string | no | Optional output raster path. |
Outputs
return:Raster
WbEnvironment usage
q = wbe.raster.quantiles(input_raster, num_quantiles=5, output_path="quantiles.tif")
list_unique_values
Reports unique value counts for a vector attribute field and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector object. |
field_name | string | yes | Attribute field name to summarize. |
output_path | string | no | Optional output CSV path. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.vector.attribute_analysis.list_unique_values(
parcels,
"landuse",
output_path="parcels_landuse_unique_values.csv",
)
root_mean_square_error
Computes RMSE and related vertical-accuracy metrics between comparison and base rasters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Comparison raster. |
base | Raster | yes | Base/reference raster. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.root_mean_square_error(dem_test, dem_reference)
random_field
Creates a raster filled with standard normal random values using a base raster for geometry.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base | Raster | yes | Base raster defining output geometry. |
output_path | string | no | Optional output raster path. |
Outputs
return:Raster
WbEnvironment usage
rand_img = wbe.raster.random_field(base_raster, output_path="random_field.tif")
random_sample
Creates a raster with randomly located valid sample cells labelled with unique IDs.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base | Raster | yes | Base raster used for output geometry and valid-cell mask. |
num_samples | int | no | Number of sample cells to generate (default 1000). |
output_path | string | no | Optional output raster path. |
Outputs
return:Raster
WbEnvironment usage
sample = wbe.raster.random_sample(base_raster, num_samples=500, output_path="sample.tif")
cumulative_distribution
Transforms raster values into cumulative distribution probabilities in the range 0..1.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster object. |
output_path | string | no | Optional output raster path. |
Outputs
return:Raster
WbEnvironment usage
cdf = wbe.raster.cumulative_distribution(input_raster, output_path="cdf.tif")
crispness_index
Calculates the crispness index for a membership-probability raster and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Membership-probability raster. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.crispness_index(probability_raster)
ks_normality_test
Runs a Kolmogorov-Smirnov normality test on raster values and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster object. |
num_samples | int | no | Optional random sample size; omit to use all valid cells. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.ks_normality_test(input_raster, num_samples=1000)
kappa_index
Computes Cohen's kappa, overall agreement, and per-class agreement metrics for two categorical rasters and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | Classification raster. |
input2 | Raster | yes | Reference raster. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.kappa_index(classified_raster, reference_raster)
paired_sample_t_test
Runs a paired-sample t-test on two rasters using valid paired cells and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | First raster in the pair. |
input2 | Raster | yes | Second raster in the pair. |
num_samples | int | no | Optional random sample size; omit to use all valid pairs. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.paired_sample_t_test(before_raster, after_raster, num_samples=2000)
phi_coefficient
Performs a binary-class agreement assessment between two rasters and returns a JSON report string containing contingency counts and the $\phi$ coefficient.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | First binary raster. Non-zero cells are treated as class presence. |
input2 | Raster | yes | Second binary raster. Non-zero cells are treated as class presence. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.phi_coefficient(predicted_binary, reference_binary)
image_correlation
Computes a Pearson correlation matrix among two or more input rasters and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster handles or file paths (at least two). |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.image_correlation([band1, band2, band3])
image_autocorrelation
Computes global Moran's $I$ for one or more rasters and returns a JSON report string with normality/randomization statistics.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster handles or file paths (at least one). |
contiguity | string | no | Neighborhood rule: rook, king/queen, or bishop (default rook). |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.image_autocorrelation([elevation, slope], contiguity="king")
image_correlation_neighbourhood_analysis
Computes moving-window local correlation between two rasters and returns two rasters: local correlation values and local p-values.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | First input raster. |
input2 | Raster | yes | Second input raster. |
filter_size | int | no | Moving window size in cells (default 11, minimum 3). |
correlation_stat | string | no | Correlation metric: pearson, spearman, or kendall (default pearson). |
output1_path | string | no | Optional path for the local-correlation raster. |
output2_path | string | no | Optional path for the local-significance raster. |
Outputs
Returned as tuple[Raster, Raster] in this order:
output1:Rasteroutput2:Raster
WbEnvironment usage
local_r, local_p = wbe.raster.local_neighborhood.image_correlation_neighbourhood_analysis(
band1,
band2,
filter_size=11,
correlation_stat="spearman",
)
image_regression
Performs bivariate linear regression using two rasters and returns a residual raster plus a JSON report string containing model, ANOVA, and coefficient statistics.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
independent_variable | Raster | yes | Independent variable raster (X). |
dependent_variable | Raster | yes | Dependent variable raster (Y). |
standardize_residuals | bool | no | Standardize residuals by model standard error (default False). |
output_path | string | no | Optional output path for residual raster. |
Outputs
Returned as tuple[Raster, str] in this order:
result:Rasterstring_2:str
WbEnvironment usage
residuals, report_json = wbe.raster.image_regression(
independent_raster,
dependent_raster,
standardize_residuals=True,
)
dbscan
Performs unsupervised DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering on a stack of input rasters. Each cell's feature vector spans all input bands. Cluster IDs (0-based, I16) are written to the output raster; noise cells and nodata cells receive the nodata value (-32768). A JSON report string is also returned with summary statistics.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Feature-band rasters forming the multi-dimensional feature space. |
scaling_method | string | no | Feature scaling: "none" (default), "normalize" (0–1), or "standardize" (z-scores). |
search_distance | float | no | Epsilon neighbourhood radius in feature space (default 1.0). |
min_points | int | no | Minimum number of neighbours within epsilon for a core point (default 5). |
output_path | string | no | Optional output raster path. |
Outputs
Returned as tuple[Raster, str] in this order:
result:Rasterstring_2:str
WbEnvironment usage
clusters, report_json = wbe.raster.dbscan(
[band1, band2, band3],
scaling_method="normalize",
search_distance=0.1,
min_points=10,
)
| num_samples | int | no | Optional random sample size per raster; omit to use all valid values. |
WbEnvironment usage
report_json = wbe.two_sample_ks_test(raster_a, raster_b, num_samples=3000)
wilcoxon_signed_rank_test
Runs a Wilcoxon signed-rank test on paired raster differences and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | First raster in the pair. |
input2 | Raster | yes | Second raster in the pair. |
num_samples | int | no | Optional random sample size; omit to use all valid pairs. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.wilcoxon_signed_rank_test(before_raster, after_raster, num_samples=2000)
conditional_evaluation
Evaluates a per-cell boolean statement and assigns TRUE/FALSE outputs from constants, rasters, or expressions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster used for value and raster geometry variables. |
statement | string | yes | Conditional expression evaluated per cell. |
true_value | Raster | no | Value/expression used when condition is true (defaults to NoData). |
false_value | Raster | no | Value/expression used when condition is false (defaults to NoData). |
output_path | string | no | Optional output raster path. |
Outputs
return:Raster
WbEnvironment usage
out = wbe.raster.reclass_mask.conditional_evaluation(
input_raster,
"(value >= 25.0) && (value <= 75.0)",
true_value=1.0,
false_value=0.0,
output_path="conditional.tif",
)
anova
Performs one-way ANOVA of raster values grouped by a class raster and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Measurement raster. |
features | Raster | yes | Class/category raster defining groups. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.anova(measurement_raster, class_raster)
inplace_add
Performs the legacy in-place add operation input1 += input2 and returns the updated raster handle.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | Raster to modify. |
input2 | Raster | yes | Raster or constant addend. |
Outputs
return:Raster
WbEnvironment usage
updated = wbe.raster.inplace_add(input_raster, 10.0)
inplace_subtract
Performs the legacy in-place subtract operation input1 -= input2 and returns the updated raster handle.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | Raster to modify. |
input2 | Raster | yes | Raster or constant subtrahend. |
Outputs
return:Raster
WbEnvironment usage
updated = wbe.raster.inplace_subtract(input_raster, other_raster)
inplace_multiply
Performs the legacy in-place multiply operation input1 *= input2 and returns the updated raster handle.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | Raster to modify. |
input2 | Raster | yes | Raster or constant multiplier. |
Outputs
return:Raster
WbEnvironment usage
updated = wbe.raster.inplace_multiply(input_raster, 1.25)
inplace_divide
Performs the legacy in-place divide operation input1 /= input2 and returns the updated raster handle.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | Raster to modify. |
input2 | Raster | yes | Raster or non-zero constant divisor. |
Outputs
return:Raster
WbEnvironment usage
updated = wbe.raster.inplace_divide(input_raster, 2.0)
attribute_histogram
Builds histogram summary counts for a numeric vector attribute field and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector object. |
field_name | string | yes | Numeric attribute field name. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.vector.attribute_analysis.attribute_histogram(parcels, "area")
attribute_scattergram
Computes scattergram summary statistics for two numeric vector fields and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector object. |
field_name_x | string | yes | Numeric x-axis field name. |
field_name_y | string | yes | Numeric y-axis field name. |
trendline | bool | no | Include linear trendline metrics (default False). |
Outputs
return:str
WbEnvironment usage
report_json = wbe.vector.attribute_analysis.attribute_scattergram(parcels, "area", "perimeter", trendline=True)
attribute_correlation
Computes the Pearson correlation matrix among numeric vector attribute fields and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector object. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.vector.attribute_analysis.attribute_correlation(parcels)
cross_tabulation
Creates a categorical contingency table between two rasters and returns a JSON report string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | First categorical raster. |
input2 | Raster | yes | Second categorical raster. |
Outputs
return:str
WbEnvironment usage
report_json = wbe.raster.cross_tabulation(classes_2000, classes_2020)
zonal_statistics
Computes statistics (mean, median, min, max, range, standard deviation, diversity, total) for zones defined by a features raster and returns results as a raster and JSON report.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data_raster | Raster | yes | Raster containing values to summarize. |
features_raster | Raster | yes | Raster containing integer zone IDs. |
stat_type | string | no | Statistic to compute (default "mean"). Options: mean, median, min, max, range, std_dev, diversity, total. |
zero_is_background | bool | no | Exclude zone ID 0 from analysis (default False). |
output_path | string | no | Output raster file path. |
callback | function | no | Progress callback function. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.zonal_statistics(
dem,
zone_raster,
stat_type="mean",
output_path="dem_zones_mean.tif"
)
turning_bands_simulation
Simulates a spatially-autocorrelated random field using Carr's turning bands algorithm. Useful for Monte Carlo uncertainty analysis and geostatistical simulation.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base_raster | Raster | yes | Base raster defining output extent and resolution. |
range | float | yes | Autocorrelation range parameter (determines smoothness). |
iterations | int | no | Number of random bands to accumulate (default 1000). |
output_path | string | no | Output raster file path. |
callback | function | no | Progress callback function. |
Outputs
return:Raster
WbEnvironment usage
simulated = wbe.raster.turning_bands_simulation(
template_raster,
range=100.0,
iterations=500,
output_path="simulated_field.tif"
)
trend_surface
Fits a polynomial trend surface to raster data via least-squares regression. Supports polynomial orders 1–10.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_raster | Raster | yes | Input raster to fit. |
polynomial_order | int | no | Polynomial order 1–10 (default 1 for linear). |
output_path | string | no | Output raster file path. |
callback | function | no | Progress callback function. |
Outputs
return:Raster
WbEnvironment usage
trend = wbe.raster.trend_surface(
dem,
polynomial_order=2,
output_path="dem_trend_quadratic.tif"
)
trend_surface_vector_points
Fits a polynomial trend surface to vector point data (with attribute values) and generates an output raster.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
vector_input | Vector | yes | Input point vector layer. |
cell_size | float | yes | Output raster cell size. |
field_name | string | yes | Name of numeric attribute field to fit. |
polynomial_order | int | no | Polynomial order 1–10 (default 1 for linear). |
output_path | string | no | Output raster file path. |
callback | function | no | Progress callback function. |
Outputs
return:Raster
WbEnvironment usage
trend = wbe.raster.trend_surface_vector_points(
sample_points,
cell_size=10.0,
field_name="elevation",
polynomial_order=2,
output_path="points_trend_surface.tif"
)
raster_calculator
Evaluates arbitrary mathematical expressions cell-by-cell over one or more input rasters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
expression | string | yes | Mathematical expression (e.g., "'nir' - 'red'" for NDVI). |
input_rasters | Raster | yes | List of input rasters in expression order. |
output_path | string | no | Output raster file path. |
callback | function | no | Progress callback function. |
Special Variables
Expression can reference: rows, columns, north, south, east, west, cellsizex, cellsizey, cellsize, nodata, null, minvalue, maxvalue, pi, e, row, column, rowy, columnx, and inputs as value1, value2, etc.
Outputs
return:Raster
WbEnvironment usage
# NDVI example with named rasters
ndvi = wbe.raster.raster_calculator(
"'nir' - 'red' / ('nir' + 'red')",
[nir_band, red_band],
output_path="ndvi.tif"
)
principal_component_analysis
Performs PCA (dimensionality reduction) on 3 or more raster bands. Outputs component rasters and eigendecomposition report.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster bands (3 or more). |
num_components | int | no | Number of PCA components to output (default: all input bands). |
standardized | bool | no | Use correlation matrix (standardized) vs covariance (default True). |
output_path | string | no | Output directory for component rasters. |
callback | function | no | Progress callback function. |
Outputs
return:list[Raster]
WbEnvironment usage
# Perform PCA on multispectral bands
components = wbe.raster.principal_component_analysis(
[band1, band2, band3, band4],
num_components=3,
standardized=True,
output_path="pca_components/"
)
Output Files
Component rasters: {stem}_comp1.tif, {stem}_comp2.tif, etc. JSON report includes eigenvalues, eigenvectors, and factor loadings.
inverse_pca
Reconstructs original band images from PCA components, with optional noise reduction by excluding high-order components.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
component_rasters | Raster | yes | PCA component rasters (in order). |
pca_report | string | yes | JSON report string from principal_component_analysis(). |
output_path | string | no | Output directory for reconstructed bands. |
callback | function | no | Progress callback function. |
Outputs
return:list[Raster]
WbEnvironment usage
# Reconstruct with denoising (exclude last 2 components)
reconstructed = wbe.raster.inverse_pca(
[comp1, comp2, comp3],
pca_report=report_json,
output_path="reconstructed_bands/"
)
Output Files
Reconstructed rasters: {stem}_img1.tif, {stem}_img2.tif, etc.
Hydrology
Hydrology Tools
This document covers hydrology tools currently ported into the backend, including DEM depression removal/conditioning and flow-accumulation workflows.
Hydrology (Depression Removal)
These tools prepare DEMs for downstream flow-routing by removing pits, flats, or larger enclosed depressions. The short version is:
- Prefer
breach_depressions_least_costwhen you want the lowest-impact correction and realistic cuts through barriers such as roads or embankments. - Use
fill_depressionswhen you need a robust full-fill solution and are comfortable modifying all enclosed depressions up to their spill elevations. - Use
fill_pitsorbreach_single_cell_pitsas lightweight preprocessing for single-cell artifacts, not as a replacement for full depression conditioning. - Treat the Wang-and-Liu and Planchon-and-Darboux variants mainly as compatibility methods when you need those specific historical formulations.
Tool Index
breach_depressions_least_costbreach_single_cell_pitsfill_depressionsfill_depressions_planchon_and_darbouxfill_depressions_wang_and_liufill_pitsdepth_in_sinksink
Hydrology (Flow Accumulation)
Tool Index
d8_pointerd8_flow_accumdinf_pointerdinf_flow_accumfd8_pointerfd8_flow_accumrho8_pointerrho8_flow_accummdinf_flow_accumqin_flow_accumulationquinn_flow_accumulationminimal_dispersion_flow_algorithmflow_accum_full_workflowd8_mass_fluxdinf_mass_flux
Hydrology (Diagnostics)
Tool Index
find_noflow_cellsnum_inflowing_neighboursfind_parallel_flowedge_contaminationflow_length_diffdownslope_flowpath_lengthmax_upslope_flowpath_lengthaverage_upslope_flowpath_lengthelevation_above_streamelevation_above_stream_euclideandownslope_distance_to_streamaverage_flowpath_slopemax_upslope_valuelongest_flowpathdepth_to_waterfill_burnburn_streams_at_roadstrace_downslope_flowpathsflood_orderinsert_damsraise_wallstopological_breach_burnstochastic_depression_analysisunnest_basinsupslope_depression_storageflatten_lakeshydrologic_connectivityimpoundment_size_index
Hydrology (Watersheds and Basins)
Tool Index
basinswatershed_from_raster_pour_pointswatershedjenson_snap_pour_pointssnap_pour_pointssubbasinshillslopesstrahler_order_basinsisobasins
mdinf_flow_accum
mdinf_flow_accum(dem, out_type="sca", exponent=1.1, threshold=None, log=False, clip=False, output_path=None, callback=None)
Computes MD-Infinity triangular multiple-flow-direction accumulation from a DEM.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
out_type | string | no | One of "cells", "ca", "sca" (default). |
exponent | float | no | Slope weighting exponent (default 1.1). |
threshold | float|None | no | Optional convergence threshold in cells. If provided and exceeded, routing becomes convergent. |
log | bool | no | If true, log-transform output values. |
clip | bool | no | Compatibility flag accepted by the API. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.mdinf_flow_accum(
dem,
out_type="value",
exponent=1.0,
threshold=1.0,
output_path="result.tif",
)
qin_flow_accumulation
qin_flow_accumulation(dem, out_type="sca", exponent=10.0, max_slope=45.0, threshold=None, log=False, clip=False, output_path=None, callback=None)
Computes Qin MFD flow accumulation from a DEM using a gradient-dependent dynamic exponent.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
out_type | string | no | One of "cells", "ca", "sca" (default). |
exponent | float | no | Upper-bound exponent parameter (default 10.0). |
max_slope | float | no | Upper-bound slope in degrees used by the dynamic exponent function (default 45.0). |
threshold | float|None | no | Optional convergence threshold in cells. |
log | bool | no | If true, log-transform output values. |
clip | bool | no | Compatibility flag accepted by the API. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.qin_flow_accumulation(
dem,
out_type="value",
exponent=1.0,
max_slope=1.0,
threshold=1.0,
output_path="result.tif",
)
quinn_flow_accumulation
quinn_flow_accumulation(dem, out_type="sca", exponent=1.1, threshold=None, log=False, clip=False, output_path=None, callback=None)
Computes Quinn MFD flow accumulation from a DEM using accumulation-dependent convergence.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
out_type | string | no | One of "cells", "ca", "sca" (default). |
exponent | float | no | Exponent parameter (default 1.1). |
threshold | float|None | no | Optional convergence threshold in cells. |
log | bool | no | If true, log-transform output values. |
clip | bool | no | Compatibility flag accepted by the API. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.quinn_flow_accumulation(
dem,
out_type="value",
exponent=1.0,
threshold=1.0,
output_path="result.tif",
)
minimal_dispersion_flow_algorithm
minimal_dispersion_flow_algorithm(raster, out_type="sca", path_corrected_direction_preference=0.0, log_transform=False, clip=False, esri_pntr=False, flow_dir_output_path=None, output_path=None, callback=None)
Computes the Minimal Dispersion Flow Algorithm (MDFA) from a DEM and returns both a flow-direction raster and flow-accumulation raster as a tuple.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
raster | Raster | yes | Input depressionless DEM raster. |
out_type | string | no | One of "cells", "ca", "sca" (default). |
path_corrected_direction_preference | float | no | Preference parameter p in [0, 1]; 1.0 is fully non-dispersive. |
log_transform | bool | no | If true, log-transform accumulation values. |
clip | bool | no | Compatibility flag accepted by the API. |
esri_pntr | bool | no | If true, encode flow-direction output in Esri pointer style. |
flow_dir_output_path | string | no | Optional output path for the flow-direction raster. |
output_path | string | no | Optional output path for the flow-accumulation raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
Returned as tuple[Raster, Raster] in this order:
flow_dir:Rasterresult:Raster
WbEnvironment usage
raster_1, raster_2 = wbe.hydrology.flow_routing.minimal_dispersion_flow_algorithm(
raster,
out_type="value",
path_corrected_direction_preference=1.0,
flow_dir_output_path="flow_dir.tif",
output_path="result.tif",
)
flow_accum_full_workflow
flow_accum_full_workflow(dem, out_type="sca", log_transform=False, clip=False, esri_pntr=False, breached_dem_output_path=None, flow_dir_output_path=None, output_path=None, callback=None)
Runs a full non-divergent flow workflow in one call and returns a tuple containing a depressionless DEM, a D8 pointer raster, and a D8 accumulation raster.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
out_type | string | no | One of "cells", "ca", "sca" (default). |
log_transform | bool | no | If true, log-transform accumulation values. |
clip | bool | no | If true, clip accumulation display maximum (compatibility behavior). |
esri_pntr | bool | no | If true, encode flow-direction output in Esri pointer style. |
breached_dem_output_path | string | no | Optional output path for the depressionless DEM raster. |
flow_dir_output_path | string | no | Optional output path for the flow-direction raster. |
output_path | string | no | Optional output path for the flow-accumulation raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
Returned as tuple[Raster, Raster, Raster] in this order:
breached_dem:Rasterflow_dir:Rasterresult:Raster
WbEnvironment usage
raster_1, raster_2, raster_3 = wbe.hydrology.flow_routing.flow_accum_full_workflow(
dem,
out_type="value",
breached_dem_output_path="breached_dem.tif",
flow_dir_output_path="flow_dir.tif",
output_path="result.tif",
)
find_noflow_cells
find_noflow_cells(dem, output_path=None, callback=None, interior_only=False)
Finds DEM cells that have no lower D8 neighbour. On a fully conditioned DEM this should usually be limited to valid edge-drainage cases; interior hits often indicate remaining pits or flats.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
interior_only | bool | no | If true, only flags true interior no-flow cells (excluding raster-border and NoData-adjacent outlets). |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.hydrologic_indices.find_noflow_cells(
dem,
output_path="result.tif",
)
dinf_mass_flux
dinf_mass_flux(dem, loading, efficiency, absorption, output_path=None, callback=None)
Routes mass downslope using D-Infinity flow-routing, accumulating loading while applying per-cell efficiency and absorption losses.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
loading | Raster | yes | Input loading raster. |
efficiency | Raster | yes | Input efficiency raster (0-1 or percent values). |
absorption | Raster | yes | Input absorption raster in loading units. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.dinf_mass_flux(
dem,
loading,
efficiency,
absorption,
output_path="result.tif",
)
trace_downslope_flowpaths
trace_downslope_flowpaths(seed_points, d8_pntr, esri_pntr=False, zero_background=False, output_path=None, callback=None)
Traces downslope D8 flowpaths from seed points to no-flow cells or the raster edge. Output values are visit counts where overlapping traces occur.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
seed_points | Vector | yes | Input point vector of seed locations. |
d8_pntr | Any | yes | Input D8 pointer raster. |
esri_pntr | bool | no | If true, interpret D8 pointers with ESRI encoding. |
zero_background | bool | no | If true, background is 0; otherwise background is NoData. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.trace_downslope_flowpaths(
seed_points,
d8_pointer,
output_path="result.tif",
)
flood_order
flood_order(dem, output_path=None, callback=None)
Computes flood order from a DEM using a priority-flood traversal from edges inward, assigning each valid cell its visitation sequence.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.flood_order(
dem,
output_path="result.tif",
)
flatten_lakes
flatten_lakes(dem, lakes, output_path=None, callback=None)
Flattens lake polygons in a DEM by setting each lake interior to its minimum perimeter elevation.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
lakes | Vector | yes | Input polygon vector of lake features. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.flatten_lakes(
dem,
lakes,
output_path="result.tif",
)
insert_dams
insert_dams(dem, dam_points, dam_length, output_path=None, callback=None)
Inserts localized dam embankments at specified point locations using profile-based crest selection constrained by maximum dam length.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
dam_points | Vector | yes | Input point vector of dam locations. |
dam_length | float | yes | Maximum dam length in map units. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.insert_dams(
dem,
dam_points,
dam_length=1.0,
output_path="result.tif",
)
raise_walls
raise_walls(dem, walls, breach_lines=None, wall_height=100.0, output_path=None, callback=None)
Raises DEM elevations along wall features by a specified height increment, with optional breach lines used to carve openings through raised walls.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
walls | Vector | yes | Input line or polygon vector defining wall segments. |
breach_lines | Vector | no | Optional vector defining breach locations. |
wall_height | float | no | Elevation increment applied to wall cells. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.raise_walls(
dem,
walls,
breach_lines,
wall_height=1.0,
output_path="result.tif",
)
topological_breach_burn
topological_breach_burn(streams, dem, snap_distance=0.001, out_streams_path=None, out_dem_path=None, out_dir_path=None, out_fa_path=None, callback=None)
Performs topological stream burning using a stream vector and DEM, producing stream raster, burned/conditioned DEM, D8 pointer, and D8 accumulation outputs.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
streams | Vector | yes | Input stream network vector. |
dem | Raster | yes | Input DEM raster. |
snap_distance | float | no | Optional stream snapping distance used in burn-depth scaling. |
out_streams_path | string | no | Optional output path for rasterized streams. |
out_dem_path | string | no | Optional output path for burned/conditioned DEM. |
out_dir_path | string | no | Optional output path for D8 pointer raster. |
out_fa_path | string | no | Optional output path for flow-accumulation raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
Returned as tuple[Raster, Raster, Raster, Raster] in this order:
raster_1:Rasterraster_2:Rasterraster_3:Rasterraster_4:Raster
WbEnvironment usage
raster_1, raster_2, raster_3, raster_4 = wbe.hydrology.depressions_storage.topological_breach_burn(
dem,
streams,
snap_distance=1.0,
output_streams_path="output_streams.dat",
output_dem_path="output_dem.dat",
output_dir_path="output_dir.dat",
output_flow_accum_path="output_flow_accum.dat",
)
stochastic_depression_analysis
stochastic_depression_analysis(dem, rmse, range, iterations=100, output_path=None, callback=None)
Estimates depression-membership probability for each DEM cell using Monte Carlo perturbation of elevation error and repeated depression filling.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
rmse | float | yes | Elevation RMSE used for Gaussian perturbation. |
range | float | yes | Error autocorrelation range in map units. |
iterations | int | no | Number of Monte Carlo iterations. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.stochastic_depression_analysis(
dem,
rmse=1.0,
range=1.0,
iterations=1,
output_path="result.tif",
)
unnest_basins
unnest_basins(d8_pointer, pour_points, esri_pntr=False, output_path=None, callback=None)
Delineates full nested basins for pour points over a D8 pointer raster, producing one raster per nesting level.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
d8_pointer | Raster | yes | Input D8 pointer raster. |
pour_points | Vector | yes | Input point vector of outlets/pour points. |
esri_pntr | bool | no | If true, interpret pointer values with ESRI encoding. |
output_path | string | no | Optional base output path used to write numbered outputs. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:list[Raster]
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.unnest_basins(
d8_pointer,
pour_points,
output_path="result.tif",
)
upslope_depression_storage
upslope_depression_storage(dem, output_path=None, callback=None)
Estimates average upslope depression-storage depth by conditioning depressions and routing storage depth downslope.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.upslope_depression_storage(
dem,
output_path="result.tif",
)
hydrologic_connectivity
hydrologic_connectivity(dem, exponent=1.1, convergence_threshold=0.0, z_factor=1.0, output1_path=None, output2_path=None, callback=None)
Computes two hydrologic-connectivity indices from a DEM: downslope unsaturated length (DUL) and upslope disconnected saturated area (UDSA).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
exponent | float | no | Compatibility parameter for dispersion control. |
convergence_threshold | float | no | Optional stream-initiation threshold in contributing cells. |
z_factor | float | no | Optional vertical scaling factor. |
output1_path | string | no | Optional output path for DUL raster. |
output2_path | string | no | Optional output path for UDSA raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
Returned as tuple[Raster, Raster] in this order:
output1:Rasteroutput2:Raster
WbEnvironment usage
raster_1, raster_2 = wbe.hydrology.hydrologic_indices.hydrologic_connectivity(
dem,
exponent=1.0,
convergence_threshold=1.0,
z_factor=1.0,
output1="value",
output2="value",
)
impoundment_size_index
impoundment_size_index(dem, max_dam_length, output_mean=False, output_max=False, output_volume=False, output_area=False, output_height=False, callback=None)
Estimates impoundment metrics for potential dams of a given maximum length at each DEM cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
max_dam_length | float | yes | Maximum dam length in map units. |
output_mean | bool | no | Include mean flooded-depth raster in output tuple. |
output_max | bool | no | Include max flooded-depth raster in output tuple. |
output_volume | bool | no | Include flooded-volume raster in output tuple. |
output_area | bool | no | Include flooded-area raster in output tuple. |
output_height | bool | no | Include dam-height raster in output tuple. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
Returned as tuple[Raster | None, Raster | None, Raster | None, Raster | None, Raster | None] in this order:
mean:Raster | Nonemax:Raster | Nonevolume:Raster | Nonearea:Raster | Nonedam_height:Raster | None
WbEnvironment usage
raster_1, raster_2, raster_3, raster_4, raster_5 = wbe.hydrology.depressions_storage.impoundment_size_index(
dem,
max_dam_length=1.0,
mean_output_path="mean.tif",
max_output_path="max.tif",
volume_output_path="volume.tif",
area_output_path="area.tif",
dam_height_output_path="dam_height.tif",
)
num_inflowing_neighbours
num_inflowing_neighbours(dem, output_path=None, callback=None)
Counts the number of inflowing D8 neighbours for each DEM cell by deriving a D8 flow field from the DEM internally.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.num_inflowing_neighbours(
dem,
output_path="result.tif",
)
find_parallel_flow
find_parallel_flow(d8_pointer, streams=None, output_path=None, callback=None)
Flags stream cells that have neighboring stream cells with the same local D8 flow direction, which can indicate D8 directional bias and suspect parallel channel routing.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
d8_pointer | Raster | yes | Input D8 pointer raster. |
streams | Raster | no | Optional stream raster mask. If omitted, all valid cells are considered. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.hydrologic_indices.find_parallel_flow(
d8_pointer,
streams,
output_path="result.tif",
)
edge_contamination
edge_contamination(dem, flow_type="mfd", z_factor=-1.0, output_path=None, callback=None)
Identifies edge-contaminated cells, i.e., cells whose upslope contributing area extends beyond the DEM boundary or boundary-connected NoData areas.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input depressionless DEM raster. |
flow_type | string | no | Routing method to use: one of "d8", "mfd"/"fd8", or "dinf". |
z_factor | float | no | Optional vertical scaling factor. Values <= 0 are treated as 1.0. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.hydrologic_indices.edge_contamination(
dem,
flow_type="value",
z_factor=1.0,
output_path="result.tif",
)
flow_length_diff
flow_length_diff(d8_pointer, esri_pntr=False, log_transform=False, output_path=None, callback=None)
Calculates the local maximum absolute difference in downslope flowpath length, which is useful for highlighting drainage divides and ridgelines.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
d8_pointer | Any | yes | Input D8 pointer raster. |
esri_pntr | bool | no | If true, interpret pointer values using ESRI D8 encoding. |
log_transform | Any | yes | If true, apply natural-log transform to the output. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.flow_length_diff(
d8_pntr,
output_path="result.tif",
)
downslope_flowpath_length
downslope_flowpath_length(d8_pointer, watersheds=None, weights=None, esri_pntr=False, output_path=None, callback=None)
Computes downslope flowpath length from each cell in a D8 pointer raster to its outlet. Optionally constrains paths within watershed IDs and applies per-cell distance weighting.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
d8_pointer | Any | yes | Input D8 pointer raster. |
watersheds | Raster | no | Optional watershed raster. When supplied, flowpath accumulation is truncated at watershed boundaries. |
weights | Raster | no | Optional raster multiplier applied to each traversed step length. |
esri_pntr | bool | no | If true, interpret pointer values using ESRI D8 encoding. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.downslope_flowpath_length(
d8_pntr,
output_path="result.tif",
watersheds,
weights,
)
max_upslope_flowpath_length
max_upslope_flowpath_length(dem, output_path=None, callback=None)
Computes the maximum upslope flowpath length passing through each DEM cell using D8 routing derived from the input DEM.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input depressionless DEM raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.max_upslope_flowpath_length(
dem,
output_path="result.tif",
)
average_upslope_flowpath_length
average_upslope_flowpath_length(dem, output_path=None, callback=None)
Computes the average upslope flowpath length passing through each DEM cell using D8 routing derived from the input DEM.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input depressionless DEM raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.average_upslope_flowpath_length(
dem,
output_path="result.tif",
)
elevation_above_stream
elevation_above_stream(dem, streams, output_path=None, callback=None)
Computes elevation above nearest stream measured along downslope D8 flowpaths (a HAND-like terrain index).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input depressionless DEM raster. |
streams | Raster | yes | Input stream raster; stream cells are values > 0 and not NoData. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.hydrologic_indices.elevation_above_stream(
dem,
streams,
output_path="result.tif",
)
elevation_above_stream_euclidean
elevation_above_stream_euclidean(dem, streams, output_path=None, callback=None)
Computes elevation above nearest stream using Euclidean proximity to assign each cell to the nearest stream cell, then subtracts stream elevation.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
streams | Raster | yes | Input stream raster; stream cells are values > 0 and not NoData. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.hydrologic_indices.elevation_above_stream_euclidean(
dem,
streams,
output_path="result.tif",
)
downslope_distance_to_stream
downslope_distance_to_stream(dem, streams, dinf=False, output_path=None, callback=None)
Computes distance from each cell to the nearest stream along downslope flowpaths. Supports D8 routing by default and optional D-infinity routing when dinf=True.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input depressionless DEM raster. |
streams | Raster | yes | Input stream raster; stream cells are values > 0 and not NoData. |
dinf | bool | no | If true, use D-infinity routing; otherwise uses D8 routing. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.hydrologic_indices.downslope_distance_to_stream(
dem,
streams,
output_path="result.tif",
)
average_flowpath_slope
average_flowpath_slope(dem, output_path=None, callback=None)
Calculates average slope gradient in degrees for flowpaths passing through each DEM cell, using D8 flow routing derived from the DEM.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input depressionless DEM raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.average_flowpath_slope(
dem,
output_path="result.tif",
)
max_upslope_value
max_upslope_value(dem, values, output_path=None, callback=None)
Propagates the maximum upslope value along D8 flowpaths over a DEM. Useful for carrying source characteristics downslope while preserving maxima.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input depressionless DEM raster. |
values | Raster | yes | Input values raster to propagate. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.max_upslope_value(
dem,
values,
output_path="result.tif",
)
longest_flowpath
longest_flowpath(dem, basins, output_path, callback=None)
Delineates one longest downslope flowpath polyline for each basin in a basin raster. Output includes basin ID, upstream/downstream elevation, flowpath length, and average slope.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input depressionless DEM raster. |
basins | Raster | yes | Input basin raster with non-zero IDs for basin cells. |
output_path | string | yes | Output vector path (required). |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.longest_flowpath(
dem,
basins,
output_path="result.tif",
)
depth_to_water
depth_to_water(dem, streams=None, lakes=None, output_path=None, callback=None)
Computes cartographic depth-to-water (DTW) by least-cost accumulation from mapped surface-water source features.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
streams | Vector | no | Optional stream vector layer (line or multiline). |
lakes | Vector | no | Optional waterbody vector layer (polygon or multipolygon). |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.hydrologic_indices.depth_to_water(
dem,
streams,
lakes,
output_path="result.tif",
)
fill_burn
fill_burn(dem, streams, output_path=None, callback=None)
Creates a hydro-enforced DEM by burning in stream locations and then filling depressions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
streams | Vector | yes | Input streams vector layer. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.fill_burn(
dem,
streams,
output_path="result.tif",
)
burn_streams_at_roads
burn_streams_at_roads(dem, streams, roads, road_width, output_path=None, callback=None)
Lowers stream elevations near stream-road intersections to breach embankment effects in a DEM.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
streams | Vector | yes | Stream vector layer. |
roads | Vector | yes | Road vector layer. |
road_width | Any | yes | Maximum embankment width in map units used to set burn reach along the stream. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.burn_streams_at_roads(
dem,
streams,
roads,
output_path="result.tif",
width=1.0,
)
d8_mass_flux
d8_mass_flux(dem, loading, efficiency, absorption, output_path=None, callback=None)
Performs D8-based mass-flux routing, suitable for modeling movement of sediment, nutrients, or contaminants over a DEM-defined flow network.
The routed mass per cell follows:
$$ ext{outflow} = (\text{loading} - \text{absorption} + \text{inflow}) \times \text{efficiency} $$
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input depressionless DEM raster used to derive D8 flow directions. |
loading | Raster | yes | Raster of initial mass loading values. |
efficiency | Raster | yes | Raster of transfer efficiency values, either in [0, 1] or percent. |
absorption | Raster | yes | Raster of per-cell mass losses in loading units. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.flow_routing.d8_mass_flux(
dem,
loading,
efficiency,
absorption,
output_path="result.tif",
)
basins
basins(d8_pointer, esri_pntr=False, output_path=None, callback=None)
Delineates all drainage basins in a D8 pointer raster by assigning each valid cell to the edge-draining outlet basin reached along its D8 flow path.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
d8_pointer | Any | yes | Input D8 pointer raster. |
esri_pntr | bool | no | If true, interpret pointer values using ESRI D8 encoding. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.basins(
d8_pntr,
output_path="result.tif",
)
watershed_from_raster_pour_points
watershed_from_raster_pour_points(d8_pointer, pour_points, esri_pntr=False, output_path=None, callback=None)
Delineates watersheds from a D8 pointer raster and a raster of pour-point outlet IDs. Each non-zero, non-NoData cell in pour_points is treated as an outlet; its cell value becomes the watershed ID for all cells that drain to it.
Algorithm notes:
- Same two-pass flow-path labeling as
basins, but seeded from user-supplied pour points rather than edge outlets. - Watershed IDs are inherited directly from the pour-points raster values, making it easy to use stream-link or lake ID rasters as pour-point inputs.
- Cells where the D8 pointer is NoData are propagated as NoData in the output.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
d8_pointer | Raster | yes | Input D8 pointer raster. |
pour_points | Raster | yes | Pour-points raster; non-zero, non-NoData cell values become outlet IDs. |
esri_pntr | bool | no | If true, interpret pointer values using ESRI D8 encoding. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.watershed_from_raster_pour_points(d8_pointer, pour_points)
watershed
watershed(d8_pointer, pour_pts, esri_pntr=False, output_path=None, callback=None)
Delineates watersheds from a D8 pointer raster and a vector point file of pour points. Each vector feature is assigned a sequential 1-based watershed ID.
Algorithm notes:
- Pour-point coordinates are converted to raster row/col via the pointer raster's geotransform.
- Watershed IDs are 1-based sequential integers in feature insertion order.
- Same two-pass flow-path labeling as
watershed_from_raster_pour_points. - Only the first coordinate of each feature is used; MultiPoint features use their first point.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
d8_pointer | Any | yes | Input D8 pointer raster. |
pour_pts | Vector | yes | Input vector file of pour points (point or multipoint geometries). |
esri_pntr | bool | no | If true, interpret pointer values using ESRI D8 encoding. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.watershed(
d8_pntr,
pour_pts,
output_path="result.tif",
)
jenson_snap_pour_points
jenson_snap_pour_points(pour_pts, streams, snap_dist=0.0, output_path=None, callback=None)
Moves each input pour point to the nearest stream cell within a configurable search radius, snapping it onto the stream network. Preserves all input feature attributes.
Algorithm notes:
- For each point, a square window of
floor((snap_dist / cell_size) / 2)cells is searched around the point's raster position. - The nearest stream cell (value > 0 and not NoData) by squared Euclidean distance is chosen.
- If no stream cell is found within the window, the point is emitted at its original location.
- Points outside the raster extent are passed through unchanged.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
pour_pts | Vector | yes | Input vector file of pour points (point or multipoint geometries). |
streams | Raster | yes | Input stream-network raster where stream cells have value > 0 and are not NoData. |
snap_dist | float | no | Maximum search radius in map units. Defaults to one cell width when omitted or zero. |
output_path | string | no | Output path for the snapped pour-point vector file (required; defaults to snapped_pour_points.geojson in the working directory when not supplied to the wrapper). |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.jenson_snap_pour_points(
pour_pts,
streams,
snap_dist=1.0,
output_path="result.tif",
)
snap_pour_points
snap_pour_points(pour_pts, flow_accum, snap_dist=0.0, output_path=None, callback=None)
Moves each pour point to the highest flow-accumulation cell within a local search window. Preserves all input feature attributes.
Algorithm notes:
- For each point, the tool scans a square search window centered on the point's raster position.
- The output location is set to the cell center of the maximum
flow_accumvalue found in that window. - If no valid cell exists in the search window (for example, all NoData), the point is emitted unchanged.
- Points outside the raster extent are emitted unchanged.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
pour_pts | Vector | yes | Input vector file of pour points (point or multipoint geometries). |
flow_accum | Raster | yes | Input flow-accumulation raster. |
snap_dist | float | no | Maximum search radius in map units. Defaults to one cell width when omitted or zero. |
output_path | string | no | Output path for the snapped pour-point vector file (required; defaults to snapped_pour_points.geojson in the working directory when not supplied to the wrapper). |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.snap_pour_points(
pour_pts,
flow_accum,
snap_dist=1.0,
output_path="result.tif",
)
subbasins
subbasins(d8_pointer, streams, esri_pntr=False, output_path=None, callback=None)
Identifies the catchment area of each stream link in a D8 stream network, producing a raster where every cell is labelled with the ID of the sub-basin it drains to.
Algorithm notes:
- Performs a stream-link ID operation followed by a watershed operation.
- Headwater stream cells receive a unique link ID. At each downstream confluence (cell with more than one inflowing stream neighbour) a new link ID is assigned.
- All non-stream cells are labelled by walking downstream to the nearest stream-link seed.
- Differs from
hillslopesin that stream cells themselves are also labelled (not zeroed) and no left/right bank separation is applied.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
d8_pointer | Any | yes | D8 pointer raster produced by d8_pointer. |
streams | Raster | yes | Stream-network raster where stream cells have value > 0 and are not NoData. |
esri_pntr | bool | no | If true, interpret pointer values using ESRI encoding. Default False. |
output_path | string | no | Optional output raster path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.subbasins(
d8_pntr,
streams,
output_path="result.tif",
)
hillslopes
hillslopes(d8_pointer, streams, esri_pntr=False, output_path=None, callback=None)
Identifies hillslope regions draining to each stream link, distinguishing left-bank and right-bank areas. Stream cells themselves are set to 0.
Algorithm notes:
- Performs the same stream-link ID and watershed labeling as
subbasins. - After labeling, all stream cells are zeroed.
- A flood-fill clump pass re-numbers spatially connected regions that share the same sub-basin ID, separating left- and right-bank hillslopes.
- Diagonal clump expansion is blocked when both adjacent cardinal cells are stream cells, preventing hillslopes from merging across the stream.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
d8_pointer | Any | yes | D8 pointer raster. |
streams | Raster | yes | Stream-network raster where stream cells have value > 0 and are not NoData. |
esri_pntr | bool | no | ESRI pointer encoding flag. |
output_path | string | no | Optional output raster path. |
callback | function | no | Optional progress callback. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.hillslopes(
d8_pntr,
streams,
output_path="result.tif",
)
strahler_order_basins
strahler_order_basins(d8_pointer, streams, esri_pntr=False, output_path=None, callback=None)
Delineates watershed basins whose cells are labelled by the Horton-Strahler order of the stream link that drains them.
Algorithm notes:
- Assigns Strahler stream orders to all stream cells: headwaters receive order 1; at a confluence where two or more inflowing streams share the same order, the downstream order is incremented by 1.
- All non-stream cells are then labelled with the Strahler order of the stream link they drain into, using the same two-pass watershed labeling as
watershed.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
d8_pointer | Any | yes | D8 pointer raster. |
streams | Raster | yes | Stream-network raster where stream cells have value > 0 and are not NoData. |
esri_pntr | bool | no | ESRI pointer encoding flag. |
output_path | string | no | Optional output raster path. |
callback | function | no | Optional progress callback. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.streams.ordering_metrics.strahler_order_basins(
d8_pntr,
streams,
output_path="result.tif",
)
isobasins
isobasins(dem, target_size, output_path=None, callback=None)
Divides a landscape into approximately equal-sized watersheds (isobasins) by placing pour points wherever flow accumulation first exceeds a target threshold.
Algorithm notes:
- Computes D8 flow direction internally from the DEM using steepest descent.
- Accumulates flow cell-by-cell in topological order from headwaters downstream.
- When a cell's cumulative upstream area reaches
target_size, a pour point is created at that cell or (if it produces a closer-to-target split) at its largest-accumulation inflowing neighbour. - All cells are then traced downstream to their nearest pour point and assigned that basin's ID.
- The DEM must have been hydrologically conditioned (depressions filled or breached) before use.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input hydrologically-conditioned DEM raster. |
target_size | float | yes | Target isobasin area in number of grid cells (positive integer or float). |
output_path | string | no | Optional output raster path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.watersheds_basins.isobasins(
dem,
target_size=1.0,
output_path="result.tif",
)
breach_depressions_least_cost
breach_depressions_least_cost(dem, max_cost=inf, max_dist=100, flat_increment=None, fill_deps=False, minimize_dist=False, output=None)
Breaches depressions using a constrained least-cost pathway search from pit cells.
Algorithm notes:
- Searches outward from pit cells for a lower outlet cell and cuts the least-cost breach channel through intervening terrain.
- Usually alters the DEM less than full filling because it carves narrow channels instead of raising entire depressions.
- Well suited to artificial barriers such as roads, berms, and embankments where a culvert-like breach is more realistic than filling.
fill_deps=Trueis useful when a small number of depressions remain unresolved after breaching.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
max_cost | float|None | no | Maximum allowed breach cost. |
max_dist | int | no | Maximum search distance in cells. |
flat_increment | float|None | no | Optional monotonic decrement increment. |
fill_deps | bool | no | If true, fill unresolved depressions after breaching. |
minimize_dist | bool | no | If true, distance-weight breach costs. |
output | string | no | Optional output path. |
When to use:
- First-choice preprocessing for hydrologic conditioning in many LiDAR-derived DEM workflows.
- Best when preserving surrounding terrain is more important than enforcing a pure fill solution.
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.breach_depressions_least_cost(
dem,
max_cost=1.0,
max_dist=1,
flat_increment=1.0,
output_path="result.tif",
)
breach_single_cell_pits
breach_single_cell_pits(dem, output=None)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
Breaches single-cell pits by carving local one-cell channels toward lower second-ring neighbors.
Algorithm notes:
- Only targets isolated one-cell pit artifacts.
- Adjusts an adjacent cell to create a local breach path toward a lower cell in the surrounding 5x5 neighborhood.
- Very fast, but intentionally limited in scope; it does not solve larger depressions.
When to use:
- Cheap cleanup pass before a more complete breaching or filling step.
- Useful when DEM artifacts are dominated by isolated single-cell pits.
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.breach_single_cell_pits(
dem,
output_path="result.tif",
)
fill_depressions
fill_depressions(dem, fix_flats=True, flat_increment=0.0001, flat_resolution="garbrecht_martz", max_depth=inf, output=None)
Fills depressions using a priority-flood strategy with optional flat resolution and optional maximum fill depth.
Algorithm notes:
- Identifies depressions, raises them to spill elevation, and optionally imposes a very small gradient across resulting flats.
fix_flats=Trueapplies a small downstream gradient so later flow-routing tools do not stall on large flat surfaces.flat_resolution="garbrecht_martz"is the default and produces a more structured, less meandering flat-resolution pattern for D8-style routing. Use"natural"to recover the older natural-path behaviour that follows original within-flat topography more closely.max_depthcan limit how much vertical filling is allowed, which is useful when deep excavations or reservoirs should not be completely removed.- More aggressive than breaching because every enclosed depression is raised rather than selectively cut.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
fix_flats | bool | no | If true, impose a small gradient across filled flats. |
flat_increment | float|None | no | Flat increment (default 0.0001). |
flat_resolution | Literal["garbrecht_martz", "natural"]|None | no | Flat-resolution mode. One of "garbrecht_martz" or "natural". |
max_depth | float|None | no | Maximum allowed fill depth. |
output | string | no | Optional output path. |
When to use:
- Good general-purpose fill workflow when a complete depressionless DEM is required.
- Appropriate when breaching would create unrealistic long cuts or when a full-fill surface is preferred.
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.fill_depressions(
dem,
flat_increment=1.0,
max_depth=1.0,
flat_resolution,
output_path="result.tif",
)
fill_depressions_planchon_and_darboux
fill_depressions_planchon_and_darboux(dem, fix_flats=True, flat_increment=0.0001, output=None)
Planchon-and-Darboux-compatible interface using the shared optimized fill backend.
Algorithm notes:
- Compatibility-oriented interface for the classic Planchon and Darboux depression-filling formulation.
- Included mainly for parity with legacy workflows rather than because it is the preferred modern option.
- In practice,
fill_depressionsorbreach_depressions_least_costwill often be the better first choice.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
fix_flats | bool | no | If true, impose a small gradient across filled flats. |
flat_increment | float|None | no | Flat increment (default 0.0001). |
output | string | no | Optional output path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.fill_depressions_planchon_and_darboux(
dem,
flat_increment=1.0,
output_path="result.tif",
)
fill_depressions_wang_and_liu
fill_depressions_wang_and_liu(dem, fix_flats=True, flat_increment=0.0001, output=None)
Wang-and-Liu-compatible interface using the shared optimized fill backend.
Algorithm notes:
- Compatibility-oriented interface for the Wang and Liu priority-queue depression-filling method.
- Processes cells by spill elevation and is historically important, but is not the preferred default in this port.
- Best used when reproducing older Wang-and-Liu-based workflows or published methods.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
fix_flats | bool | no | If true, impose a small gradient across filled flats. |
flat_increment | float|None | no | Flat increment (default 0.0001). |
output | string | no | Optional output path. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.fill_depressions_wang_and_liu(
dem,
flat_increment=1.0,
output_path="result.tif",
)
fill_pits
fill_pits(dem, output=None)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
Fills single-cell pits by raising pit cells to the minimum neighboring elevation plus a small increment.
Algorithm notes:
- Only removes isolated one-cell pits.
- Leaves larger depressions unchanged.
- Minimal and fast, but much less complete than full depression filling or breaching.
When to use:
- Very lightweight preprocessing for obvious single-cell artifacts.
- A quick first pass before running
fill_depressionsorbreach_depressions_least_cost.
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.fill_pits(
dem,
output_path="result.tif",
)
depth_in_sink
depth_in_sink(dem, zero_background=False, output_path=None, callback=None)
Measures the vertical depth of each cell within topographic depressions by differencing a depression-filled DEM and the original DEM.
Algorithm notes:
- Internally generates a filled DEM surface and computes
filled_dem - demfor each valid cell. - Positive values indicate depression depth.
- Non-sink cells are assigned NoData by default, or
0.0whenzero_background=True.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
zero_background | bool | no | If true, assign 0.0 to cells outside sinks; otherwise assign NoData. |
output_path | string | no | Optional output raster path. |
callback | function | no | Optional progress callback. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.depth_in_sink(
dem,
output_path="result.tif",
)
sink
sink(dem, zero_background=False, output_path=None, callback=None)
Creates a binary raster identifying cells that belong to topographic depressions.
Algorithm notes:
- Uses the same filled-vs-original DEM differencing approach as
depth_in_sink. - Cells with positive depth are classified as sink cells (
1). - Non-sink cells are assigned NoData by default, or
0.0whenzero_background=True.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
zero_background | bool | no | If true, assign 0.0 to cells outside sinks; otherwise assign NoData. |
output_path | string | no | Optional output raster path. |
callback | function | no | Optional progress callback. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.hydrology.depressions_storage.sink(
dem,
output_path="result.tif",
)
GIS And Vector
GIS Tools
This document covers the GIS tools currently ported into the backend.
GIS Workflow Products (Pro)
These workflow methods expose higher-level environmental monitoring and siting products.
Workflow Product Index
wetland_hydrogeomorphic_classificationurban_expansion_impact_assessmentwind_turbine_sitingsolar_site_suitability_analysiscorridor_mapping_intelligencelandslide_susceptibility_assessmentriver_corridor_health_assessment
wetland_hydrogeomorphic_classification
wetland_hydrogeomorphic_classification(dem, wetland_mask, max_polygon_features=10000, output_prefix=None, callback=None)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
wetland_mask | Raster | yes | Input raster for wetland_mask. |
max_polygon_features | int | no | Numeric parameter for max_polygon_features. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
callback | function | no | Optional progress callback receiving JSON events. |
Returns (hgm_class_raster, wetland_polygons_vector, confidence_raster, summary_json_path).
Outputs
Returned as tuple[Raster, Vector, Raster, str] in this order:
cls:Rasterpolys:Vectorconf:Rastersummary:str
Example:
hgm, polygons, confidence, summary = wbe.terrain.workflow_products.wetland_hydrogeomorphic_classification(
dem=dem,
wetland_mask=wetland_mask,
)
urban_expansion_impact_assessment
urban_expansion_impact_assessment(baseline_urban, scenario_urban, streams, habitat_sensitivity=None, output_prefix=None, callback=None)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
baseline_urban | Raster | yes | Input raster for baseline_urban. |
scenario_urban | Raster | yes | Input raster for scenario_urban. |
streams | Vector | yes | Input vector layer for streams. |
habitat_sensitivity | Raster | no | Input raster for habitat_sensitivity. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
callback | function | no | Optional progress callback receiving JSON events. |
Returns (impact_severity_raster, affected_streams_vector, habitat_loss_raster, summary_json_path).
Outputs
Returned as tuple[Raster, Vector, Raster, str] in this order:
impact:Rasteraffected:Vectorhabitat:Rastersummary:str
Example:
impact, streams_out, habitat_loss, summary = wbe.terrain.workflow_products.urban_expansion_impact_assessment(
baseline_urban=urban_2020,
scenario_urban=urban_2035,
streams=streams,
habitat_sensitivity=habitat_sensitivity,
)
wind_turbine_siting
wind_turbine_siting(dem, settlements, settlements_epsg=None, visibility_radius_meters=5000, min_slope_degrees=5.0, max_slope_degrees=35.0, profile="balanced", sweep_spec_json=None, output_prefix=None, callback=None)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
settlements | Vector | yes | Input vector layer for settlements. |
settlements_epsg | int |None | no | Numeric parameter for settlements_epsg. |
visibility_radius_meters | int | no | Numeric parameter for visibility_radius_meters. |
min_slope_degrees | float | no | Numeric parameter for min_slope_degrees. |
max_slope_degrees | float | no | Numeric parameter for max_slope_degrees. |
profile | string | no | String parameter for profile. |
sweep_spec_json | string |None | no | String parameter for sweep_spec_json. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
callback | function | no | Optional progress callback receiving JSON events. |
Returns (siting_score_raster, confidence_raster, summary_json_path).
When sweep_spec_json is provided, the runtime also emits run_matrix_summary, sensitivity_report, sensitivity_report_html, and stability_map outputs. The sensitivity report includes metrics.primary_metric, metrics.primary_relative_span, and metrics.stability_class (high, medium, low).
Outputs
Returned as tuple[Raster, Raster, str, str] in this order:
score:Rasterconfidence:Rastersummary:strthreshold_sensitivity:str
Example:
score, confidence, summary = wbe.terrain.workflow_products.wind_turbine_siting(
dem=dem,
settlements=settlements,
profile="balanced",
)
solar_site_suitability_analysis
solar_site_suitability_analysis(dem, candidate_threshold=0.7, max_candidate_sites=200, sweep_spec_json=None, output_prefix=None, callback=None)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
transmission_lines | Vector | no | Input vector layer for transmission_lines. |
substations | Vector | no | Input vector layer for substations. |
road_network | Vector | no | Input vector layer for road_network. |
infra_weight_profile | string | yes | String parameter for infra_weight_profile. |
candidate_threshold | float | no | Numeric parameter for candidate_threshold. |
max_candidate_sites | int | no | Numeric parameter for max_candidate_sites. |
sweep_spec_json | string |None | no | String parameter for sweep_spec_json. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
callback | function | no | Optional progress callback receiving JSON events. |
Returns (suitability_score_raster, visual_impact_raster, candidate_sites_vector, summary_json_path).
When sweep_spec_json is provided, the runtime also emits run_matrix_summary, sensitivity_report, sensitivity_report_html, and stability_map outputs. The sensitivity report includes metrics.primary_metric, metrics.primary_relative_span, and metrics.stability_class (high, medium, low).
Outputs
Returned as tuple[Raster, Raster, Vector, str] in this order:
score:Rasterimpact:Rastersites:Vectorsummary:str
Example:
score, impact, sites, summary = wbe.terrain.workflow_products.solar_site_suitability_analysis(
dem=dem,
candidate_threshold=0.7,
)
corridor_mapping_intelligence
corridor_mapping_intelligence(dem, start_features, end_features, constraints=None, cost_profile="slope_roughness", terminal_anchor_strategy="mixed", corridor_tolerance=0.15, output_prefix=None, callback=None)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
start_features | Vector | yes | Input vector layer for start_features. |
end_features | Vector | yes | Input vector layer for end_features. |
constraints | Vector | no | Input vector layer for constraints. |
cost_profile | string | no | String parameter for cost_profile. |
terminal_anchor_strategy | string | no | String parameter for terminal_anchor_strategy. |
corridor_tolerance | float | no | Numeric parameter for corridor_tolerance. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
callback | function | no | Optional progress callback receiving JSON events. |
Returns (cost_surface_raster, accumulated_cost_raster, optimal_route_vector, corridor_suitability_raster, summary_json_path).
Finds the terrain least-cost route and corridor suitability band for siting linear infrastructure (roads, pipelines, utility lines).
start_features and end_features are vector layers containing point and/or polygon features.
cost_profile is one of "slope_only", "slope_roughness" (default), or "conservative".
terminal_anchor_strategy is one of "mixed" (default), "centroid_only", or "boundary_only".
corridor_tolerance is the fractional cost margin above optimal for the suitability band (default 0.15).
Value proposition vs OSS least-cost building blocks:
- This is an end-to-end workflow product rather than a low-level routing primitive.
- It derives a terrain cost surface from DEM slope/roughness, runs least-cost routing, and emits both route geometry and corridor alternatives in one call.
- It supports polygon exclusion constraints and returns a summary JSON contract for reporting/automation.
Endpoint modeling note:
- Current API is vector-first for terminal modeling.
- Point features are used directly as candidate anchors.
- Polygon features contribute sampled boundary/centroid candidates, and the tool chooses a traversable anchor pair.
terminal_anchor_strategycontrols polygon anchor candidate generation.- If start/end layers differ from DEM CRS, they are reprojected to the DEM CRS before routing.
- If constraints differ from DEM CRS, they are reprojected to the DEM CRS before exclusion masking.
- DEM, start/end layers, and optional constraints must include EPSG metadata for CRS harmonization.
QA-style outputs:
cost_surface_raster,accumulated_cost_raster, andcorridor_suitability_rasterprovide inspectable diagnostic surfaces.optimal_route_vectorincludes comparative route attributes (ROUTE_LEN_M,MEAN_SLOPE,ROUTE_COST,PROFILE).summary_json_pathstores reproducible run metadata and key metrics.
Outputs
Returned as tuple[Raster, Raster, Vector, Raster, str] in this order:
cost_surface:Rasteraccumulated_cost:Rasteroptimal_route:Vectorcorridor_suitability:Rastersummary:str
Example:
cost, acc_cost, route, suitability, summary = wbe.terrain.workflow_products.corridor_mapping_intelligence(
dem=dem,
start_features=start_features,
end_features=end_features,
cost_profile="slope_roughness",
terminal_anchor_strategy="mixed",
corridor_tolerance=0.15,
output_prefix="output/access_road",
)
landslide_susceptibility_assessment
landslide_susceptibility_assessment(dem, rainfall_intensity=None, profile="balanced", susceptibility_threshold=0.65, max_zone_features=5000, output_prefix=None, callback=None)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
rainfall_intensity | Raster | no | Input raster for rainfall_intensity. |
profile | string | no | String parameter for profile. |
susceptibility_threshold | float | no | Numeric parameter for susceptibility_threshold. |
max_zone_features | int | no | Numeric parameter for max_zone_features. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
callback | function | no | Optional progress callback receiving JSON events. |
Returns (susceptibility_raster, trigger_pressure_raster, confidence_raster, risk_zones_vector, summary_json_path).
Outputs
Returned as tuple[Raster, Raster, Raster, Vector, str] in this order:
susceptibility:Rastertrigger:Rasterconfidence:Rasterzones:Vectorsummary:str
Example:
sus, trigger, confidence, zones, summary = wbe.terrain.workflow_products.landslide_susceptibility_assessment(
dem=dem,
rainfall_intensity=rainfall,
profile="balanced",
)
river_corridor_health_assessment
river_corridor_health_assessment(dem, streams, profile="balanced", output_prefix=None, callback=None)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dem | Raster | yes | Input DEM raster. |
streams | Vector | yes | Input vector layer for streams. |
profile | string | no | String parameter for profile. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
callback | function | no | Optional progress callback receiving JSON events. |
Returns (erosion_pressure_raster, corridor_confidence_raster, stream_health_score_raster, restoration_zones_vector, summary_json_path).
Outputs
Returned as tuple[Raster, Raster, Raster, Vector, str] in this order:
erosion:Rasterconfidence:Rasterhealth:Rasterzones:Vectorsummary:str
Example:
erosion, confidence, health, restoration, summary = wbe.terrain.workflow_products.river_corridor_health_assessment(
dem=dem,
streams=streams,
profile="balanced",
)
GIS (Raster Overlay)
These tools compare or combine aligned raster stacks on a cell-by-cell basis. Use them when the rasters already share the same grid geometry and you want overlay-style summaries or index outputs.
Overlay Tool Index
average_overlaycount_ifhighest_positionlowest_positionmax_absolute_overlaymax_overlaymin_absolute_overlaymin_overlaymultiply_overlaypercent_equal_topercent_greater_thanpercent_less_thanpick_from_liststandard_deviation_overlaysum_overlayweighted_overlayweighted_sum
GIS (Raster Aggregation and Point-Block Rasterization)
These tools are GIS raster utilities but are not raster overlay operations. They aggregate rasters, create synthetic rasters, find extrema, interpolate from points, rasterize point blocks, or derive footprint geometries.
Aggregation and Block Tool Index
aggregate_rasterbuffer_rastercentroid_rasterclumpcreate_planefind_lowest_or_highest_pointsheat_maphexagonal_grid_from_raster_basehexagonal_grid_from_vector_baseidw_interpolationlayer_footprint_rasterlayer_footprint_vectormap_featuresrectangular_grid_from_raster_baserectangular_grid_from_vector_basenatural_neighbour_interpolationnearest_neighbour_interpolationmodified_shepard_interpolationradial_basis_function_interpolationraster_cell_assignmentnibblesievetin_interpolationblock_maximumblock_minimum
find_lowest_or_highest_points
find_lowest_or_highest_points(input, output_type="lowest", output_path=None, callback=None)
Finds the lowest and/or highest raster cell locations and outputs them as vector points.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster. |
output_type | string | no | One of lowest, highest, or both. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived GeoJSON path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.find_lowest_or_highest_points(
input,
output_type="value",
output_path="result.tif",
)
aggregate_raster
aggregate_raster(input, aggregation_factor=2, aggregation_type="mean", output_path=None, callback=None)
Reduces raster resolution by aggregating fixed-size source blocks using mean, sum, maximum, minimum, or range.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster. |
aggregation_factor | int | no | Integer block size in source cells. |
aggregation_type | string | no | Aggregation statistic to compute. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.aggregate_raster(
input,
aggregation_factor=1,
aggregation_type="value",
output_path="result.tif",
)
create_plane
create_plane(base, gradient, aspect, constant, output_path=None, callback=None)
Creates a raster from a planar equation using a base raster for output geometry.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base | Raster | yes | Base raster providing output extent, resolution, and CRS. |
gradient | float | yes | Plane slope gradient in degrees. |
aspect | float | yes | Plane aspect in degrees. |
constant | float | yes | Additive constant term. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.create_plane(
base,
gradient=1.0,
aspect=1.0,
constant=1.0,
output_path="result.tif",
)
centroid_raster
centroid_raster(input, output_path=None, callback=None)
Calculates centroid cells for positive patch IDs in a raster and returns both output raster and a textual report.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input patch raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
Returned as tuple[Raster, str] in this order:
result:Rasterstring_2:str
WbEnvironment usage
raster_1, string_2 = wbe.raster.centroid_raster(
input,
output_path="result.tif",
)
buffer_raster
buffer_raster(input, buffer_size, grid_cell_units=False, output_path=None, callback=None)
Creates a binary buffer around non-zero, non-NoData raster cells.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster where non-zero cells are buffer targets. |
buffer_size | float | yes | Buffer distance threshold. |
grid_cell_units | bool | no | If True, interprets buffer_size in grid-cell units instead of map units. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.distance_cost.buffer_raster(
input,
buffer_size=1.0,
output_path="result.tif",
)
clump
clump(input, diag=False, zero_background=False, output_path=None, callback=None)
Groups contiguous equal-valued raster cells into unique patch IDs.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input categorical raster. |
diag | bool | no | If True, uses 8-neighbour connectivity; otherwise 4-neighbour. |
zero_background | bool | no | If True, preserves zero-valued cells as background. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.clump(
input,
output_path="result.tif",
)
nibble
nibble(input, mask, use_nodata=False, nibble_nodata=True, output_path=None, callback=None)
Fills background regions in a raster by propagating values from nearest foreground cells, constrained by a mask raster.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster to fill. |
mask | Raster | yes | Binary mask raster (non-zero cells are preserved/eligible). |
use_nodata | bool | no | If True, treats input NoData as a class value during nibbling. |
nibble_nodata | bool | no | If True, restores NoData behavior for masked NoData regions. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.nibble(
input,
mask,
output_path="result.tif",
)
sieve
sieve(input, threshold=1.0, zero_background=False, output_path=None, callback=None)
Removes small raster patches below a cell-count threshold by replacing them with neighbouring larger-patch values.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input categorical raster. |
threshold | float | no | Minimum patch size in grid cells to retain. |
zero_background | bool | no | If True, preserves original zero-valued background as zero. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.sieve(
input,
threshold=1.0,
output_path="result.tif",
)
heat_map
heat_map(points, bandwidth, field_name=None, cell_size=None, base_raster=None, kernel_function="quartic", output_path=None, callback=None)
Generates a kernel-density heat map raster from point occurrences.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
points | Vector | yes | Input points vector layer. |
field_name | string|None | no | Optional numeric weight field; if omitted, each point contributes weight 1. |
bandwidth | float | yes | Kernel bandwidth in map units. |
cell_size | float|None | no | Output cell size when base_raster is not provided. |
base_raster | Raster | no | Optional base raster controlling output geometry. |
kernel_function | string | no | Kernel function type such as quartic, gaussian, triangular, or uniform. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.heat_map(
points,
bandwidth=1.0,
field_name="value",
cell_size=1.0,
base_raster,
kernel_function="value",
output_path="result.tif",
)
idw_interpolation
idw_interpolation(points, field_name="FID", use_z=False, weight=2.0, radius=0.0, min_points=0, cell_size=None, base_raster=None, output_path=None, callback=None)
Interpolates a raster from point samples using inverse-distance weighting.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
points | Vector | yes | Input points vector layer. |
field_name | string | no | Optional numeric attribute field; defaults to FID fallback. |
use_z | bool | no | If True, uses point Z values instead of attributes. |
weight | float | no | IDW distance exponent. |
radius | float | no | Optional neighbourhood radius in map units. |
min_points | int | no | Minimum number of neighbours to use. |
cell_size | float|None | no | Output cell size when base_raster is not provided. |
base_raster | Raster | no | Optional base raster controlling output geometry. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.idw_interpolation(
points,
field_name="value",
weight=1.0,
radius=1.0,
min_points=1,
cell_size=1.0,
base_raster,
output_path="result.tif",
)
layer_footprint_raster
layer_footprint_raster(input, output_path=None, callback=None)
Creates a rectangular polygon footprint from the full spatial extent of a raster.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived GeoJSON path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.layer_footprint_raster(
input,
output_path="result.tif",
)
layer_footprint_vector
layer_footprint_vector(input, output_path=None, callback=None)
Creates a rectangular polygon footprint from the full bounding box of a vector layer.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.layer_footprint_vector(
input,
output_path="result.tif",
)
hexagonal_grid_from_raster_base
hexagonal_grid_from_raster_base(base, width, orientation="h", output_path=None, callback=None)
Creates a hexagonal polygon grid using the extent of a base raster.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base | Raster | yes | Base raster controlling output extent. |
width | float | yes | Hexagon width in map units. |
orientation | string | no | Hexagon orientation ("h"/horizontal or "v"/vertical). |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.hexagonal_grid_from_raster_base(
base,
width=1.0,
orientation="value",
output_path="result.tif",
)
hexagonal_grid_from_vector_base
hexagonal_grid_from_vector_base(base, width, orientation="h", output_path=None, callback=None)
Creates a hexagonal polygon grid using the bounding extent of a base vector layer.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base | Vector | yes | Base vector layer controlling output extent. |
width | float | yes | Hexagon width in map units. |
orientation | string | no | Hexagon orientation ("h"/horizontal or "v"/vertical). |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.hexagonal_grid_from_vector_base(
base,
width=1.0,
orientation="value",
output_path="result.tif",
)
rectangular_grid_from_raster_base
rectangular_grid_from_raster_base(base, width, height, x_origin=0.0, y_origin=0.0, output_path=None, callback=None)
Creates a rectangular polygon grid using the extent of a base raster.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base | Raster | yes | Base raster controlling output extent. |
width | float | yes | Grid cell width in map units. |
height | float | yes | Grid cell height in map units. |
x_origin | float | no | Optional x-origin used to align the grid. |
y_origin | float | no | Optional y-origin used to align the grid. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.rectangular_grid_from_raster_base(
base,
width=1.0,
height=1.0,
x_origin=1.0,
y_origin=1.0,
output_path="result.tif",
)
rectangular_grid_from_vector_base
rectangular_grid_from_vector_base(base, width, height, x_origin=0.0, y_origin=0.0, output_path=None, callback=None)
Creates a rectangular polygon grid using the bounding extent of a base vector layer.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base | Vector | yes | Base vector layer controlling output extent. |
width | float | yes | Grid cell width in map units. |
height | float | yes | Grid cell height in map units. |
x_origin | float | no | Optional x-origin used to align the grid. |
y_origin | float | no | Optional y-origin used to align the grid. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.rectangular_grid_from_vector_base(
base,
width=1.0,
height=1.0,
x_origin=1.0,
y_origin=1.0,
output_path="result.tif",
)
map_features
map_features(input, min_feature_height, min_feature_size=1, output_path=None, callback=None)
Labels discrete terrain features in a raster using descending-priority region growth and small-feature merging.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster. |
min_feature_height | float | yes | Minimum vertical separation required for separate features. |
min_feature_size | int | no | Minimum retained feature size in cells. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.map_features(
input,
min_feature_height=1.0,
min_feature_size=1,
output_path="result.tif",
)
natural_neighbour_interpolation
natural_neighbour_interpolation(points, field_name="FID", use_z=False, cell_size=None, base_raster=None, clip_to_hull=True, output_path=None, callback=None)
Interpolates a raster from point samples using Delaunay-neighbour weighted interpolation.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
points | Vector | yes | Input points vector layer. |
field_name | string | no | Optional numeric attribute field; defaults to FID fallback. |
use_z | bool | no | If True, uses point Z values instead of attributes. |
cell_size | float|None | no | Output cell size when base_raster is not provided. |
base_raster | Raster | no | Optional base raster controlling output geometry. |
clip_to_hull | bool | no | If True, limits interpolation to the points' convex hull. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.local_neighborhood.natural_neighbour_interpolation(
points,
field_name="value",
cell_size=1.0,
base_raster,
output_path="result.tif",
)
nearest_neighbour_interpolation
nearest_neighbour_interpolation(points, field_name="FID", use_z=False, cell_size=None, base_raster=None, max_dist=None, output_path=None, callback=None)
Interpolates a raster from point samples using nearest-neighbour assignment.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
points | Vector | yes | Input points vector layer. |
field_name | string | no | Optional numeric attribute field; defaults to FID fallback. |
use_z | bool | no | If True, uses point Z values instead of attributes. |
cell_size | float|None | no | Output cell size when base_raster is not provided. |
base_raster | Raster | no | Optional base raster controlling output geometry. |
max_dist | float|None | no | Optional maximum search distance in map units. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.local_neighborhood.nearest_neighbour_interpolation(
points,
field_name="value",
cell_size=1.0,
base_raster,
max_dist=1.0,
output_path="result.tif",
)
modified_shepard_interpolation
modified_shepard_interpolation(points, field_name="FID", use_z=False, weight=2.0, radius=0.0, min_points=8, use_quadratic_basis=False, cell_size=None, base_raster=None, use_data_hull=False, output_path=None, callback=None)
Interpolates a raster from point samples using modified Shepard weighting.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
points | Vector | yes | Input points vector layer. |
field_name | string | no | Optional numeric attribute field; defaults to FID fallback. |
use_z | bool | no | If True, uses point Z values instead of attributes. |
weight | float | no | Shepard weight exponent. |
radius | float | no | Optional neighbourhood radius in map units. |
min_points | int | no | Minimum number of neighbours to use. |
use_quadratic_basis | bool | no | Optional local basis flag (reserved for parity refinement). |
cell_size | float|None | no | Output cell size when base_raster is not provided. |
base_raster | Raster | no | Optional base raster controlling output geometry. |
use_data_hull | bool | no | If True, limits interpolation to the points' convex hull. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.modified_shepard_interpolation(
points,
field_name="value",
weight=1.0,
radius=1.0,
min_points=1,
cell_size=1.0,
base_raster,
output_path="result.tif",
)
radial_basis_function_interpolation
radial_basis_function_interpolation(points, field_name="FID", use_z=False, radius=0.0, min_points=16, cell_size=None, base_raster=None, func_type="thinplatespline", poly_order="none", weight=0.1, approximate_mode=True, output_path=None, callback=None)
Interpolates a raster from point samples using local radial-basis similarity weighting.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
points | Vector | yes | Input points vector layer. |
field_name | string | no | Optional numeric attribute field; defaults to FID fallback. |
use_z | bool | no | If True, uses point Z values instead of attributes. |
radius | float | no | Optional neighbourhood radius in map units. |
min_points | int | no | Minimum number of neighbours to use. |
cell_size | float|None | no | Output cell size when base_raster is not provided. |
base_raster | Raster | no | Optional base raster controlling output geometry. |
func_type | Literal["thinplatespline", "polyharmonic", "gaussian", "multiquadric", "inversemultiquadric"] | no | Basis type (thinplatespline, polyharmonic, gaussian, multiquadric, inversemultiquadric). |
poly_order | Literal["none", "constant", "quadratic"] | no | Polynomial order hint (none, constant, quadratic). |
weight | float | no | Basis shape/exponent parameter. |
approximate_mode | bool | no | If True, uses the NG approximate local neighborhood strategy; if False, uses legacy-style exhaustive evaluation. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.radial_basis_function_interpolation(
points,
field_name="value",
radius=1.0,
min_points=1,
cell_size=1.0,
base_raster,
func_type,
poly_order,
weight=1.0,
output_path="result.tif",
)
tin_interpolation
tin_interpolation(points, field_name="FID", use_z=False, cell_size=None, base_raster=None, max_triangle_edge_length=None, output_path=None, callback=None)
Interpolates a raster from point samples using Delaunay triangulation and planar interpolation within each triangle.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
points | Vector | yes | Input points vector layer. |
field_name | string | no | Optional numeric attribute field; defaults to FID fallback. |
use_z | bool | no | If True, uses point Z values instead of attributes. |
cell_size | float|None | no | Output cell size when base_raster is not provided. |
base_raster | Raster | no | Optional base raster controlling output geometry. |
max_triangle_edge_length | float|None | no | Optional maximum allowed triangle edge length in map units. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.tin_interpolation(
points,
field_name="value",
cell_size=1.0,
base_raster,
max_triangle_edge_length=1.0,
output_path="result.tif",
)
raster_cell_assignment
raster_cell_assignment(input, what_to_assign="column", output_path=None, callback=None)
Creates a raster from a base raster by assigning each cell its row number, column number, x coordinate, or y coordinate.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input base raster. |
what_to_assign | Literal["column", "row", "x", "y"] | no | One of column, row, x, or y. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.raster_cell_assignment(
input,
what_to_assign,
output_path="result.tif",
)
block_maximum
block_maximum(points, field_name=None, use_z=False, cell_size=None, base_raster=None, output_path=None, callback=None)
Rasterizes point features by assigning the maximum observed value within each output cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
points | Vector | yes | Input points vector layer. |
field_name | string | no | Optional numeric attribute field. If omitted or unavailable, the tool falls back to feature IDs. |
use_z | bool | no | When True, use point Z values instead of attributes. |
cell_size | float | no | Output cell size when base_raster is not supplied. |
base_raster | Raster | no | Optional raster supplying output geometry. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.block_maximum(
points,
field_name="value",
cell_size=1.0,
base_raster,
output_path="result.tif",
)
block_minimum
block_minimum(points, field_name=None, use_z=False, cell_size=None, base_raster=None, output_path=None, callback=None)
Rasterizes point features by assigning the minimum observed value within each output cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
points | Vector | yes | Input points vector layer. |
field_name | string | no | Optional numeric attribute field. If omitted or unavailable, the tool falls back to feature IDs. |
use_z | bool | no | When True, use point Z values instead of attributes. |
cell_size | float | no | Output cell size when base_raster is not supplied. |
base_raster | Raster | no | Optional raster supplying output geometry. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
GIS (Bounding And Reclassification)
These tools create vector bounding geometries and reclassify labelled rasters.
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.block_minimum(
points,
field_name="value",
cell_size=1.0,
base_raster,
output_path="result.tif",
)
Bounding And Reclassification Tool Index
minimum_convex_hullminimum_bounding_boxminimum_bounding_circleminimum_bounding_envelopemedoidreclassreclass_equal_intervalfilter_raster_features_by_area
medoid
medoid(input, output_path=None, callback=None)
Creates medoid point output from vector geometries; for point layers this returns one medoid for the full set, and for non-point layers one medoid per feature.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.medoid(
input,
output_path="result.tif",
)
minimum_convex_hull
minimum_convex_hull(input, individual_feature_hulls=True, output_path=None, callback=None)
Creates convex hull polygons around vector features.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer. |
individual_feature_hulls | bool | no | If True, output one hull per input feature; if False, output one hull for the full layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.minimum_convex_hull(
input,
output_path="result.tif",
)
minimum_bounding_box
minimum_bounding_box(input, min_criteria="area", individual_feature_hulls=True, output_path=None, callback=None)
Creates oriented minimum bounding box polygons around vector features.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer. |
min_criteria | Literal["area", "perimeter", "length", "width"] | no | Optimization target ("area", "perimeter", "length", or "width"). |
individual_feature_hulls | bool | no | If True, output one box per input feature; if False, output one box for the full layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.minimum_bounding_box(
input,
min_criteria,
output_path="result.tif",
)
minimum_bounding_circle
minimum_bounding_circle(input, individual_feature_hulls=True, output_path=None, callback=None)
Creates minimum enclosing circle polygons around vector features.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer. |
individual_feature_hulls | bool | no | If True, output one circle per input feature; if False, output one circle for the full layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.minimum_bounding_circle(
input,
output_path="result.tif",
)
minimum_bounding_envelope
minimum_bounding_envelope(input, individual_feature_hulls=True, output_path=None, callback=None)
Creates axis-aligned minimum bounding envelope polygons around vector features.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer. |
individual_feature_hulls | bool | no | If True, output one envelope per input feature; if False, output one envelope for the full layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.minimum_bounding_envelope(
input,
output_path="result.tif",
)
reclass
reclass(input, reclass_values, assign_mode=False, output_path=None, callback=None)
Reclassifies raster values using either value ranges or exact assignment pairs.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster. |
reclass_values | list[list[float]] | yes | Reclassification rows. Use [new, from, to_less_than] for range mode, or [new, old] when assign_mode=True. |
assign_mode | bool | no | If True, interpret reclass_values rows as exact assignment pairs. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.reclass_mask.reclass(
input,
[reclass_values_1, reclass_values_2],
output_path="result.tif",
)
reclass_equal_interval
reclass_equal_interval(input, interval_size, start_value=None, end_value=None, output_path=None, callback=None)
Reclassifies raster values into equal-width intervals.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster. |
interval_size | float | yes | Interval width used for binning. |
start_value | float|None | no | Optional lower bound of the reclassification range. |
end_value | float|None | no | Optional upper bound of the reclassification range. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.reclass_mask.reclass_equal_interval(
input,
interval_size=1.0,
start_value=1.0,
end_value=1.0,
output_path="result.tif",
)
filter_raster_features_by_area
filter_raster_features_by_area(input, threshold, zero_background=False, output_path=None, callback=None)
Removes integer-labelled raster features smaller than a cell-count threshold.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster containing integer-labelled features. |
threshold | int | yes | Minimum feature size in cells to retain. |
zero_background | bool | no | If True, removed features are assigned zero; otherwise they are assigned NoData. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
GIS (Vector Overlay And Linework)
These tools perform vector overlay, line splitting/merging, and polygon generation from linework.
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.filter_raster_features_by_area(
input,
threshold=1,
output_path="result.tif",
)
Vector Overlay And Linework Tool Index
centroid_vectorclipdifferencedissolveeliminate_coincident_pointseraseextend_vector_linesextract_by_attributesnap_endnodessmooth_vectorssplit_vector_linesextract_nodesfilter_vector_features_by_areaintersectline_intersectionsmerge_line_segmentspolygonizesplit_with_linessymmetrical_differenceunionvoronoi_diagramtravelling_salesman_problemconstruct_vector_tinvector_hex_binning
extract_by_attribute
extract_by_attribute(input, statement, output_path=None, callback=None)
Extracts vector features whose attributes satisfy a boolean expression.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer. |
statement | string | yes | Boolean expression evaluated against attribute field names. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.attribute_analysis.extract_by_attribute(
input,
statement="value",
output_path="result.tif",
)
extract_raster_values_at_points
extract_raster_values_at_points(rasters, points, output_path=None, callback=None)
Samples one or more rasters at point locations and writes the values to new VALUE1, VALUE2, ... fields on the output point layer. Returns (vector, report_text).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
rasters | Raster | yes | List of input rasters to sample. |
points | Vector | yes | Input points vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
Returned as tuple[Vector, str] in this order:
result:Vectorstring_2:str
WbEnvironment usage
vector_1, string_2 = wbe.vector.sampling_gridding.extract_raster_values_at_points(
rasters,
points,
output_path="result.tif",
)
centroid_vector
centroid_vector(input, output_path=None, callback=None)
Computes centroid points from vector features.
For point inputs, the output is one centroid point representing the mean location of all points. For non-point inputs, the output contains one centroid point per input feature.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.centroid_vector(
input,
output_path="result.tif",
)
clip
clip(input, overlay, output_path=None, callback=None, snap_tolerance=None)
Clips input polygons to overlay polygon boundaries.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
overlay | Vector | yes | Overlay polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
snap_tolerance | float|None | no | Optional overlay snapping tolerance. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.overlay_analysis.clip(
input,
overlay,
output_path="result.tif",
snap_tolerance=1.0,
)
dissolve
dissolve(input, dissolve_field="", snap_tolerance=EPSILON, output_path=None, callback=None)
Removes shared polygon boundaries globally or within dissolve-field groups.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
dissolve_field | string | no | Optional field name used to dissolve polygons within attribute groups. |
snap_tolerance | float | no | Snapping tolerance used by topology operations. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.overlay_analysis.dissolve(
input,
dissolve_field="value",
snap_tolerance=1.0,
output_path="result.tif",
)
extract_nodes
extract_nodes(input, output_path=None, callback=None)
Converts polyline or polygon vertices into output point features.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polyline or polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.extract_nodes(
input,
output_path="result.tif",
)
filter_vector_features_by_area
filter_vector_features_by_area(input, threshold, output_path=None, callback=None)
Removes polygon features smaller than the specified area threshold.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
threshold | float | yes | Minimum polygon area to retain. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.attribute_analysis.filter_vector_features_by_area(
input,
threshold=1.0,
output_path="result.tif",
)
extend_vector_lines
extend_vector_lines(input, distance, extend_direction="both", output_path=None, callback=None)
Extends line features by moving the start endpoint, end endpoint, or both along the local line direction.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input line vector layer. |
distance | float | yes | Extension distance in map units. |
extend_direction | Literal["both", "start", "end"] | no | One of "both", "start", or "end". |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.extend_vector_lines(
input,
distance=1.0,
extend_direction,
output_path="result.tif",
)
smooth_vectors
smooth_vectors(input, filter_size=3, output_path=None, callback=None)
Smooths polyline and polygon geometries using an odd-sized moving-average window.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polyline or polygon vector layer. |
filter_size | int | no | Smoothing window size (odd integer >= 3; even values are adjusted to the next odd value). |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.smooth_vectors(
input,
filter_size=1,
output_path="result.tif",
)
split_vector_lines
split_vector_lines(input, segment_length, output_path=None, callback=None)
Divides polyline features into segments of a maximum specified length. Each output segment becomes
a separate feature. The output attributes include FID, PARENT_ID (the 1-based index of the
originating input feature), and all other input attributes.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polyline vector layer. |
segment_length | float | yes | Maximum segment length in map units (must be > 0). |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.split_vector_lines(
input,
segment_length=1.0,
output_path="result.tif",
)
snap_endnodes
snap_endnodes(input, snap_tolerance=EPSILON, output_path=None, callback=None)
Snaps nearby polyline start/end nodes to shared coordinates within the specified tolerance.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polyline vector layer. |
snap_tolerance | float | no | Endpoint snapping tolerance in map units. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.snap_endnodes(
input,
snap_tolerance=1.0,
output_path="result.tif",
)
line_intersections
line_intersections(input1, input2, output_path=None, callback=None, snap_tolerance=None)
Finds intersection points between line or polygon boundaries in two input vector layers.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Vector | yes | First input vector layer. |
input2 | Vector | yes | Second input vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
snap_tolerance | float|None | no | Optional intersection snapping tolerance. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.overlay_analysis.line_intersections(
input1,
input2,
output_path="result.tif",
snap_tolerance=1.0,
)
merge_line_segments
merge_line_segments(input, snap_tolerance=EPSILON, output_path=None, callback=None)
Merges connected line segments whose endpoints match within the snap tolerance.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polyline vector layer. |
snap_tolerance | float | no | Endpoint snapping tolerance. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.merge_line_segments(
input,
snap_tolerance=1.0,
output_path="result.tif",
)
polygonize
polygonize(input_layers, snap_tolerance=EPSILON, output_path=None, callback=None)
Creates polygons from closed rings in one or more input line layers.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_layers | Vector | yes | List of input line vector layers. |
snap_tolerance | float | no | Snapping tolerance used while polygonizing. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.polygonize(
input_layers,
snap_tolerance=1.0,
output_path="result.tif",
)
split_with_lines
split_with_lines(input, split_vector, snap_tolerance=EPSILON, output_path=None, callback=None)
Splits line features in the input layer at intersections with a split line layer.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input line vector layer to split. |
split_vector | Vector | yes | Line vector layer defining split locations. |
snap_tolerance | float | no | Snapping tolerance used during splitting. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.split_with_lines(
input,
split_vector,
snap_tolerance=1.0,
output_path="result.tif",
)
symmetrical_difference
symmetrical_difference(input, overlay, output_path=None, callback=None, snap_tolerance=None)
Computes non-overlapping polygon regions from the input and overlay layers.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
overlay | Vector | yes | Overlay polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
snap_tolerance | float|None | no | Optional overlay snapping tolerance. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.overlay_analysis.symmetrical_difference(
input,
overlay,
output_path="result.tif",
snap_tolerance=1.0,
)
voronoi_diagram
voronoi_diagram(input_points, output_path=None, callback=None)
Creates Voronoi (Thiessen) polygon cells from input point locations.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_points | Vector | yes | Input point or multipoint vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.voronoi_diagram(
input_points,
output_path="result.tif",
)
travelling_salesman_problem
travelling_salesman_problem(input, duration=60, output_path=None, callback=None)
Finds an approximate solution to the travelling salesman problem (TSP) for a set of points using 2-opt local search heuristics.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input point or multipoint vector layer. |
duration | int | no | Maximum optimization duration in seconds (default: 60). |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Returns a polyline feature representing the optimal or near-optimal tour through the input points.
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.network_analysis.travelling_salesman_problem(
input,
duration=1,
output_path="result.tif",
)
construct_vector_tin
construct_vector_tin(input_points, field_name="FID", max_triangle_edge_length=-1.0, output_path=None, callback=None)
Constructs a triangular irregular network (TIN) from point features using Delaunay triangulation.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_points | Vector | yes | Input point or multipoint vector layer. |
field_name | string | no | Numeric field name used as the z-value source when filtering triangle edge lengths (default: "FID"). |
max_triangle_edge_length | float | no | Maximum allowable triangle edge length. Values <= 0 disable filtering. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.construct_vector_tin(
input_points,
field_name="value",
max_triangle_edge_length=1.0,
output_path="result.tif",
)
vector_hex_binning
vector_hex_binning(vector_points, width, orientation="h", output_path=None, callback=None)
Bins point features into a generated hexagonal grid and writes per-cell point counts.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
vector_points | Vector | yes | Input point vector layer. |
width | float | yes | Hexagon width (distance between opposing sides). |
orientation | string | no | Grid orientation ("h" for horizontal/pointy-top, "v" for vertical/flat-top). |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.sampling_gridding.vector_hex_binning(
vector_points,
width=1.0,
orientation="value",
output_path="result.tif",
)
difference
difference(input, overlay, output_path=None, callback=None, snap_tolerance=None)
Removes overlay polygon areas from input polygons.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
overlay | Vector | yes | Overlay polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
snap_tolerance | float|None | no | Optional overlay snapping tolerance. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.overlay_analysis.difference(
input,
overlay,
output_path="result.tif",
snap_tolerance=1.0,
)
eliminate_coincident_points
eliminate_coincident_points(input, tolerance_dist, output_path=None, callback=None)
Removes duplicate and near-duplicate points that fall within a specified distance tolerance.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input point vector layer. |
tolerance_dist | float | yes | Distance threshold used to treat points as coincident. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.geometry_processing.eliminate_coincident_points(
input,
tolerance_dist=1.0,
output_path="result.tif",
)
erase
erase(input, overlay, output_path=None, callback=None, snap_tolerance=None)
Erases overlay polygon areas from input polygons while preserving input attributes.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
overlay | Vector | yes | Overlay polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
snap_tolerance | float|None | no | Optional overlay snapping tolerance. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.overlay_analysis.erase(
input,
overlay,
output_path="result.tif",
snap_tolerance=1.0,
)
intersect
intersect(input, overlay, output_path=None, callback=None, snap_tolerance=None)
Computes polygon intersections between input and overlay layers.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
overlay | Vector | yes | Overlay polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
snap_tolerance | float|None | no | Optional overlay snapping tolerance. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.overlay_analysis.intersect(
input,
overlay,
output_path="result.tif",
snap_tolerance=1.0,
)
union
union(input, overlay, output_path=None, callback=None, snap_tolerance=None)
Builds a unified polygon coverage from input and overlay layers.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
overlay | Vector | yes | Overlay polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
snap_tolerance | float|None | no | Optional overlay snapping tolerance. |
GIS (Raster Polygon Masking)
These tools use polygon vectors to clip or erase cells from raster inputs.
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.overlay_analysis.union(
input,
overlay,
output_path="result.tif",
snap_tolerance=1.0,
)
Raster Polygon Masking Tool Index
clip_raster_to_polygonerase_polygon_from_raster
clip_raster_to_polygon
clip_raster_to_polygon(input, polygons, maintain_dimensions=False, output_path=None, callback=None)
Clips a raster to polygon coverage, setting cells outside polygons to NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster. |
polygons | Vector | yes | Input polygon vector layer. |
maintain_dimensions | bool | no | If True, keep original raster dimensions; otherwise crop to polygon extent. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.clip_raster_to_polygon(
input,
polygons,
output_path="result.tif",
)
erase_polygon_from_raster
erase_polygon_from_raster(input, polygons, output_path=None, callback=None)
Sets raster cells inside polygons to NoData while preserving cells outside polygons.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster. |
polygons | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.erase_polygon_from_raster(
input,
polygons,
output_path="result.tif",
)
average_overlay
average_overlay(input_rasters, output_path=None, callback=None)
Computes the per-cell average across a raster stack. NoData cells are ignored unless all inputs are NoData at that location.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.average_overlay(
input_rasters,
output_path="result.tif",
)
count_if
count_if(input_rasters, comparison_value, output_path=None, callback=None)
Counts how many rasters in the stack equal comparison_value at each cell. If all inputs are NoData at a cell, the output cell is NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
comparison_value | float | yes | Numeric value to count within the stack. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.count_if(
input_rasters,
comparison_value=1.0,
output_path="result.tif",
)
highest_position
highest_position(input_rasters, output_path=None, callback=None)
Returns the zero-based input-stack index of the raster containing the highest value at each cell. If any input cell is NoData, the output cell is NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.highest_position(
input_rasters,
output_path="result.tif",
)
lowest_position
lowest_position(input_rasters, output_path=None, callback=None)
Returns the zero-based input-stack index of the raster containing the lowest value at each cell. If any input cell is NoData, the output cell is NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.lowest_position(
input_rasters,
output_path="result.tif",
)
max_overlay
max_overlay(input_rasters, output_path=None, callback=None)
Computes the per-cell maximum across a raster stack. Any NoData input cell causes the corresponding output cell to be NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.max_overlay(
input_rasters,
output_path="result.tif",
)
max_absolute_overlay
max_absolute_overlay(input_rasters, output_path=None, callback=None)
Computes the per-cell maximum absolute value across a raster stack. Any NoData input cell causes the corresponding output cell to be NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.max_absolute_overlay(
input_rasters,
output_path="result.tif",
)
min_overlay
min_overlay(input_rasters, output_path=None, callback=None)
Computes the per-cell minimum across a raster stack. Any NoData input cell causes the corresponding output cell to be NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.min_overlay(
input_rasters,
output_path="result.tif",
)
min_absolute_overlay
min_absolute_overlay(input_rasters, output_path=None, callback=None)
Computes the per-cell minimum absolute value across a raster stack. Any NoData input cell causes the corresponding output cell to be NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.min_absolute_overlay(
input_rasters,
output_path="result.tif",
)
multiply_overlay
multiply_overlay(input_rasters, output_path=None, callback=None)
Computes the per-cell product across a raster stack. Any NoData input cell causes the corresponding output cell to be NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.multiply_overlay(
input_rasters,
output_path="result.tif",
)
percent_equal_to
percent_equal_to(input_rasters, comparison, output_path=None, callback=None)
Computes the fraction of rasters in the input stack whose values equal the comparison raster at each cell. Any NoData in the comparison raster or input stack causes the corresponding output cell to be NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
comparison | Raster | yes | Comparison raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.percent_equal_to(
input_rasters,
comparison,
output_path="result.tif",
)
percent_greater_than
percent_greater_than(input_rasters, comparison, output_path=None, callback=None)
Computes the fraction of rasters in the input stack whose values are greater than the comparison raster at each cell. Any NoData in the comparison raster or input stack causes the corresponding output cell to be NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
comparison | Raster | yes | Comparison raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.percent_greater_than(
input_rasters,
comparison,
output_path="result.tif",
)
percent_less_than
percent_less_than(input_rasters, comparison, output_path=None, callback=None)
Computes the fraction of rasters in the input stack whose values are less than the comparison raster at each cell. Any NoData in the comparison raster or input stack causes the corresponding output cell to be NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
comparison | Raster | yes | Comparison raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.percent_less_than(
input_rasters,
comparison,
output_path="result.tif",
)
sum_overlay
sum_overlay(input_rasters, output_path=None, callback=None)
Computes the per-cell sum across a raster stack. Any NoData input cell causes the corresponding output cell to be NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.sum_overlay(
input_rasters,
output_path="result.tif",
)
pick_from_list
pick_from_list(input_rasters, pos_input, output_path=None, callback=None)
Selects per-cell values from an input raster stack using a zero-based position raster.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
pos_input | Raster | yes | Raster containing zero-based indices into the raster stack. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.pick_from_list(
input_rasters,
pos_input,
output_path="result.tif",
)
weighted_overlay
weighted_overlay(factors, weights, cost=None, constraints=None, scale_max=1.0, output_path=None, callback=None)
Combines factor rasters using normalized weights, optional cost flags, and optional constraint rasters. Constraint cells with values less than or equal to zero force the output to zero.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
factors | Raster | yes | Input factor raster stack as a Python list of rasters or raster paths. |
weights | list[float] | yes | Numeric weights corresponding to each factor. |
cost | list[bool]|None | no | Optional list of booleans indicating whether each factor is a cost surface. |
constraints | Raster | no | Optional list of raster constraints. |
scale_max | float | no | Maximum scaled suitability value after per-factor normalization. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.weighted_overlay(
factors,
[weights_1, weights_2],
[cost_1, cost_2],
constraints,
scale_max=1.0,
output_path="result.tif",
)
weighted_sum
weighted_sum(input_rasters, weights, output_path=None, callback=None)
Computes a weighted sum across a raster stack after normalizing weights so they sum to one.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
weights | list[float] | yes | Numeric weights corresponding to each input raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.weighted_sum(
input_rasters,
[weights_1, weights_2],
output_path="result.tif",
)
standard_deviation_overlay
standard_deviation_overlay(input_rasters, output_path=None, callback=None)
Computes the per-cell standard deviation across a raster stack. Any NoData input cell causes the corresponding output cell to be NoData.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_rasters | Raster | yes | Input raster stack as a Python list of rasters or raster paths. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
GIS (Raster Value Updating)
These tools update raster values in-place by applying cell-wise value replacement logic between aligned rasters.
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.standard_deviation_overlay(
input_rasters,
output_path="result.tif",
)
Value Update Tool Index
update_nodata_cells
update_nodata_cells
update_nodata_cells(input1, input2, output_path=None, callback=None)
Assigns NoData cells in input1 from corresponding valid cells in input2.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input1 | Raster | yes | Primary raster to update. |
input2 | Raster | yes | Secondary raster supplying replacement values. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
GIS (Distance And Cost Analysis)
These tools support Euclidean and friction/cost-based distance modelling workflows.
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.overlay_math.update_nodata_cells(
input1,
input2,
output_path="result.tif",
)
Distance and Cost Tool Index
cost_allocationcost_distancecost_pathwayeuclidean_allocationeuclidean_distance
cost_distance
cost_distance(source, cost, output_path=None, backlink_output_path=None, callback=None)
Computes accumulated cost distance from source cells over a cost/friction raster and outputs both the cost-accumulation raster and a backlink raster.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
source | Raster | yes | Source raster with positive source cells. |
cost | Raster | yes | Cost/friction raster. |
output_path | string | no | Optional cost-accumulation output path. |
backlink_output_path | string | no | Optional backlink output path. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
Returned as tuple[Raster, Raster] in this order:
result:Rasterbacklink:Raster
WbEnvironment usage
raster_1, raster_2 = wbe.raster.distance_cost.cost_distance(
source,
cost,
output_path="result.tif",
backlink_output="value",
)
cost_allocation
cost_allocation(source, backlink, output_path=None, callback=None)
Assigns each cell to a source region using backlink connectivity from cost_distance.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
source | Raster | yes | Source raster with positive source cells. |
backlink | Raster | yes | Backlink raster from cost_distance. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.distance_cost.cost_allocation(
source,
backlink,
output_path="result.tif",
)
cost_pathway
cost_pathway(destination, backlink, zero_background=False, output_path=None, callback=None)
Traces least-cost pathways from destination cells using backlink connectivity from cost_distance.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
destination | Raster | yes | Destination raster with positive destination cells. |
backlink | Raster | yes | Backlink raster from cost_distance. |
zero_background | bool | no | If True, set non-path cells to zero instead of NoData. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.distance_cost.cost_pathway(
destination,
backlink,
output_path="result.tif",
)
euclidean_distance
euclidean_distance(input, output_path=None, callback=None)
Computes Euclidean distance from each valid cell to the nearest non-zero target cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster with non-zero target cells. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.distance_cost.euclidean_distance(
input,
output_path="result.tif",
)
euclidean_allocation
euclidean_allocation(input, output_path=None, callback=None)
Assigns each valid cell the value of the nearest non-zero target cell.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster with non-zero target cells. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
GIS (Raster Polygon Metrics)
These tools estimate per-class polygon metrics from categorical rasters and write class totals back to each class cell.
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.distance_cost.euclidean_allocation(
input,
output_path="result.tif",
)
Polygon Metric Tool Index
polygon_areapolygon_long_axispolygon_perimeterpolygon_short_axisraster_arearaster_perimeter
polygon_area
polygon_area(input, output_path=None, callback=None)
Calculates vector polygon area and appends an AREA field to the output.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.polygon_area(
input,
output_path="result.tif",
)
polygon_perimeter
polygon_perimeter(input, output_path=None, callback=None)
Calculates vector polygon perimeter and appends a PERIMETER field to the output.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.polygon_perimeter(
input,
output_path="result.tif",
)
polygon_short_axis
polygon_short_axis(input, output_path=None, callback=None)
Maps the short axis of each polygon's minimum bounding box to output line features.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.polygon_short_axis(
input,
output_path="result.tif",
)
polygon_long_axis
polygon_long_axis(input, output_path=None, callback=None)
Maps the long axis of each polygon's minimum bounding box to output line features.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.polygon_long_axis(
input,
output_path="result.tif",
)
compactness_ratio
compactness_ratio(input, output_path=None, callback=None)
Computes compactness ratio for polygon features and appends COMPACTNESS.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.compactness_ratio(
input,
output_path="result.tif",
)
elongation_ratio
elongation_ratio(input, output_path=None, callback=None)
Computes polygon elongation ratio and appends ELONGATION.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.elongation_ratio(
input,
output_path="result.tif",
)
hole_proportion
hole_proportion(input, output_path=None, callback=None)
Computes polygon hole proportion and appends HOLE_PROP.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.hole_proportion(
input,
output_path="result.tif",
)
linearity_index
linearity_index(input, output_path=None, callback=None)
Computes linearity index and appends LINEARITY.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input line or polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.linearity_index(
input,
output_path="result.tif",
)
narrowness_index
narrowness_index(input, output_path=None, callback=None)
Computes raster narrowness index from each cell's local neighborhood.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.narrowness_index(
input,
output_path="result.tif",
)
narrowness_index_vector
narrowness_index_vector(input, output_path=None, callback=None)
Computes narrowness index for polygon features and appends NARROWNESS.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.narrowness_index_vector(
input,
output_path="result.tif",
)
patch_orientation
patch_orientation(input, output_path=None, callback=None)
Computes patch orientation and appends ORIENT.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.patch_orientation(
input,
output_path="result.tif",
)
perimeter_area_ratio
perimeter_area_ratio(input, output_path=None, callback=None)
Computes perimeter-area ratio and appends P_A_RATIO.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.perimeter_area_ratio(
input,
output_path="result.tif",
)
related_circumscribing_circle
related_circumscribing_circle(input, output_path=None, callback=None)
Computes the related circumscribing circle metric and appends RC_CIRCLE.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.related_circumscribing_circle(
input,
output_path="result.tif",
)
shape_complexity_index_vector
shape_complexity_index_vector(input, output_path=None, callback=None)
Computes vector shape complexity index and appends SCI.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.shape_complexity_index_vector(
input,
output_path="result.tif",
)
deviation_from_regional_direction
deviation_from_regional_direction(input, elongation_threshold=0.75, output_path=None, callback=None)
Computes polygon directional deviation from the regional direction and appends DEV_DIR.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input polygon vector layer. |
elongation_threshold | float | no | Threshold for including polygons in regional direction estimation. |
output_path | string | no | Optional output vector path. If omitted, an auto-derived output path is used. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Vector
WbEnvironment usage
result = wbe.vector.shape_metrics.deviation_from_regional_direction(
input,
elongation_threshold=1.0,
output_path="result.tif",
)
boundary_shape_complexity
boundary_shape_complexity(input, output_path=None, callback=None)
Computes raster patch boundary-shape complexity.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input patch-ID raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.boundary_shape_complexity(
input,
output_path="result.tif",
)
edge_proportion
edge_proportion(input, output_path=None, callback=None)
Computes edge-cell proportion per raster patch.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input patch-ID raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.edge_proportion(
input,
output_path="result.tif",
)
find_patch_edge_cells
find_patch_edge_cells(input, output_path=None, callback=None)
Identifies edge cells for each raster patch.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input patch-ID raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.find_patch_edge_cells(
input,
output_path="result.tif",
)
radius_of_gyration
radius_of_gyration(input, output_path=None, callback=None)
Computes radius of gyration per raster patch.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input patch-ID raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.radius_of_gyration(
input,
output_path="result.tif",
)
shape_complexity_index_raster
shape_complexity_index_raster(input, output_path=None, callback=None)
Computes raster patch shape complexity index.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input patch-ID raster. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.shape_complexity_index_raster(
input,
output_path="result.tif",
)
raster_area
raster_area(input, units="map units", zero_background=False, output_path=None, callback=None)
Estimates per-class area from a categorical raster and assigns each class's total area to all cells of that class.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input categorical raster. |
units | string | no | Area units ("map units" or "grid cells"). |
zero_background | bool | no | If True, zero-valued cells are excluded. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.raster_area(
input,
units="value",
output_path="result.tif",
)
raster_perimeter
raster_perimeter(input, units="map units", zero_background=False, output_path=None, callback=None)
Estimates per-class perimeter from a categorical raster using an anti-aliasing lookup-table method and assigns each class's total perimeter to all cells of that class.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input categorical raster. |
units | string | no | Perimeter units ("map units" or "grid cells"). |
zero_background | bool | no | If True, zero-valued cells are excluded. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
GIS (Raster Binary And Patch Tools)
These tools are used to derive binary proximity rasters and connected-component patch identifiers from categorical inputs.
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.raster_perimeter(
input,
units="value",
output_path="result.tif",
)
Binary and Patch Tool Index
clump
clump
clump(input, diag=False, zero_background=False, output_path=None, callback=None)
Groups contiguous equal-valued cells into unique patch identifiers.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input categorical raster. |
diag | bool | no | If True, include diagonal connectivity (8-neighbour); otherwise use 4-neighbour. |
zero_background | bool | no | If True, keep zero-valued cells as background. |
output_path | string | no | Optional output path. If omitted, returns an in-memory raster. |
callback | function | no | Optional progress callback receiving JSON events. |
Outputs
return:Raster
WbEnvironment usage
result = wbe.raster.clump(
input,
output_path="result.tif",
)
Remote Sensing
Whitebox Workflows for Python — Remote Sensing Tools
This document covers all Remote Sensing tools exposed through the WbEnvironment API.
For common conventions, Raster I/O, and math operators see TOOLS.md.
Remote Sensing
These tools are grouped under the remote_sensing tool module in the backend.
Image filters are currently the first subset documented here; additional non-filter
remote sensing tools will be added to this same section as they are ported.
Tools (Alphabetical)
wbe.adaptive_filterwbe.anisotropic_diffusion_filterwbe.balance_contrast_enhancementwbe.bilateral_filterwbe.brdf_surface_reflectance_consistencywbe.canny_edge_detectionwbe.conservative_smoothing_filterwbe.change_vector_analysiswbe.remote_sensing_change_detectionwbe.closingwbe.corner_detectionwbe.correct_vignettingwbe.create_colour_compositewbe.diff_of_gaussians_filterwbe.direct_decorrelation_stretchwbe.diversity_filterwbe.edge_preserving_mean_filterwbe.emboss_filterwbe.evaluate_training_siteswbe.fast_almost_gaussian_filterwbe.flip_imagewbe.frost_filterwbe.frangi_filterwbe.fuzzy_knn_classificationwbe.gabor_filter_bankwbe.generalize_classified_rasterwbe.generalize_with_similaritywbe.gaussian_contrast_stretchwbe.gaussian_filterwbe.gamma_correctionwbe.gamma_map_filterwbe.guided_filterwbe.high_pass_filterwbe.high_pass_bilateral_filterwbe.high_pass_median_filterwbe.histogram_equalizationwbe.histogram_matchingwbe.histogram_matching_two_imageswbe.ihs_to_rgbwbe.k_means_clusteringwbe.k_nearest_mean_filterwbe.knn_classificationwbe.knn_regressionwbe.logistic_regressionwbe.random_forest_classificationwbe.random_forest_classification_fitwbe.random_forest_classification_predictwbe.random_forest_regressionwbe.random_forest_regression_fitwbe.random_forest_regression_predictwbe.kuan_filterwbe.kuwahara_filterwbe.image_sliderwbe.image_segmentationwbe.integral_image_transformwbe.image_stack_profilewbe.laplacian_filterwbe.laplacian_of_gaussians_filterwbe.lee_filterwbe.line_detection_filterwbe.line_thinningwbe.majority_filterwbe.maximum_filterwbe.mean_filterwbe.median_filterwbe.min_max_contrast_stretchwbe.min_dist_classificationwbe.minimum_filterwbe.modified_k_means_clusteringwbe.mosaicwbe.mosaic_with_featheringwbe.multi_sensor_fusion_monitoringwbe.non_local_means_filterwbe.nnd_classificationwbe.normalized_difference_indexwbe.openingwbe.olympic_filterwbe.otsu_thresholdingwbe.panchromatic_sharpeningwbe.parallelepiped_classificationwbe.percentage_contrast_stretchwbe.piecewise_contrast_stretchwbe.percentile_filterwbe.prewitt_filterwbe.range_filterwbe.rgb_to_ihswbe.remove_spurswbe.roberts_cross_filterwbe.resamplewbe.savitzky_golay_2d_filterwbe.scharr_filterwbe.sigmoidal_contrast_stretchwbe.sobel_filterwbe.split_colour_compositewbe.standard_deviation_contrast_stretchwbe.standard_deviation_filterwbe.svm_classificationwbe.svm_regressionwbe.time_series_change_intelligencewbe.sar_coregistrationwbe.sar_interferogram_coherencewbe.thicken_raster_linewbe.terrain_corrected_optical_analyticswbe.total_filterwbe.tophat_transformwbe.sar_analysis_readinesswbe.unsharp_maskingwbe.user_defined_weights_filterwbe.wiener_filterwbe.write_function_memory_insertion
wbe.gaussian_filter
wbe.gaussian_filter(
input,
sigma=None,
treat_as_rgb=False,
assume_three_band_rgb=True,
output_path=None,
callback=None,
) -> Raster
Applies a Gaussian smoothing kernel to a raster image.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
sigma | float | None | 0.75 | Gaussian standard deviation in pixels (0.5–20.0). Larger values produce a wider, smoother kernel |
treat_as_rgb | bool | False | Force packed-RGB processing in HSI intensity space. When false, packed RGB may still be auto-detected from raster metadata |
assume_three_band_rgb | bool | True | When True, 3-band uint8/uint16 rasters are treated as RGB if no explicit colour metadata is present. Set False for multispectral datasets |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
# Default smoothing
smoothed = wbe.gaussian_filter(image)
# Wider kernel
smoothed_wide = wbe.gaussian_filter(image, sigma=3.0, output_path='smoothed.tif')
# Disable 3-band RGB heuristic for a multispectral image
ms_smoothed = wbe.gaussian_filter(ms_image, sigma=1.5, assume_three_band_rgb=False)
wbe.bilateral_filter
wbe.bilateral_filter(
input,
sigma_dist=None,
sigma_int=None,
treat_as_rgb=False,
assume_three_band_rgb=True,
output_path=None,
callback=None,
) -> Raster
Applies an edge-preserving bilateral smoothing filter. Nearby pixels that are similar in intensity are averaged together; pixels across edges (large intensity differences) are weighted much less, preserving sharp boundaries.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
sigma_dist | float | None | 0.75 | Spatial (distance) Gaussian standard deviation in pixels (0.5–20.0). Controls the filter radius |
sigma_int | float | None | 1.0 | Intensity Gaussian standard deviation in raster value units. Larger values reduce edge-preservation and approach a plain Gaussian blur |
treat_as_rgb | bool | False | Force packed-RGB processing in HSI intensity space |
assume_three_band_rgb | bool | True | When True, 3-band uint8/uint16 rasters are treated as RGB if no explicit colour metadata is present |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
# Default edge-preserving smoothing
smoothed = wbe.bilateral_filter(image)
# Stronger smoothing with larger kernels
smoothed_strong = wbe.bilateral_filter(
image, sigma_dist=3.0, sigma_int=50.0, output_path='bilateral.tif'
)
# Disable the 3-band RGB heuristic for a multispectral image
ms_smoothed = wbe.bilateral_filter(
ms_image, sigma_dist=1.5, sigma_int=25.0, assume_three_band_rgb=False
)
wbe.balance_contrast_enhancement
wbe.balance_contrast_enhancement(
input,
band_mean=None,
output_path=None,
callback=None,
) -> Raster
Reduces colour bias in a packed RGB raster using per-channel balance contrast enhancement.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input packed RGB raster |
band_mean | float | None | 100.0 | Desired output mean brightness for each colour channel |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
bce = wbe.balance_contrast_enhancement(rgb_image)
bce120 = wbe.balance_contrast_enhancement(rgb_image, band_mean=120.0)
wbe.change_vector_analysis
wbe.change_vector_analysis(
date1,
date2,
magnitude_output=None,
direction_output=None,
callback=None,
) -> dict[str, Raster]
Performs change vector analysis on two-date multispectral datasets. Returns both vector magnitude and direction-code rasters.
date1 and date2 can be either string lists (comma/semicolon-delimited)
or arrays of raster inputs, and must have equal lengths.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
date1 | list[Raster] | str | required | Earlier-date raster list |
date2 | list[Raster] | str | required | Later-date raster list in matching band order |
magnitude_output | str | None | None | Optional output path for CVA magnitude raster |
direction_output | str | None | None | Optional output path for CVA direction-code raster |
callback | callable | None | None | Progress/message event handler |
Returns
A dict with keys "magnitude" and "direction" containing output rasters.
Examples
cva = wbe.change_vector_analysis(
date1=[d1_red, d1_green, d1_blue],
date2=[d2_red, d2_green, d2_blue],
)
mag = cva["magnitude"]
direction = cva["direction"]
wbe.remote_sensing_change_detection
wbe.remote_sensing_change_detection(
baseline_red,
baseline_nir,
change_red,
change_nir,
intermediate_ndvi=None,
profile="balanced",
high_confidence_threshold=0.85,
output_prefix=None,
callback=None,
) -> tuple[Raster, Raster, str]
Runs workflow-grade NDVI change detection and returns a change raster, a confidence raster, and a summary JSON path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
baseline_red | Raster | required | Baseline-date red band |
baseline_nir | Raster | required | Baseline-date NIR band |
change_red | Raster | required | Change-date red band |
change_nir | Raster | required | Change-date NIR band |
intermediate_ndvi | Raster | None | None | Optional intermediate NDVI raster for temporal consistency |
profile | str | "balanced" | One of "aggressive", "balanced", "conservative" |
high_confidence_threshold | float | 0.85 | Threshold in [0, 1] used in summary metrics |
output_prefix | str | None | None | Prefix for generated outputs |
callback | callable | None | None | Progress/message event handler |
Examples
change_map, confidence, summary = wbe.remote_sensing_change_detection(
baseline_red=baseline_red,
baseline_nir=baseline_nir,
change_red=change_red,
change_nir=change_nir,
profile="balanced",
)
wbe.terrain_corrected_optical_analytics
wbe.terrain_corrected_optical_analytics(
input_dem,
safe_root=None,
input_red=None,
input_nir=None,
input_green=None,
input_blue=None,
solar_mode="auto",
solar_zenith_deg=40.0,
solar_azimuth_deg=165.0,
acquisition_datetime_utc=None,
latitude=None,
longitude=None,
profile="balanced",
cloud_threshold=None,
shadow_threshold=None,
qa_mask=None,
qa_mask_format="auto",
mask_strategy="auto",
z_factor=1.0,
output_prefix=None,
callback=None,
) -> tuple[Raster, Raster, Raster | None, Raster | None, Raster, Raster, Raster, str]
Runs topographic C-correction for optical imagery and returns corrected red/NIR/(optional green)/(optional blue), cloud-shadow mask, correction factor, quality confidence, and summary JSON path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_dem | Raster | required | Input DEM |
safe_root | str | None | None | Optional Sentinel-2 SAFE root; can auto-resolve B04/B08/B03/B02 and QA metadata |
input_red | Raster | None | None | Input red band (required unless safe_root resolves B04) |
input_nir | Raster | None | None | Input NIR band (required unless safe_root resolves B08) |
input_green | Raster | None | None | Optional green band |
input_blue | Raster | None | None | Optional blue band |
solar_mode | str | "auto" | One of "auto", "manual", "metadata", "datetime_location" |
solar_zenith_deg | float | 40.0 | Solar zenith angle in degrees |
solar_azimuth_deg | float | 165.0 | Solar azimuth in degrees |
acquisition_datetime_utc | str | None | None | RFC3339 UTC timestamp for datetime_location mode |
latitude | float | None | None | Optional latitude for datetime_location |
longitude | float | None | None | Optional longitude for datetime_location |
profile | str | "balanced" | One of "conservative", "balanced", "fast" |
cloud_threshold | float | None | None | Optional cloud threshold override in source units |
shadow_threshold | float | None | None | Optional shadow threshold override in source units |
qa_mask | Raster | None | None | Optional QA mask raster |
qa_mask_format | str | "auto" | One of "auto", "landsat_qa_pixel", "sentinel2_scl", "sentinel2_qa60", "binary" |
mask_strategy | str | "auto" | One of "auto", "qa_only", "heuristic_only", "qa_plus_heuristic" |
z_factor | float | 1.0 | Vertical exaggeration for slope/aspect derivation |
output_prefix | str | None | None | Prefix for generated outputs |
callback | callable | None | None | Progress/message event handler |
Examples
red_corr, nir_corr, green_corr, blue_corr, mask, correction_factor, quality, summary = wbe.terrain_corrected_optical_analytics(
input_dem=dem,
input_red=red_band,
input_nir=nir_band,
input_green=green_band,
input_blue=blue_band,
profile="balanced",
)
wbe.time_series_change_intelligence
wbe.time_series_change_intelligence(
input_stack,
qa_stack=None,
algorithm_mode="fast",
min_observations=24,
output_prefix=None,
callback=None,
) -> tuple[Raster, Raster, Raster, Raster, str]
Runs temporal trend and breakpoint workflow analysis on a stack-like raster input. Returns trend change, breakpoint count, breakpoint date, change confidence, and summary JSON path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_stack | Raster | required | Input temporal stack raster |
qa_stack | Raster | None | None | Optional QA stack used to screen low-quality observations |
algorithm_mode | str | "fast" | Algorithm mode (e.g. "fast", "iterative", "bfast") |
min_observations | int | 24 | Minimum per-pixel observations needed for model fitting |
output_prefix | str | None | None | Prefix for generated outputs |
callback | callable | None | None | Progress/message event handler |
Examples
trend, count, date, confidence, summary = wbe.time_series_change_intelligence(
input_stack=time_stack,
qa_stack=time_stack_qa,
algorithm_mode="bfast",
min_observations=24,
)
wbe.sar_coregistration
wbe.sar_coregistration(
reference_sar,
moving_sar,
coreg_mode="translation",
max_offset_px=24,
decimation=4,
min_overlap_fraction=0.20,
resample_method="bilinear",
output_prefix=None,
callback=None,
) -> tuple[Raster, Raster, Raster, str, str]
Runs SAR pair coregistration and returns the aligned moving raster, x/y offset rasters, transform JSON path, and summary JSON path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
reference_sar | Raster | required | Reference SAR raster |
moving_sar | Raster | required | Moving SAR raster to align onto the reference grid |
coreg_mode | str | "translation" | Coregistration mode: translation, affine, or local_offset_grid |
max_offset_px | int | 24 | Maximum absolute pixel offset searched during alignment |
decimation | int | 4 | Sampling stride used during global search |
min_overlap_fraction | float | 0.20 | Minimum valid sampled overlap fraction |
resample_method | str | "bilinear" | Output resampling mode: bilinear or nearest |
output_prefix | str | None | None | Prefix for generated outputs |
callback | callable | None | None | Progress/message event handler |
Examples
aligned, offset_x, offset_y, transform_json, summary = wbe.sar_coregistration(
reference_sar=reference,
moving_sar=moving,
coreg_mode="translation",
max_offset_px=24,
)
wbe.sar_interferogram_coherence
wbe.sar_interferogram_coherence(
reference_sar,
moving_sar,
auto_coregister_pair=False,
assume_prealigned_pair=False,
coreg_mode="translation",
coreg_max_offset_px=24,
coreg_decimation=4,
coreg_min_overlap_fraction=0.20,
performance_profile="balanced",
coherence_decimation=1,
coherence_window=7,
write_interferogram=True,
write_coherence=True,
write_valid_mask=True,
output_prefix=None,
callback=None,
) -> tuple[Raster | None, Raster | None, Raster | None, str]
Runs the dedicated SAR interferogram/coherence workflow and returns optional interferogram, coherence, and valid-mask rasters plus the summary JSON path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
reference_sar | Raster | required | Reference SAR raster |
moving_sar | Raster | required | Moving SAR raster |
auto_coregister_pair | bool | False | Invoke internal coregistration when the pair is not already aligned |
assume_prealigned_pair | bool | False | Assert that the pair is already aligned and skip auto-coregistration |
coreg_mode | str | "translation" | Coregistration handoff mode |
coreg_max_offset_px | int | 24 | Maximum absolute pixel offset searched during handoff |
coreg_decimation | int | 4 | Sampling stride used during handoff |
coreg_min_overlap_fraction | float | 0.20 | Minimum sampled overlap fraction required during handoff |
performance_profile | str | "balanced" | Runtime profile: balanced or fast |
coherence_decimation | int | 1 | Optional coherence sampling stride |
coherence_window | int | 7 | Odd-valued coherence window size |
write_interferogram | bool | True | Write interferogram raster output |
write_coherence | bool | True | Write coherence raster output |
write_valid_mask | bool | True | Write valid-mask raster output |
output_prefix | str | None | None | Prefix for generated outputs |
callback | callable | None | None | Progress/message event handler |
Examples
interferogram, coherence, valid_mask, summary = wbe.sar_interferogram_coherence(
reference_sar=reference,
moving_sar=moving,
assume_prealigned_pair=True,
coherence_window=7,
)
wbe.sar_analysis_readiness
wbe.sar_analysis_readiness(
input_sar,
input_dem,
pair_sar=None,
speckle_window=5,
z_factor=1.0,
output_prefix=None,
callback=None,
) -> tuple[Raster, Raster, Raster, Raster | None, str]
Runs SAR analysis-ready preprocessing and returns calibrated backscatter, speckle-filtered SAR, RTC factor, optional coherence-proxy raster, and summary JSON path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_sar | Raster | required | Input SAR raster |
input_dem | Raster | required | DEM used for terrain corrections |
pair_sar | Raster | None | None | Optional second SAR raster used for coherence-proxy output |
speckle_window | int | 5 | Speckle filtering window size |
z_factor | float | 1.0 | Vertical exaggeration factor for terrain terms |
output_prefix | str | None | None | Prefix for generated outputs |
callback | callable | None | None | Progress/message event handler |
Examples
calibrated, speckle, rtc, coherence_proxy, summary = wbe.sar_analysis_readiness(
input_sar=sar_a,
input_dem=dem,
pair_sar=sar_b,
speckle_window=5,
)
wbe.multi_sensor_fusion_monitoring
wbe.multi_sensor_fusion_monitoring(
baseline_bundle,
change_bundle,
input_sar,
input_dem,
baseline_red_band_index=0,
baseline_nir_band_index=1,
change_red_band_index=0,
change_nir_band_index=1,
pair_sar=None,
thermal_bundle=None,
thermal_band_index=0,
profile="balanced",
harmonization_mode="robust",
high_confidence_threshold=0.8,
max_zone_features=25000,
vector_output_format="gpkg",
output_prefix=None,
callback=None,
) -> tuple[Raster, Raster, Raster, Raster, Vector, str, str, str]
Runs multi-sensor disturbance fusion from optical change, SAR stability cues, and terrain context. Returns fused change probability, sensor agreement, terrain context, uncertainty inflation, high-confidence zones, thermal contract JSON path, modality diagnostics JSON path, and a summary JSON path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
baseline_bundle | Raster | required | Baseline-date multiband raster bundle |
change_bundle | Raster | required | Change-date multiband raster bundle |
input_sar | Raster | required | SAR raster for agreement/fusion cues |
input_dem | Raster | required | DEM used for terrain context |
baseline_red_band_index | int | 0 | Baseline red-band index |
baseline_nir_band_index | int | 1 | Baseline NIR-band index |
change_red_band_index | int | 0 | Change red-band index |
change_nir_band_index | int | 1 | Change NIR-band index |
pair_sar | Raster | None | None | Optional paired SAR raster for coherence-style cues |
thermal_bundle | Raster | None | None | Optional thermal raster used for three-modality fusion |
thermal_band_index | int | 0 | Thermal band index in thermal_bundle |
profile | str | "balanced" | One of "fast", "balanced", "conservative" |
harmonization_mode | str | "robust" | One of "off", "robust", "conservative" |
high_confidence_threshold | float | 0.8 | Threshold in [0, 1] used to derive high-confidence zones |
max_zone_features | int | 25000 | Maximum number of output zone features |
vector_output_format | str | "gpkg" | One of "gpkg", "geojson", "shp" |
output_prefix | str | None | None | Prefix for generated outputs |
callback | callable | None | None | Progress/message event handler |
Examples
fused, agreement, terrain, uncertainty, zones, thermal_contract, modality_diagnostics, summary = wbe.multi_sensor_fusion_monitoring(
baseline_bundle=baseline_bundle,
change_bundle=change_bundle,
input_sar=sar_a,
input_dem=dem,
baseline_red_band_index=0,
baseline_nir_band_index=1,
change_red_band_index=0,
change_nir_band_index=1,
pair_sar=sar_b,
thermal_bundle=thermal,
thermal_band_index=0,
profile="balanced",
harmonization_mode="robust",
vector_output_format="gpkg",
)
wbe.brdf_surface_reflectance_consistency
wbe.brdf_surface_reflectance_consistency(
input_red,
input_nir,
input_dem,
solar_zenith_deg,
solar_azimuth_deg,
input_green=None,
profile="balanced",
output_prefix=None,
callback=None,
) -> tuple[Raster, Raster, Raster, str]
Runs BRDF/illumination consistency normalization and returns normalized reflectance, normalization delta, consistency confidence, and a summary JSON path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_red | Raster | required | Input red band |
input_nir | Raster | required | Input NIR band |
input_dem | Raster | required | DEM used for terrain-aware normalization |
solar_zenith_deg | float | required | Solar zenith angle in degrees |
solar_azimuth_deg | float | required | Solar azimuth in degrees |
input_green | Raster | None | None | Optional green band |
profile | str | "balanced" | One of "fast", "balanced", "conservative" |
output_prefix | str | None | None | Prefix for generated outputs |
callback | callable | None | None | Progress/message event handler |
Examples
normalized, delta, confidence, summary = wbe.brdf_surface_reflectance_consistency(
input_red=red_band,
input_nir=nir_band,
input_dem=dem,
solar_zenith_deg=40.0,
solar_azimuth_deg=165.0,
input_green=green_band,
profile="balanced",
)
wbe.write_function_memory_insertion
wbe.write_function_memory_insertion(
input1,
input2,
input3=None,
output_path=None,
callback=None,
) -> Raster
Creates a packed RGB change-visualization composite from two or three single-band dates.
When input3 is omitted, the second-date raster is used for both green and blue channels,
producing the classic two-date red/cyan change visualization.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input1 | Raster | required | First-date single-band raster (red channel) |
input2 | Raster | required | Second-date single-band raster (green channel) |
input3 | Raster | None | None | Optional third-date single-band raster (blue channel); defaults to input2 |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
# Two-date mode (R=date1, G/B=date2)
wfmi2 = wbe.write_function_memory_insertion(date1, date2)
# Three-date mode (R=date1, G=date2, B=date3)
wfmi3 = wbe.write_function_memory_insertion(date1, date2, input3=date3)
wbe.closing
wbe.closing(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Performs a morphological closing using a rectangular structuring element.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
closed = wbe.closing(image)
closed5 = wbe.closing(image, filter_size_x=5, filter_size_y=5)
wbe.corner_detection
wbe.corner_detection(
input,
output_path=None,
callback=None,
) -> Raster
Identifies corner patterns in binary rasters using hit-and-miss templates. Foreground cells are values greater than zero; zero and nodata are treated as background.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input binary raster |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
corners = wbe.corner_detection(binary_image)
wbe.create_colour_composite
wbe.create_colour_composite(
red,
green,
blue,
opacity=None,
enhance=None,
treat_zeros_as_nodata=None,
output_path=None,
callback=None,
) -> Raster
Creates a packed RGB colour composite from red, green, blue, and optional opacity rasters.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
red | Raster | required | Red-band raster |
green | Raster | required | Green-band raster |
blue | Raster | required | Blue-band raster |
opacity | Raster | None | None | Optional opacity raster mapped into the alpha channel |
enhance | bool | None | True | Apply balance contrast enhancement after composing |
treat_zeros_as_nodata | bool | None | False | Treat zero values in RGB inputs as background/nodata |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
rgb = wbe.create_colour_composite(red_band, green_band, blue_band)
rgba = wbe.create_colour_composite(
red_band, green_band, blue_band, opacity=mask, enhance=False
)
wbe.anisotropic_diffusion_filter
wbe.anisotropic_diffusion_filter(
input,
iterations=None,
kappa=None,
lambda=None,
output_path=None,
callback=None,
) -> Raster
Perona-Malik anisotropic diffusion smoothing. This filter reduces noise while limiting diffusion across strong edges.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
iterations | int | None | 10 | Number of diffusion iterations |
kappa | float | None | 20.0 | Edge sensitivity (higher values smooth across larger gradients) |
lambda | float | None | 0.2 | Diffusion time-step in (0, 0.25] |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
ad = wbe.anisotropic_diffusion_filter(image)
ad_strong = wbe.anisotropic_diffusion_filter(image, iterations=20, kappa=15.0, lambda=0.2)
wbe.gamma_correction
wbe.gamma_correction(
input,
gamma=None,
output_path=None,
callback=None,
) -> Raster
Applies gamma intensity correction where output values are computed as
z_out = z_in^gamma.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
gamma | float | None | 0.5 | Gamma exponent in [0, 4] |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
gamma_light = wbe.gamma_correction(image, gamma=0.5)
gamma_dark = wbe.gamma_correction(image, gamma=2.0)
wbe.guided_filter
wbe.guided_filter(
input,
radius=None,
epsilon=None,
output_path=None,
callback=None,
) -> Raster
Edge-preserving guided filter using local linear models and box-filtered statistics.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
radius | int | None | 4 | Local window radius in pixels |
epsilon | float | None | 0.01 | Regularization term for local variance |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
gf = wbe.guided_filter(image)
gf_tight = wbe.guided_filter(image, radius=8, epsilon=0.001)
wbe.wiener_filter
wbe.wiener_filter(
input,
radius=None,
noise_variance=None,
output_path=None,
callback=None,
) -> Raster
Adaptive Wiener denoising filter based on local mean and variance statistics.
If noise_variance is omitted, the filter estimates it from the image's local
variance map.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
radius | int | None | 2 | Local window radius in pixels |
noise_variance | float | None | estimated | Optional additive noise variance |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
wiener = wbe.wiener_filter(image)
wiener_known_noise = wbe.wiener_filter(image, radius=3, noise_variance=4.0)
wbe.non_local_means_filter
wbe.non_local_means_filter(
input,
search_radius=None,
patch_radius=None,
h=None,
output_path=None,
callback=None,
) -> Raster
Non-local means denoiser that averages similar patches within a search window.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
search_radius | int | None | 5 | Search window radius in pixels |
patch_radius | int | None | 1 | Patch radius in pixels |
h | float | None | 10.0 | Filtering strength parameter |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
nlm = wbe.non_local_means_filter(image)
nlm_strong = wbe.non_local_means_filter(image, search_radius=7, patch_radius=1, h=15.0)
wbe.kuwahara_filter
wbe.kuwahara_filter(
input,
radius=None,
output_path=None,
callback=None,
) -> Raster
Edge-preserving Kuwahara filter that selects the lowest-variance quadrant mean for each pixel.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
radius | int | None | 2 | Quadrant radius in pixels |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
kuw = wbe.kuwahara_filter(image)
kuw_wide = wbe.kuwahara_filter(image, radius=3)
wbe.frost_filter
wbe.frost_filter(
input,
radius=None,
damping_factor=None,
output_path=None,
callback=None,
) -> Raster
Adaptive Frost speckle filter with exponential distance weighting controlled by local statistics.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
radius | int | None | 2 | Local window radius in pixels |
damping_factor | float | None | 2.0 | Exponential damping factor |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
frost = wbe.frost_filter(image)
frost_strong = wbe.frost_filter(image, radius=3, damping_factor=3.0)
wbe.gamma_map_filter
wbe.gamma_map_filter(
input,
radius=None,
enl=None,
output_path=None,
callback=None,
) -> Raster
Gamma-MAP speckle filter for radar imagery using local coefficient-of-variation regimes and ENL.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
radius | int | None | 2 | Local window radius in pixels |
enl | float | None | 1.0 | Equivalent number of looks |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
gmap = wbe.gamma_map_filter(image)
gmap_enl4 = wbe.gamma_map_filter(image, radius=3, enl=4.0)
wbe.kuan_filter
wbe.kuan_filter(
input,
radius=None,
enl=None,
output_path=None,
callback=None,
) -> Raster
Kuan speckle filter for radar imagery using an adaptive linear combination of the center pixel and local mean.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
radius | int | None | 2 | Local window radius in pixels |
enl | float | None | 1.0 | Equivalent number of looks |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
kuan = wbe.kuan_filter(image)
kuan_enl4 = wbe.kuan_filter(image, radius=3, enl=4.0)
wbe.gabor_filter_bank
wbe.gabor_filter_bank(
input,
sigma=None,
frequency=None,
orientations=None,
output_path=None,
callback=None,
) -> Raster
Multi-orientation Gabor filter bank. The output is the maximum response across all tested orientations.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
sigma | float | None | 2.0 | Gaussian envelope sigma in pixels |
frequency | float | None | 0.2 | Sinusoid spatial frequency in cycles/pixel |
orientations | int | None | 6 | Number of orientations in the filter bank |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
gabor = wbe.gabor_filter_bank(image)
gabor_dense = wbe.gabor_filter_bank(image, sigma=3.0, frequency=0.15, orientations=8)
wbe.frangi_filter
wbe.frangi_filter(
input,
scales=None,
beta=None,
c=None,
output_path=None,
callback=None,
) -> Raster
Multiscale Frangi vesselness enhancement filter for curvilinear feature emphasis.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
scales | list[float] | None | [1.0, 2.0, 3.0] | Scale list used in multiscale response |
beta | float | None | 0.5 | Blob suppression parameter |
c | float | None | 15.0 | Structure sensitivity parameter |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
frangi = wbe.frangi_filter(image)
frangi_multi = wbe.frangi_filter(image, scales=[1.0, 2.0, 4.0], beta=0.5, c=20.0)
wbe.savitzky_golay_2d_filter
wbe.savitzky_golay_2d_filter(
input,
window_size=None,
output_path=None,
callback=None,
) -> Raster
2D Savitzky-Golay smoothing filter. Current implementation supports
window_size=5 (quadratic smoothing kernel).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
window_size | int | None | 5 | Odd window size (currently fixed to 5) |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
sg = wbe.savitzky_golay_2d_filter(image)
sg5 = wbe.savitzky_golay_2d_filter(image, window_size=5)
wbe.fast_almost_gaussian_filter
wbe.fast_almost_gaussian_filter(
input,
sigma=None,
output_path=None,
callback=None,
) -> Raster
Fast approximation of Gaussian smoothing using repeated box filtering. This is
typically best for larger kernels (sigma >= 1.8).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
sigma | float | None | 1.8 | Target Gaussian sigma. Values below 1.8 are clamped to 1.8 |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
smoothed = wbe.fast_almost_gaussian_filter(image)
smoothed_big = wbe.fast_almost_gaussian_filter(image, sigma=5.0)
wbe.edge_preserving_mean_filter
wbe.edge_preserving_mean_filter(
input,
filter_size=None,
threshold=None,
output_path=None,
callback=None,
) -> Raster
Applies a thresholded local mean where only neighbors within threshold of the
center value are included in the average.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size | int | None | 11 | Odd square neighborhood size in pixels |
threshold | float | None | 15.0 | Max absolute neighbor difference allowed in local mean |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
epm = wbe.edge_preserving_mean_filter(image)
epm_tight = wbe.edge_preserving_mean_filter(image, filter_size=9, threshold=5.0)
wbe.unsharp_masking
wbe.unsharp_masking(
input,
sigma=None,
amount=None,
threshold=None,
output_path=None,
callback=None,
) -> Raster
Sharpens edges by subtracting a Gaussian blur from the source and adding a scaled residual back to the image.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
sigma | float | None | 0.75 | Gaussian sigma for blur mask (0.5–20.0) |
amount | float | None | 100.0 | Residual multiplier for sharpening strength |
threshold | float | None | 0.0 | Minimum absolute residual needed to sharpen |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
sharp = wbe.unsharp_masking(image)
sharp_strong = wbe.unsharp_masking(image, sigma=1.5, amount=150.0, threshold=0.01)
wbe.diff_of_gaussians_filter
wbe.diff_of_gaussians_filter(
input,
sigma1=None,
sigma2=None,
output_path=None,
callback=None,
) -> Raster
Difference-of-Gaussians (DoG) band-pass filter computed as blur(sigma1) -
blur(sigma2).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
sigma1 | float | None | 2.0 | Smaller Gaussian sigma (0.25–20.0) |
sigma2 | float | None | 4.0 | Larger Gaussian sigma (0.5–20.0). If reversed, values are swapped internally |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
dog = wbe.diff_of_gaussians_filter(image)
dog_custom = wbe.diff_of_gaussians_filter(image, sigma1=1.5, sigma2=3.0)
wbe.adaptive_filter
wbe.adaptive_filter(
input,
filter_size_x=None,
filter_size_y=None,
threshold=None,
output_path=None,
callback=None,
) -> Raster
Adaptive smoothing that replaces only center cells whose local z-score exceeds
threshold relative to neighborhood mean and variance.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
threshold | float | None | 2.0 | Absolute z-score threshold for replacement |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
adaptive = wbe.adaptive_filter(image)
adaptive_tight = wbe.adaptive_filter(image, filter_size_x=9, filter_size_y=9, threshold=1.5)
wbe.lee_filter
wbe.lee_filter(
input,
filter_size_x=None,
filter_size_y=None,
sigma=None,
m_value=None,
output_path=None,
callback=None,
) -> Raster
Lee sigma filter that averages in-range neighbors (z ± sigma) and falls back
to immediate-neighbor averaging when in-range support is low.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
sigma | float | None | 10.0 | Intensity inclusion half-width around center value |
m_value | float | None | 5.0 | Minimum in-range sample count before fallback |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
lee = wbe.lee_filter(image)
lee_custom = wbe.lee_filter(image, filter_size_x=9, filter_size_y=9, sigma=6.0, m_value=4.0)
wbe.conservative_smoothing_filter
wbe.conservative_smoothing_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Conservative smoother that clips spike values to neighborhood extrema while preserving most non-outlier cells.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 3 | Odd neighborhood width |
filter_size_y | int | None | 3 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
cs = wbe.conservative_smoothing_filter(image)
cs_wide = wbe.conservative_smoothing_filter(image, filter_size_x=5, filter_size_y=5)
wbe.olympic_filter
wbe.olympic_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Mean-like smoother that drops the minimum and maximum values in each neighborhood before averaging.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
olympic = wbe.olympic_filter(image)
olympic_small = wbe.olympic_filter(image, filter_size_x=5, filter_size_y=5)
wbe.k_nearest_mean_filter
wbe.k_nearest_mean_filter(
input,
filter_size_x=None,
filter_size_y=None,
k=None,
output_path=None,
callback=None,
) -> Raster
Edge-preserving smoother that averages only the k local neighbors most
similar to the center value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 3 | Odd neighborhood width |
filter_size_y | int | None | 3 | Odd neighborhood height |
k | int | None | 5 | Number of nearest neighbors to include in mean |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
knn_mean = wbe.k_nearest_mean_filter(image)
knn_mean_custom = wbe.k_nearest_mean_filter(image, filter_size_x=5, filter_size_y=5, k=8)
wbe.high_pass_median_filter
wbe.high_pass_median_filter(
input,
filter_size_x=None,
filter_size_y=None,
sig_digits=None,
output_path=None,
callback=None,
) -> Raster
High-pass median filter that outputs center value minus local median using
quantized histogram bins controlled by sig_digits.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
sig_digits | int | None | 2 | Significant digits used for quantization bins |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
hpm = wbe.high_pass_median_filter(image)
hpm_precise = wbe.high_pass_median_filter(image, filter_size_x=7, filter_size_y=7, sig_digits=3)
wbe.laplacian_of_gaussians_filter
wbe.laplacian_of_gaussians_filter(
input,
sigma=None,
output_path=None,
callback=None,
) -> Raster
Laplacian-of-Gaussians (LoG) edge-enhancement filter using a sigma-derived kernel footprint.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
sigma | float | None | 0.75 | Gaussian sigma used by LoG kernel (0.5–20.0) |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
log_img = wbe.laplacian_of_gaussians_filter(image)
log_wide = wbe.laplacian_of_gaussians_filter(image, sigma=2.0)
wbe.diversity_filter
wbe.diversity_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Moving-window diversity filter (count of unique values in each neighborhood).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
div = wbe.diversity_filter(image)
div5 = wbe.diversity_filter(image, filter_size_x=5, filter_size_y=5)
wbe.emboss_filter
wbe.emboss_filter(
input,
direction=None,
clip_amount=None,
output_path=None,
callback=None,
) -> Raster
Directional emboss convolution filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
direction | str | None | "n" | Emboss direction: n, s, e, w, ne, nw, se, sw |
clip_amount | float | None | 0.0 | Optional symmetric tail clipping percent (0-40) |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
emb = wbe.emboss_filter(image)
emb_ne = wbe.emboss_filter(image, direction='ne', clip_amount=1.0)
wbe.high_pass_filter
wbe.high_pass_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
High-pass filter using neighborhood mean subtraction.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
hp = wbe.high_pass_filter(image)
hp7 = wbe.high_pass_filter(image, filter_size_x=7, filter_size_y=7)
wbe.high_pass_bilateral_filter
wbe.high_pass_bilateral_filter(
input,
sigma_dist=None,
sigma_int=None,
treat_as_rgb=None,
assume_three_band_rgb=None,
output_path=None,
callback=None,
) -> Raster
Computes a high-pass residual by subtracting bilateral smoothing from the input raster. This emphasizes local texture while reducing dominance of strong edges.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
sigma_dist | float | None | 0.75 | Spatial Gaussian standard deviation in pixels (0.5–20.0) |
sigma_int | float | None | 1.0 | Intensity Gaussian standard deviation in raster-value units |
treat_as_rgb | bool | None | False | Force packed RGB HSI-intensity processing |
assume_three_band_rgb | bool | None | True | Enable 3-band RGB heuristic when metadata is absent |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
hpb = wbe.high_pass_bilateral_filter(image)
hpb_tex = wbe.high_pass_bilateral_filter(image, sigma_dist=2.5, sigma_int=4.0)
wbe.laplacian_filter
wbe.laplacian_filter(
input,
variant=None,
clip_amount=None,
output_path=None,
callback=None,
) -> Raster
Laplacian edge/sharpen filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
variant | str | None | "3x3(1)" | Kernel variant: 3x3(1), 3x3(2), 3x3(3), 3x3(4), 5x5(1), 5x5(2) |
clip_amount | float | None | 0.0 | Optional symmetric tail clipping percent (0-40) |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
lap = wbe.laplacian_filter(image)
lap5 = wbe.laplacian_filter(image, variant='5x5(1)', clip_amount=1.0)
wbe.line_detection_filter
wbe.line_detection_filter(
input,
variant=None,
abs_values=None,
clip_tails=None,
output_path=None,
callback=None,
) -> Raster
Directional line-detection convolution filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
variant | str | None | "v" | Line direction variant: v, h, 45, 135 |
abs_values | bool | None | False | If True, return absolute response |
clip_tails | float | None | 0.0 | Optional symmetric tail clipping percent (0-40) |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
line_v = wbe.line_detection_filter(image)
line_45 = wbe.line_detection_filter(image, variant='45', abs_values=True)
wbe.line_thinning
wbe.line_thinning(
input,
output_path=None,
callback=None,
) -> Raster
Performs iterative skeletonization, reducing connected binary features to one-cell-wide lines.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster; positive values are treated as foreground |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
skeleton = wbe.line_thinning(binary_image)
wbe.generalize_classified_raster
wbe.generalize_classified_raster(
input,
area_threshold=5,
method="longest",
output_path=None,
callback=None,
) -> Raster
Generalizes a classified raster by reassigning small patches to neighboring classes.
Use method="longest", "largest", or "nearest" depending on the desired merge behavior.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input classified raster |
area_threshold | int | 5 | Minimum feature size (cells); smaller patches are reassigned |
method | str | "longest" | Merge strategy: longest, largest, or nearest |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
generalized = wbe.generalize_classified_raster(
classes,
area_threshold=15,
method="largest",
)
wbe.majority_filter
wbe.majority_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Moving-window majority (mode) filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
maj = wbe.majority_filter(image)
maj3 = wbe.majority_filter(image, filter_size_x=3, filter_size_y=3)
wbe.maximum_filter
wbe.maximum_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Moving-window maximum filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
mx = wbe.maximum_filter(image)
mx7 = wbe.maximum_filter(image, filter_size_x=7, filter_size_y=7)
wbe.mean_filter
wbe.mean_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Moving-window mean filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
mn = wbe.mean_filter(image)
mn9 = wbe.mean_filter(image, filter_size_x=9, filter_size_y=9)
wbe.median_filter
wbe.median_filter(
input,
filter_size_x=None,
filter_size_y=None,
sig_digits=None,
output_path=None,
callback=None,
) -> Raster
Moving-window median filter using quantization bins controlled by sig_digits.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
sig_digits | int | None | 2 | Significant digits used for quantized rank filtering |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
med = wbe.median_filter(image)
med_precise = wbe.median_filter(image, filter_size_x=7, filter_size_y=7, sig_digits=3)
wbe.minimum_filter
wbe.minimum_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Moving-window minimum filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
mn = wbe.minimum_filter(image)
mn5 = wbe.minimum_filter(image, filter_size_x=5, filter_size_y=5)
wbe.percentile_filter
wbe.percentile_filter(
input,
filter_size_x=None,
filter_size_y=None,
sig_digits=None,
output_path=None,
callback=None,
) -> Raster
Moving-window percentile-rank filter using quantization bins controlled by sig_digits.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
sig_digits | int | None | 2 | Significant digits used for quantized rank filtering |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
pct = wbe.percentile_filter(image)
pct_precise = wbe.percentile_filter(image, filter_size_x=7, filter_size_y=7, sig_digits=3)
wbe.prewitt_filter
wbe.prewitt_filter(
input,
clip_tails=None,
output_path=None,
callback=None,
) -> Raster
Prewitt edge-detection filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
clip_tails | float | None | 0.0 | Optional symmetric tail clipping percent (0-40) |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
prew = wbe.prewitt_filter(image)
prew_clip = wbe.prewitt_filter(image, clip_tails=1.0)
wbe.range_filter
wbe.range_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Moving-window range filter (max - min).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
rng = wbe.range_filter(image)
rng7 = wbe.range_filter(image, filter_size_x=7, filter_size_y=7)
wbe.remove_spurs
wbe.remove_spurs(
input,
max_iterations=None,
output_path=None,
callback=None,
) -> Raster
Removes small spur branches from binary raster features using iterative pruning templates.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster; positive values are treated as foreground |
max_iterations | int | None | 10 | Maximum number of pruning iterations |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
pruned = wbe.remove_spurs(binary_image)
pruned_strict = wbe.remove_spurs(binary_image, max_iterations=20)
wbe.roberts_cross_filter
wbe.roberts_cross_filter(
input,
clip_amount=None,
output_path=None,
callback=None,
) -> Raster
Roberts Cross edge-detection filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
clip_amount | float | None | 0.0 | Optional symmetric tail clipping percent (0-40) |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
rob = wbe.roberts_cross_filter(image)
rob_clip = wbe.roberts_cross_filter(image, clip_amount=1.0)
wbe.scharr_filter
wbe.scharr_filter(
input,
clip_tails=None,
output_path=None,
callback=None,
) -> Raster
Scharr edge-detection filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
clip_tails | float | None | 0.0 | Optional symmetric tail clipping percent (0-40) |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
sch = wbe.scharr_filter(image)
sch_clip = wbe.scharr_filter(image, clip_tails=1.0)
wbe.sobel_filter
wbe.sobel_filter(
input,
variant=None,
clip_tails=None,
output_path=None,
callback=None,
) -> Raster
Sobel edge-detection filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
variant | str | None | "3x3" | Kernel size variant: 3x3 or 5x5 |
clip_tails | float | None | 0.0 | Optional symmetric tail clipping percent (0-40) |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
sob = wbe.sobel_filter(image)
sob5 = wbe.sobel_filter(image, variant='5x5', clip_tails=1.0)
wbe.standard_deviation_filter
wbe.standard_deviation_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Moving-window standard deviation filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
std = wbe.standard_deviation_filter(image)
std5 = wbe.standard_deviation_filter(image, filter_size_x=5, filter_size_y=5)
wbe.total_filter
wbe.total_filter(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Moving-window total (sum) filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
tot = wbe.total_filter(image)
tot9 = wbe.total_filter(image, filter_size_x=9, filter_size_y=9)
wbe.user_defined_weights_filter
wbe.user_defined_weights_filter(
input,
weights,
kernel_center=None,
normalize_weights=None,
output_path=None,
callback=None,
) -> Raster
Applies a user-defined convolution kernel.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
weights | list[list[float]] | required | 2D convolution kernel with equal row lengths |
kernel_center | str | None | "center" | Kernel center policy (center by default) |
normalize_weights | bool | None | False | If True, normalize kernel sum before convolution |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
sharpen = wbe.user_defined_weights_filter(
image,
weights=[[0, -1, 0], [-1, 5, -1], [0, -1, 0]],
)
wbe.flip_image
wbe.flip_image(
input,
direction=None,
output_path=None,
callback=None,
) -> Raster
Flips an image vertically, horizontally, or both.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
direction | str | None | "vertical" | Flip direction: vertical, horizontal, or both |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
flip_v = wbe.flip_image(image)
flip_h = wbe.flip_image(image, direction='horizontal')
flip_b = wbe.flip_image(image, direction='both')
wbe.direct_decorrelation_stretch
wbe.direct_decorrelation_stretch(
input,
achromatic_factor=None,
clip_percent=None,
output_path=None,
callback=None,
) -> Raster
Improves packed RGB image saturation by reducing the achromatic component and linearly stretching the result.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input packed RGB raster |
achromatic_factor | float | None | 0.5 | Grey-component reduction factor from 0 to 1 |
clip_percent | float | None | 1.0 | Percent tail clipping used in the final linear stretch |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
dds = wbe.direct_decorrelation_stretch(rgb_image)
dds_strong = wbe.direct_decorrelation_stretch(rgb_image, achromatic_factor=0.7, clip_percent=2.0)
wbe.image_slider
wbe.image_slider(
left_raster,
right_raster,
output_html_file=None,
left_label="",
right_label="",
image_height=600,
callback=None,
) -> str
Creates an interactive HTML swipe/slider view for two input rasters. The tool also writes PNG previews beside the HTML output.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
left_raster | Raster | required | Left image input |
right_raster | Raster | required | Right image input |
output_html_file | str | None | None | HTML output path; defaults to image_slider.html in the working directory |
left_label | str | "" | Optional left-side label |
right_label | str | "" | Optional right-side label |
image_height | int | 600 | Slider height in pixels (minimum 50) |
callback | callable | None | None | Progress/message event handler |
Examples
html = wbe.image_slider(
left_raster=before,
right_raster=after,
left_label="Before",
right_label="After",
image_height=640,
output_html_file="change_slider.html",
)
wbe.integral_image_transform
wbe.integral_image_transform(
input,
output_path=None,
callback=None,
) -> Raster
Computes the summed-area table (integral image) transform for each raster band.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
ii = wbe.integral_image_transform(image)
wbe.opening
wbe.opening(
input,
filter_size_x=None,
filter_size_y=None,
output_path=None,
callback=None,
) -> Raster
Performs a morphological opening using a rectangular structuring element.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
opened = wbe.opening(image)
opened7 = wbe.opening(image, filter_size_x=7, filter_size_y=7)
wbe.otsu_thresholding
wbe.otsu_thresholding(
input,
output_path=None,
callback=None,
) -> Raster
Applies Otsu's automatic thresholding to produce a binary raster with values of 0 and 1.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
binary = wbe.otsu_thresholding(image)
wbe.normalized_difference_index
wbe.normalized_difference_index(
input,
band1=None,
band2=None,
output_path=None,
callback=None,
) -> Raster
Computes a normalized difference index: (band1 - band2) / (band1 + band2).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input multiband raster |
band1 | int | None | 1 | One-based index of first band |
band2 | int | None | 2 | One-based index of second band |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
ndi = wbe.normalized_difference_index(multiband)
ndvi_like = wbe.normalized_difference_index(multiband, band1=5, band2=4)
wbe.histogram_equalization
wbe.histogram_equalization(
input,
num_tones=None,
output_path=None,
callback=None,
) -> Raster
Applies histogram equalization to improve image contrast.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
num_tones | int | None | 256 | Number of output tones |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
eq = wbe.histogram_equalization(input=image)
eq1024 = wbe.histogram_equalization(input=image, num_tones=1024)
wbe.histogram_matching
wbe.histogram_matching(
input,
histogram,
is_cumulative=None,
output_path=None,
callback=None,
) -> Raster
Matches an image histogram to a user-supplied reference histogram.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
histogram | list[list[float]] | list[dict] | required | Reference histogram as [[value, frequency], ...] or [{"x": value, "y": frequency}, ...] |
is_cumulative | bool | None | False | Set True if histogram frequencies are already cumulative |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
ref = [[0.0, 0.05], [64.0, 0.25], [128.0, 0.75], [255.0, 1.0]]
matched = wbe.histogram_matching(image, histogram=ref, is_cumulative=True)
wbe.histogram_matching_two_images
wbe.histogram_matching_two_images(
input,
reference,
output_path=None,
callback=None,
) -> Raster
Matches an input image histogram to the histogram of a reference image.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
reference | Raster | required | Reference raster whose distribution is used as the target |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
matched = wbe.histogram_matching_two_images(input=source_image, reference=reference_image)
wbe.gaussian_contrast_stretch
wbe.gaussian_contrast_stretch(
input,
num_tones=None,
output_path=None,
callback=None,
) -> Raster
Performs Gaussian contrast stretching by matching to a Gaussian reference histogram.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
num_tones | int | None | 256 | Number of output tones |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
gcs = wbe.gaussian_contrast_stretch(image)
gcs1024 = wbe.gaussian_contrast_stretch(image, num_tones=1024)
wbe.min_max_contrast_stretch
wbe.min_max_contrast_stretch(
input,
min_val,
max_val,
num_tones=None,
output_path=None,
callback=None,
) -> Raster
Linearly stretches values between user-provided minimum and maximum limits.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
min_val | float | required | Lower bound for scaling |
max_val | float | required | Upper bound for scaling |
num_tones | int | None | 256 | Number of output tones |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
stretch = wbe.min_max_contrast_stretch(image, min_val=50.0, max_val=1500.0)
wbe.mosaic
wbe.mosaic(
inputs,
method=None,
output_path=None,
callback=None,
) -> Raster
Mosaics two or more rasters into a new output image spanning the combined extent of all input rasters.
Cells with overlap are resolved by input order, with later rasters in inputs
taking precedence over earlier rasters.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
inputs | list[Raster] | required | Input rasters to mosaic (minimum 2) |
method | str | None | "nn" | Resampling method: "nn", "bilinear", or "cc" |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
mosaic = wbe.mosaic([tile1, tile2, tile3])
mosaic_smooth = wbe.mosaic([tile1, tile2], method="cc", output_path="mosaic.tif")
wbe.mosaic_with_feathering
wbe.mosaic_with_feathering(
input1,
input2,
method=None,
weight=None,
output_path=None,
callback=None,
) -> Raster
Mosaics two rasters and feather-blends overlap zones to reduce seam artifacts.
In overlapping areas, each raster contributes according to distance-to-edge weights, so cells further from source-image edges receive larger influence.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input1 | Raster | required | First input raster |
input2 | Raster | required | Second input raster |
method | str | None | "cc" | Resampling method: "nn", "bilinear", or "cc" |
weight | float | None | 4.0 | Distance-weight exponent used in overlap blending |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
feathered = wbe.mosaic_with_feathering(image1, image2)
feathered_soft = wbe.mosaic_with_feathering(
image1,
image2,
method="bilinear",
weight=2.0,
output_path="mosaic_feathered.tif",
)
wbe.k_means_clustering
wbe.k_means_clustering(
inputs,
classes,
max_iterations=None,
class_change=None,
initialize=None,
min_class_size=None,
out_html=None,
output_path=None,
callback=None,
) -> Raster
Performs k-means clustering on two or more input rasters (typically a multispectral stack) and returns a categorical class raster.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
inputs | list[Raster] | required | Input rasters (minimum 2) |
classes | int | required | Number of target classes |
max_iterations | int | None | 10 | Maximum iteration count (2-250) |
class_change | float | None | 2.0 | Percent changed-cell stop threshold (0-25) |
initialize | str | None | "diagonal" | Initial centroid mode: "diagonal" or "random" |
min_class_size | int | None | 10 | Minimum class size used when updating centroids |
out_html | str | None | None | Optional output HTML report path |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
classes = wbe.k_means_clustering(
inputs=[b1, b2, b3],
classes=10,
initialize="random",
out_html="kmeans_report.html",
)
wbe.modified_k_means_clustering
wbe.modified_k_means_clustering(
inputs,
merge_dist,
start_clusters=None,
max_iterations=None,
class_change=None,
out_html=None,
output_path=None,
callback=None,
) -> Raster
Runs a modified k-means workflow that begins with an overestimated cluster count and merges nearby centroids during iteration.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
inputs | list[Raster] | required | Input rasters (minimum 2) |
merge_dist | float | required | Euclidean centroid merge threshold |
start_clusters | int | None | 1000 | Initial cluster count before merging |
max_iterations | int | None | 10 | Maximum iteration count (2-250) |
class_change | float | None | 2.0 | Percent changed-cell stop threshold (0-25) |
out_html | str | None | None | Optional output HTML report path |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
mod_classes = wbe.modified_k_means_clustering(
inputs=[b1, b2, b3],
start_clusters=80,
merge_dist=25.0,
out_html="modified_kmeans_report.html",
)
wbe.correct_vignetting
wbe.correct_vignetting(
input,
pp,
focal_length=None,
image_width=None,
n=None,
output_path=None,
callback=None,
) -> Raster
Corrects lens vignetting (darkening toward image edges) relative to a principal point using a cosine falloff model.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster image |
pp | Vector | str | dict | required | Point vector layer (path or typed vector object) containing the principal point |
focal_length | float | None | 304.8 | Camera focal length in mm |
image_width | float | None | 228.6 | Distance between left-right image edges in mm |
n | float | None | 4.0 | Vignetting model exponent |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
corrected = wbe.correct_vignetting(
input=image,
pp="principal_point.geojson",
focal_length=304.8,
image_width=228.6,
n=4.0,
)
wbe.image_stack_profile
wbe.image_stack_profile(
inputs,
points,
output_html=None,
callback=None,
) -> dict
Extracts point signatures across an ordered stack of rasters and returns the profile values as structured output. An optional HTML report can also be generated.
points should reference a vector point layer. Each point geometry is mapped
to pixel row/column locations using the first raster in inputs.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
inputs | list[Raster] | required | Input raster stack (minimum 2) |
points | Vector | str | dict | required | Point vector layer (path or typed vector object) with sample locations |
output_html | str | None | None | Optional HTML report output path |
callback | callable | None | None | Progress/message event handler |
Examples
profiles = wbe.image_stack_profile(
inputs=[image1, image2, image3],
points="sample_points.geojson",
output_html="stack_profile.html",
)
wbe.panchromatic_sharpening
wbe.panchromatic_sharpening(
red=None,
green=None,
blue=None,
composite=None,
pan,
method=None,
output_mode=None,
output_path=None,
callback=None,
) -> Raster
Fuses multispectral and panchromatic rasters using either Brovey or IHS pan-sharpening.
Provide either separate red/green/blue rasters or a packed RGB composite raster.
output_mode controls output encoding:
packed(default): single-band packed RGB rasterbands: 3-band raster with explicit R, G, B channels
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
red | Raster | None | None | Red-band raster (mutually exclusive with composite) |
green | Raster | None | None | Green-band raster (mutually exclusive with composite) |
blue | Raster | None | None | Blue-band raster (mutually exclusive with composite) |
composite | Raster | None | None | Packed RGB multispectral raster (mutually exclusive with red/green/blue) |
pan | Raster | required | Panchromatic raster |
method | str | None | "brovey" | Fusion method: "brovey" or "ihs" |
output_mode | str | None | "packed" | Output encoding: "packed" or "bands" |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
# Default packed RGB output
ps = wbe.panchromatic_sharpening(
red=red_band, green=green_band, blue=blue_band, pan=pan_band
)
# 3-band RGB output mode
ps_bands = wbe.panchromatic_sharpening(
composite=rgb_composite,
pan=pan_band,
method="ihs",
output_mode="bands",
)
wbe.resample
wbe.resample(
inputs,
cell_size=None,
base=None,
method=None,
output_path=None,
callback=None,
) -> Raster
Resamples one or more source rasters into a destination grid defined by either
an explicit cell_size or a base raster.
If both cell_size and base are provided, base determines the output extent
and resolution. Cells with overlap are resolved by input order, with later
rasters in inputs taking precedence.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
inputs | list[Raster] | required | Input rasters to resample (minimum 1) |
cell_size | float | None | None | Output cell size when base is not provided |
base | Raster | None | None | Base raster defining output extent/grid (takes precedence over cell_size) |
method | str | None | "cc" | Resampling method: "nn", "bilinear", or "cc" |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
# Resample to a new cell size over combined input extent
resampled = wbe.resample([image1, image2], cell_size=10.0)
# Resample into an existing grid definition
resampled_to_base = wbe.resample([image1], base=target_grid, method="bilinear")
wbe.piecewise_contrast_stretch
wbe.piecewise_contrast_stretch(
input,
transformation_statement,
num_greytones=1024,
output_path=None,
callback=None,
) -> Raster
Applies a piecewise linear contrast transfer function to raster brightness values. For packed RGB rasters, mapping is applied to HSI intensity and colour is preserved.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
transformation_statement | str | required | Breakpoint statement like "(50,0.1);(120,0.6);(180,0.85)" |
num_greytones | int | 1024 | Number of output tones for non-RGB output (minimum 32) |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
stretched = wbe.piecewise_contrast_stretch(
image,
transformation_statement="(80,0.2);(140,0.7);(200,0.92)",
num_greytones=512,
)
wbe.percentage_contrast_stretch
wbe.percentage_contrast_stretch(
input,
clip=None,
tail=None,
num_tones=None,
output_path=None,
callback=None,
) -> Raster
Performs linear contrast stretching with percentile clipping.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
clip | float | None | 1.0 | Percentile clip amount (0-50) |
tail | str | None | "both" | Tail clipping mode: both, upper, or lower |
num_tones | int | None | 256 | Number of output tones |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
stretched = wbe.percentage_contrast_stretch(image)
stretched_custom = wbe.percentage_contrast_stretch(image, clip=2.0, tail='upper', num_tones=512)
wbe.sigmoidal_contrast_stretch
wbe.sigmoidal_contrast_stretch(
input,
cutoff=None,
gain=None,
num_tones=None,
output_path=None,
callback=None,
) -> Raster
Performs a sigmoidal contrast stretch controlled by midpoint (cutoff) and slope (gain).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
cutoff | float | None | 0.0 | Normalized sigmoid midpoint (clamped to 0.0-0.95) |
gain | float | None | 1.0 | Sigmoid gain/slope parameter |
num_tones | int | None | 256 | Number of output tones |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
sig = wbe.sigmoidal_contrast_stretch(image)
sig_strong = wbe.sigmoidal_contrast_stretch(image, cutoff=0.5, gain=10.0, num_tones=512)
wbe.standard_deviation_contrast_stretch
wbe.standard_deviation_contrast_stretch(
input,
clip=None,
num_tones=None,
output_path=None,
callback=None,
) -> Raster
Performs a linear contrast stretch using clip bounds derived from the mean and standard deviation of the image.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
clip | float | None | 2.0 | Standard deviation multiplier used to define lower and upper clip bounds |
num_tones | int | None | 256 | Number of output tones |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
sds = wbe.standard_deviation_contrast_stretch(image)
sds3 = wbe.standard_deviation_contrast_stretch(image, clip=3.0, num_tones=512)
wbe.ihs_to_rgb
wbe.ihs_to_rgb(
intensity,
hue,
saturation,
red_output=None,
green_output=None,
blue_output=None,
callback=None,
) -> dict[str, Raster]
Converts intensity, hue, and saturation band rasters back to red, green, and blue channels (0–255).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
intensity | Raster | required | Intensity band raster (values in 0–1) |
hue | Raster | required | Hue band raster (radians, 0–2π) |
saturation | Raster | required | Saturation band raster (values in 0–1) |
red_output | str | None | None | Output file path for the red band; omit to keep in memory |
green_output | str | None | None | Output file path for the green band; omit to keep in memory |
blue_output | str | None | None | Output file path for the blue band; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Returns
A dict with keys "red", "green", "blue" each holding a single-band Raster with values in 0–255.
Examples
bands = wbe.ihs_to_rgb(intensity, hue, saturation)
red, green, blue = bands["red"], bands["green"], bands["blue"]
wbe.rgb_to_ihs
wbe.rgb_to_ihs(
red=None,
green=None,
blue=None,
composite=None,
intensity_output=None,
hue_output=None,
saturation_output=None,
callback=None,
) -> dict[str, Raster]
Transforms red, green, blue rasters (or a packed RGB composite) to intensity, hue, and saturation components using the HSI colour model.
Pass either three separate red/green/blue single-band rasters (each normalised to 0–1 per-band before conversion) or a single packed composite raster.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
red | Raster | None | None | Red-band raster (mutually exclusive with composite) |
green | Raster | None | None | Green-band raster (mutually exclusive with composite) |
blue | Raster | None | None | Blue-band raster (mutually exclusive with composite) |
composite | Raster | None | None | Packed RGB composite raster (mutually exclusive with red/green/blue) |
intensity_output | str | None | None | Output file path for the intensity band |
hue_output | str | None | None | Output file path for the hue band |
saturation_output | str | None | None | Output file path for the saturation band |
callback | callable | None | None | Progress/message event handler |
Returns
A dict with keys "intensity", "hue", "saturation" each holding a single-band Raster.
Examples
# From separate bands
ihs = wbe.rgb_to_ihs(red=red_band, green=green_band, blue=blue_band)
# From a packed composite
ihs = wbe.rgb_to_ihs(composite=rgb_image)
intensity = ihs["intensity"]
wbe.split_colour_composite
wbe.split_colour_composite(
input,
red_output=None,
green_output=None,
blue_output=None,
callback=None,
) -> dict[str, Raster]
Splits a packed RGB colour composite into separate red, green, and blue single-band rasters.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input packed RGB raster |
red_output | str | None | None | Output file path for the red band; omit to keep in memory |
green_output | str | None | None | Output file path for the green band; omit to keep in memory |
blue_output | str | None | None | Output file path for the blue band; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Returns
A dict with keys "red", "green", "blue" each holding a single-band Raster with values in 0–255.
Examples
bands = wbe.split_colour_composite(rgb_image)
red = bands["red"]
green = bands["green"]
blue = bands["blue"]
wbe.thicken_raster_line
wbe.thicken_raster_line(
input,
output_path=None,
callback=None,
) -> Raster
Thickens diagonal single-cell raster line segments to prevent crossing between diagonal foreground cells.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster; positive values are treated as line foreground |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
thickened = wbe.thicken_raster_line(lines)
wbe.tophat_transform
wbe.tophat_transform(
input,
filter_size_x=None,
filter_size_y=None,
variant=None,
output_path=None,
callback=None,
) -> Raster
Performs either a white or black morphological top-hat transform.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size_x | int | None | 11 | Odd neighborhood width |
filter_size_y | int | None | 11 | Odd neighborhood height |
variant | str | None | "white" | Transform variant: white or black |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
white_hat = wbe.tophat_transform(image)
black_hat = wbe.tophat_transform(image, filter_size_x=9, filter_size_y=9, variant='black')
wbe.canny_edge_detection
wbe.canny_edge_detection(
input,
sigma=0.5,
low_threshold=0.05,
high_threshold=0.15,
add_back=False,
output_path=None,
callback=None,
) -> Raster
Applies Canny edge detection to a single-band or packed-RGB raster. The algorithm proceeds through four stages: Gaussian smoothing, Sobel gradient computation, non-maximum suppression, and double-threshold hysteresis.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster (single-band or packed RGB) |
sigma | float | 0.5 | Standard deviation (in pixels) of the Gaussian smoothing kernel (clamped to 0.15–20) |
low_threshold | float | 0.05 | Low hysteresis threshold as a fraction (0–1) of the high threshold |
high_threshold | float | 0.15 | High hysteresis threshold as a fraction (0–1) of the peak gradient magnitude |
add_back | bool | False | If True, edge pixels are zeroed in the original image instead of producing a binary edge map |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
edges = wbe.canny_edge_detection(image)
edges = wbe.canny_edge_detection(image, sigma=1.0, low_threshold=0.05, high_threshold=0.15, output_path='edges.tif')
wbe.min_dist_classification
wbe.min_dist_classification(
input_rasters,
training_data,
class_field_name,
dist_threshold=None,
output_path=None,
callback=None,
) -> Raster
Performs a supervised minimum-distance classification
on a stack of single-band rasters using polygon training data. Each unknown pixel is
assigned to the class whose mean spectral vector is closest in Euclidean distance.
An optional z-score threshold (dist_threshold) can be used to leave uncertain pixels unclassified.
Output pixel values are 1-based class integers; unclassified pixels carry the nodata value (−32768).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per spectral band |
training_data | Vector | required | Polygon vector containing labelled training areas |
class_field_name | str | required | Attribute field name identifying each polygon's class |
dist_threshold | float | None | None | Z-score threshold; pixels whose Euclidean distance exceeds this threshold are left unclassified. Omit to classify all pixels. |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
training = wbe.Vector('training.shp')
classified = wbe.min_dist_classification([band1, band2, band3], training, 'class')
classified = wbe.min_dist_classification([band1, band2, band3], training, 'class', dist_threshold=3.0, output_path='classified.tif')
wbe.parallelepiped_classification
wbe.parallelepiped_classification(
input_rasters,
training_data,
class_field_name,
output_path=None,
callback=None,
) -> Raster
Performs a supervised parallelepiped classification on a stack of single-band rasters using polygon training data. For each class, the minimum and maximum pixel values from the training areas define a multi-dimensional hyper-rectangular decision region (parallelepiped). A pixel is assigned to the first class (sorted by smallest spectral volume) whose parallelepiped contains the pixel's feature vector. Pixels that do not fall within any class parallelepiped are left unclassified (nodata = −32768).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per spectral band |
training_data | Vector | required | Polygon vector containing labelled training areas |
class_field_name | str | required | Attribute field name identifying each polygon's class |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
training = wbe.Vector('training.shp')
classified = wbe.parallelepiped_classification([band1, band2, band3], training, 'class')
classified = wbe.parallelepiped_classification([band1, band2, band3], training, 'class', output_path='classified.tif')
wbe.evaluate_training_sites
wbe.evaluate_training_sites(
input_rasters,
training_data,
class_field_name,
output_path=None,
callback=None,
) -> str
Evaluates class separability for polygon training sites across one or more spectral bands, and writes an HTML report containing per-class, per-band distribution statistics (sample count, min, quartiles, median, max, mean, and standard deviation).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per spectral band |
training_data | Vector | required | Polygon vector containing labelled training areas |
class_field_name | str | required | Attribute field name identifying each polygon's class |
output_path | str | None | None | Output HTML file path; default is training_sites_report.html in the working directory |
callback | callable | None | None | Progress/message event handler |
Examples
training = wbe.Vector('training.shp')
report = wbe.evaluate_training_sites([band1, band2, band3], training, 'class')
report = wbe.evaluate_training_sites([band1, band2, band3], training, 'class', output_path='training_eval.html')
wbe.generalize_with_similarity
wbe.generalize_with_similarity(
raster,
similarity_rasters,
min_size=5,
output_path=None,
callback=None,
) -> Raster
Generalizes a classified raster by identifying small contiguous patches and merging each into a neighboring patch with the most similar multi-band feature center in standardized similarity space.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
raster | Raster | required | Input classified raster |
similarity_rasters | List[Raster] | required | One or more rasters used to compute inter-feature similarity |
min_size | int | 5 | Minimum feature size (pixels); smaller features are merged |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
generalized = wbe.generalize_with_similarity(classes, [band1, band2, band3])
generalized = wbe.generalize_with_similarity(classes, [band1, band2, band3], min_size=8, output_path='generalized_similarity.tif')
wbe.image_segmentation
wbe.image_segmentation(
input_rasters,
threshold=0.5,
steps=10,
min_area=4,
output_path=None,
callback=None,
) -> Raster
Segments a multi-band raster stack into contiguous, relatively homogeneous regions using seeded region growing in standardized feature space. An optional minimum-area post-process can merge undersized regions into similar neighbors.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per input band |
threshold | float | 0.5 | Region-growing distance threshold in standardized feature space |
steps | int | 10 | Number of seed-priority levels; higher values provide finer seed stratification |
min_area | int | 4 | Minimum segment area in pixels; smaller segments are merged in cleanup |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
segments = wbe.image_segmentation([band1, band2, band3])
segments = wbe.image_segmentation([band1, band2, band3], threshold=0.45, steps=12, min_area=6, output_path='segments.tif')
wbe.fuzzy_knn_classification
wbe.fuzzy_knn_classification(
input_rasters,
training_data,
class_field_name,
scaling_method="none",
k=5,
m=2.0,
output_path=None,
probability_output_path=None,
callback=None,
) -> Tuple[Raster, Raster]
Performs fuzzy k-nearest-neighbor classification and returns both a crisp class raster and a membership-probability raster (the winning-class membership per cell).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point/polygon training vector with class labels |
class_field_name | str | required | Class field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
k | int | 5 | Number of neighbors |
m | float | 2.0 | Fuzzy exponent parameter (> 1) |
output_path | str | None | None | Optional classified raster output path |
probability_output_path | str | None | None | Optional probability raster output path |
callback | callable | None | None | Progress/message event handler |
Examples
classified, probability = wbe.fuzzy_knn_classification([band1, band2, band3], training, 'class')
classified, probability = wbe.fuzzy_knn_classification(
[band1, band2, band3],
training,
'class',
scaling_method='standardize',
k=7,
m=2.0,
output_path='fuzzy_knn_classified.tif',
probability_output_path='fuzzy_knn_probability.tif',
)
wbe.knn_classification
wbe.knn_classification(
input_rasters,
training_data,
class_field_name,
scaling_method="none",
k=5,
use_clipping=False,
output_path=None,
callback=None,
) -> Raster
Performs supervised k-nearest-neighbor classification on a multi-band raster stack.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point/polygon training vector with class labels |
class_field_name | str | required | Class field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
k | int | 5 | Number of neighbors |
use_clipping | bool | False | If True, removes misclassified training samples using leave-one-out pre-clipping |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
classified = wbe.knn_classification([band1, band2, band3], training, 'class')
classified = wbe.knn_classification(
[band1, band2, band3],
training,
'class',
scaling_method='standardize',
k=7,
use_clipping=True,
output_path='knn_classified.tif',
)
wbe.knn_regression
wbe.knn_regression(
input_rasters,
training_data,
field_name,
scaling_method="none",
k=5,
distance_weighting=False,
output_path=None,
callback=None,
) -> Raster
Performs supervised k-nearest-neighbor regression using point-based training targets.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point training vector with numeric target values |
field_name | str | required | Numeric target field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
k | int | 5 | Number of neighbors |
distance_weighting | bool | False | If True, predictions use inverse-distance weighted averaging |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
pred = wbe.knn_regression([band1, band2, band3], training_points, 'value')
pred = wbe.knn_regression(
[band1, band2, band3],
training_points,
'value',
scaling_method='standardize',
k=8,
distance_weighting=True,
output_path='knn_regression.tif',
)
wbe.logistic_regression
wbe.logistic_regression(
input_rasters,
training_data,
class_field_name,
scaling_method="none",
alpha=0.0,
output_path=None,
callback=None,
) -> Raster
Performs supervised logistic regression classification on multi-band predictors.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point/polygon training vector with class labels |
class_field_name | str | required | Class field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
alpha | float | 0.0 | L2 regularization weight |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
classified = wbe.logistic_regression([band1, band2, band3], training, 'class')
classified = wbe.logistic_regression(
[band1, band2, band3],
training,
'class',
scaling_method='standardize',
alpha=0.1,
output_path='logistic_regression.tif',
)
wbe.svm_classification
wbe.svm_classification(
input_rasters,
training_data,
class_field_name,
scaling_method="none",
kernel="linear",
c=1.0,
gamma=None,
epoch=2,
output_path=None,
callback=None,
) -> Raster
Performs supervised support-vector-machine classification using one-vs-rest voting for multiclass labels.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point/polygon training vector with class labels |
class_field_name | str | required | Class field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
kernel | str | "linear" | SVM kernel: "linear" or "rbf" |
c | float | 1.0 | Regularization parameter |
gamma | float | None | None | RBF gamma; defaults to 1 / n_features when omitted |
epoch | int | 2 | Number of training epochs |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
classified = wbe.svm_classification([band1, band2, band3], training, 'class')
classified = wbe.svm_classification(
[band1, band2, band3],
training,
'class',
scaling_method='standardize',
kernel='rbf',
c=2.0,
gamma=0.25,
epoch=3,
output_path='svm_classified.tif',
)
wbe.svm_regression
wbe.svm_regression(
input_rasters,
training_data,
field_name,
scaling_method="none",
kernel="linear",
c=1.0,
gamma=None,
eps=0.1,
tol=1e-3,
output_path=None,
callback=None,
) -> Raster
Performs supervised support-vector-machine regression on multi-band predictors.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point training vector with numeric target values |
field_name | str | required | Numeric target field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
kernel | str | "linear" | SVM kernel: "linear" or "rbf" |
c | float | 1.0 | Regularization parameter |
gamma | float | None | None | RBF gamma; defaults to 1 / n_features when omitted |
eps | float | 0.1 | Epsilon-insensitive loss width |
tol | float | 1e-3 | Optimizer convergence tolerance |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
pred = wbe.svm_regression([band1, band2, band3], training_points, 'value')
pred = wbe.svm_regression(
[band1, band2, band3],
training_points,
'value',
scaling_method='standardize',
kernel='rbf',
c=2.0,
gamma=0.25,
eps=0.05,
tol=1e-3,
output_path='svm_regression.tif',
)
wbe.random_forest_classification
wbe.random_forest_classification(
input_rasters,
training_data,
class_field_name,
scaling_method="none",
n_trees=200,
min_samples_leaf=1,
min_samples_split=2,
output_path=None,
callback=None,
) -> Raster
Performs supervised random forest classification using point/polygon training data.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point/polygon training vector with class labels |
class_field_name | str | required | Class field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
n_trees | int | 200 | Number of trees in the forest |
min_samples_leaf | int | 1 | Minimum number of samples at each leaf |
min_samples_split | int | 2 | Minimum number of samples to split a node |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
classified = wbe.random_forest_classification([band1, band2, band3], training, 'class')
classified = wbe.random_forest_classification(
[band1, band2, band3],
training,
'class',
scaling_method='standardize',
n_trees=300,
min_samples_leaf=1,
min_samples_split=2,
output_path='rf_classified.tif',
)
wbe.random_forest_regression
wbe.random_forest_regression(
input_rasters,
training_data,
field_name,
scaling_method="none",
n_trees=200,
min_samples_leaf=1,
min_samples_split=2,
output_path=None,
callback=None,
) -> Raster
Performs supervised random forest regression using point training targets.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point training vector with numeric target values |
field_name | str | required | Numeric target field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
n_trees | int | 200 | Number of trees in the forest |
min_samples_leaf | int | 1 | Minimum number of samples at each leaf |
min_samples_split | int | 2 | Minimum number of samples to split a node |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
pred = wbe.random_forest_regression([band1, band2, band3], training_points, 'value')
pred = wbe.random_forest_regression(
[band1, band2, band3],
training_points,
'value',
scaling_method='standardize',
n_trees=300,
min_samples_leaf=1,
min_samples_split=2,
output_path='rf_regression.tif',
)
wbe.random_forest_classification_fit
wbe.random_forest_classification_fit(
input_rasters,
training_data,
class_field_name,
scaling_method="none",
split_criterion="gini",
n_trees=200,
min_samples_leaf=1,
min_samples_split=2,
test_proportion=0.2,
callback=None,
) -> List[int]
Fits a random forest classifier and returns serialized model bytes for later prediction.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point/polygon training vector with class labels |
class_field_name | str | required | Class field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
split_criterion | str | "gini" | Legacy split criterion argument for compatibility |
n_trees | int | 200 | Number of trees in the forest |
min_samples_leaf | int | 1 | Minimum number of samples at each leaf |
min_samples_split | int | 2 | Minimum number of samples to split a node |
test_proportion | float | 0.2 | Legacy compatibility parameter for train/test split workflows |
callback | callable | None | None | Progress/message event handler |
Examples
model_bytes = wbe.random_forest_classification_fit([band1, band2, band3], training, 'class')
wbe.random_forest_classification_predict
wbe.random_forest_classification_predict(
input_rasters,
model_bytes,
output_path=None,
callback=None,
) -> Raster
Applies a fitted random forest classification model (byte-array payload) to predictor rasters.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
model_bytes | List[int] | required | Model bytes returned by wbe.random_forest_classification_fit |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
model_bytes = wbe.random_forest_classification_fit([band1, band2, band3], training, 'class')
classified = wbe.random_forest_classification_predict([band1, band2, band3], model_bytes)
wbe.random_forest_regression_fit
wbe.random_forest_regression_fit(
input_rasters,
training_data,
field_name,
scaling_method="none",
n_trees=200,
min_samples_leaf=1,
min_samples_split=2,
test_proportion=0.2,
callback=None,
) -> List[int]
Fits a random forest regressor and returns serialized model bytes for later prediction.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point training vector with numeric target values |
field_name | str | required | Numeric target field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
n_trees | int | 200 | Number of trees in the forest |
min_samples_leaf | int | 1 | Minimum number of samples at each leaf |
min_samples_split | int | 2 | Minimum number of samples to split a node |
test_proportion | float | 0.2 | Legacy compatibility parameter for train/test split workflows |
callback | callable | None | None | Progress/message event handler |
Examples
model_bytes = wbe.random_forest_regression_fit([band1, band2, band3], training_points, 'value')
wbe.random_forest_regression_predict
wbe.random_forest_regression_predict(
input_rasters,
model_bytes,
output_path=None,
callback=None,
) -> Raster
Applies a fitted random forest regression model (byte-array payload) to predictor rasters.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
model_bytes | List[int] | required | Model bytes returned by wbe.random_forest_regression_fit |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
model_bytes = wbe.random_forest_regression_fit([band1, band2, band3], training_points, 'value')
pred = wbe.random_forest_regression_predict([band1, band2, band3], model_bytes)
wbe.nnd_classification
wbe.nnd_classification(
input_rasters,
training_data,
class_field_name,
scaling_method="none",
z_threshold=1.96,
outlier_is_zero=True,
k=25,
output_path=None,
callback=None,
) -> Raster
Performs nearest-normalized-distance classification. For each class, distances are normalized by within-class distance statistics; optional thresholding can flag outliers.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
input_rasters | List[Raster] | required | One single-band raster per feature band |
training_data | Vector | required | Point/polygon training vector with class labels |
class_field_name | str | required | Class field name in training attributes |
scaling_method | str | "none" | Feature scaling mode: "none", "normalize", "standardize" |
z_threshold | float | 1.96 | Outlier threshold in normalized-distance units |
outlier_is_zero | bool | True | If True, outliers are encoded as class 0; otherwise as nodata |
k | int | 25 | Neighborhood size used in class-distance estimates |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Examples
classified = wbe.nnd_classification([band1, band2, band3], training, 'class')
classified = wbe.nnd_classification(
[band1, band2, band3],
training,
'class',
scaling_method='standardize',
z_threshold=2.0,
outlier_is_zero=True,
k=25,
output_path='nnd_classified.tif',
)
Geomorphometry And Terrain Signatures
Whitebox Workflows for Python — Geomorphometry Tools
This document covers all Geomorphometry tools exposed through the WbEnvironment API.
For common conventions, Raster I/O, and math operators see TOOLS.md.
Geomorphometry
Terrain analysis and land-surface form tools available on WbEnvironment.
Tools (Alphabetical)
wbe.accumulation_curvaturewbe.average_normal_vector_angular_deviationwbe.aspectwbe.assess_routewbe.average_horizon_distancewbe.breakline_mappingwbe.casorati_curvaturewbe.circular_variance_of_aspectwbe.contours_from_pointswbe.contours_from_rasterwbe.curvednesswbe.convergence_indexwbe.dem_void_fillingwbe.deviation_from_mean_elevationwbe.difference_curvaturewbe.difference_from_mean_elevationwbe.directional_reliefwbe.downslope_indexwbe.edge_densitywbe.embankment_mappingwbe.elev_above_pitwbe.elev_above_pit_distwbe.elev_relative_to_min_maxwbe.elev_relative_to_watershed_min_maxwbe.elevation_percentilewbe.exposure_towards_wind_fluxwbe.max_downslope_elev_changewbe.max_upslope_elev_changewbe.feature_preserving_smoothingwbe.gaussian_curvaturewbe.fetch_analysiswbe.fill_missing_datawbe.find_ridgeswbe.geomorphonswbe.generating_functionwbe.horizon_anglewbe.horizon_areawbe.hillshadewbe.hypsometric_analysiswbe.hypsometrically_tinted_hillshadewbe.local_hypsometric_analysiswbe.low_points_on_headwater_divideswbe.map_off_terrain_objectswbe.horizontal_excess_curvaturewbe.maximal_curvaturewbe.max_difference_from_meanwbe.max_anisotropy_devwbe.max_anisotropy_dev_signaturewbe.max_branch_lengthwbe.max_elevation_deviationwbe.max_elev_dev_signaturewbe.mean_curvaturewbe.min_downslope_elev_changewbe.minimal_curvaturewbe.multidirectional_hillshadewbe.multiscale_curvatureswbe.multiscale_elevated_indexwbe.multiscale_elevation_percentilewbe.multiscale_low_lying_indexwbe.multiscale_roughnesswbe.multiscale_roughness_signaturewbe.multiscale_std_dev_normalswbe.multiscale_std_dev_normals_signaturewbe.multiscale_topographic_position_classwbe.multiscale_topographic_position_imagewbe.num_downslope_neighbourswbe.num_upslope_neighbourswbe.opennesswbe.pennock_landform_classificationwbe.plan_curvaturewbe.percent_elev_rangewbe.principal_curvature_directionwbe.profilewbe.profile_curvaturewbe.relative_aspectwbe.relative_topographic_positionwbe.remove_off_terrain_objectswbe.relative_stream_power_indexwbe.ring_curvaturewbe.rotorwbe.ruggedness_indexwbe.sediment_transport_indexwbe.shape_indexwbe.soil_landscape_classificationwbe.spherical_std_dev_of_normalswbe.sky_view_factorwbe.shadow_animationwbe.shadow_imagewbe.skyline_analysiswbe.smooth_vegetation_residualwbe.slopewbe.slope_vs_aspect_plotwbe.slope_vs_elev_plotwbe.standard_deviation_of_slopewbe.surface_area_ratiowbe.tangential_curvaturewbe.time_in_daylightwbe.topographic_hachureswbe.topographic_position_animationwbe.topo_renderwbe.total_curvaturewbe.unsphericitywbe.visibility_indexwbe.vertical_excess_curvaturewbe.viewshedwbe.wetness_index
Basic terrain tools
wbe.slope
wbe.slope(input, units='degrees', z_factor=1.0, output_path=None, callback=None) -> Raster
Calculates slope gradient for each cell in a DEM.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
units | str | 'degrees' | Output units: 'degrees', 'radians', or 'percent' |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.aspect
wbe.aspect(input, z_factor=1.0, output_path=None, callback=None) -> Raster
Calculates slope aspect (orientation, degrees clockwise from north) for each cell in a DEM. Flat surfaces return −1.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.convergence_index
wbe.convergence_index(input, z_factor=1.0, output_path=None, callback=None) -> Raster
Calculates the convergence/divergence index based on neighbour aspects relative to the center cell.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.hillshade
wbe.hillshade(input, azimuth=315.0, altitude=30.0, z_factor=1.0, output_path=None, callback=None) -> Raster
Produces a shaded-relief image from a DEM. Output values are scaled 0–32767.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
azimuth | float | 315.0 | Illumination azimuth, degrees clockwise from north (0–360) |
altitude | float | 30.0 | Illumination altitude above horizon, degrees (0–90) |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Single-scale curvature signature
wbe.multidirectional_hillshade
wbe.multidirectional_hillshade(input, altitude=30.0, z_factor=1.0, full_360_mode=False, output_path=None, callback=None) -> Raster
Produces a weighted multi-azimuth shaded-relief image. In the default 4-direction mode illumination azimuths of 225°, 270°, 315°, and 360° are combined with weights 0.1, 0.4, 0.4, 0.1. In 360-degree mode eight evenly spaced azimuths are used. Output values are scaled 0–32767.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
altitude | float | 30.0 | Illumination altitude above horizon, degrees (0–90) |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
full_360_mode | bool | False | Use 8 azimuths (360°) instead of 4 |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.ruggedness_index
wbe.ruggedness_index(input, output_path=None, callback=None) -> Raster
Calculates the terrain ruggedness index (TRI) after Riley et al. (1999). Each cell value is the root-mean-square deviation of the 8 surrounding elevation differences from the centre cell.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.surface_area_ratio
wbe.surface_area_ratio(input, output_path=None, callback=None) -> Raster
Calculates the ratio of 3D surface area to planimetric cell area using the Jenness (2004) triangular-facet method. Values ≥ 1; flat terrain returns 1.0. Geographic (lat/lon) rasters apply per-row cosine scaling.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.elev_relative_to_min_max
wbe.elev_relative_to_min_max(input, output_path=None, callback=None) -> Raster
Expresses each elevation as a percentage (0–100) of the raster's global elevation range: (z − min) / (max − min) × 100.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.wetness_index
wbe.wetness_index(sca, slope, output_path=None, callback=None) -> Raster
Calculates the topographic wetness index (TWI): ln(SCA / tan(slope)). Cells where slope ≤ 0° or SCA ≤ 0 are output as nodata.
| Name | Type | Default | Description |
|---|---|---|---|
sca | Raster | required | Specific catchment area raster |
slope | Raster | required | Slope raster in degrees |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.relative_stream_power_index
wbe.relative_stream_power_index(sca, slope, exponent=1.0, output_path=None, callback=None) -> Raster
Calculates the relative stream power index: SCA^p * tan(slope), where slope is in degrees and p is a user-controlled exponent.
| Name | Type | Default | Description |
|---|---|---|---|
sca | Raster | required | Specific catchment area raster |
slope | Raster | required | Slope raster in degrees |
exponent | float | 1.0 | Specific catchment area exponent p |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.sediment_transport_index
wbe.sediment_transport_index(sca, slope, sca_exponent=0.4, slope_exponent=1.3, output_path=None, callback=None) -> Raster
Calculates the sediment transport index (LS factor): (n + 1) * (SCA / 22.13)^n * (sin(slope) / 0.0896)^m, where slope is in degrees, n is sca_exponent, and m is slope_exponent.
| Name | Type | Default | Description |
|---|---|---|---|
sca | Raster | required | Specific catchment area raster |
slope | Raster | required | Slope raster in degrees |
sca_exponent | float | 0.4 | Specific catchment area exponent n |
slope_exponent | float | 1.3 | Slope exponent m |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.elev_relative_to_watershed_min_max
wbe.elev_relative_to_watershed_min_max(dem, watersheds, output_path=None, callback=None) -> Raster
Expresses each DEM elevation as a percentage (0-100) of the min-max range within its watershed zone.
| Name | Type | Default | Description |
|---|---|---|---|
dem | Raster | required | Input DEM raster |
watersheds | Raster | required | Watershed ID raster |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.percent_elev_range
wbe.percent_elev_range(input, filter_size_x=11, filter_size_y=None, output_path=None, callback=None) -> Raster
Computes local topographic position as a percent of neighbourhood elevation range.
wbe.relative_topographic_position
wbe.relative_topographic_position(input, filter_size_x=11, filter_size_y=None, output_path=None, callback=None) -> Raster
Computes relative topographic position using neighbourhood min, mean, and max, scaled to [-1, 1].
wbe.num_downslope_neighbours
wbe.num_downslope_neighbours(input, output_path=None, callback=None) -> Raster
Counts the number of 8-neighbour cells that are lower than each DEM cell.
wbe.num_upslope_neighbours
wbe.num_upslope_neighbours(input, output_path=None, callback=None) -> Raster
Counts the number of 8-neighbour cells that are higher than each DEM cell.
wbe.max_downslope_elev_change
wbe.max_downslope_elev_change(input, output_path=None, callback=None) -> Raster
Computes the maximum elevation drop from each cell to any lower neighbour.
wbe.max_upslope_elev_change
wbe.max_upslope_elev_change(input, output_path=None, callback=None) -> Raster
Computes the maximum elevation gain from each cell to any higher neighbour.
wbe.min_downslope_elev_change
wbe.min_downslope_elev_change(input, output_path=None, callback=None) -> Raster
Computes the minimum non-negative elevation drop from each cell to neighbours.
wbe.elevation_percentile
wbe.elevation_percentile(input, filter_size_x=11, filter_size_y=None, sig_digits=2, output_path=None, callback=None) -> Raster
Computes the local percentile rank (0-100) of each elevation value within a moving neighbourhood.
wbe.downslope_index
wbe.downslope_index(input, vertical_drop=2.0, output_type='tangent', output_path=None, callback=None) -> Raster
Computes the Hjerdt et al. downslope index using a D8 flow path to the first point that reaches the requested vertical drop.
wbe.elev_above_pit
wbe.elev_above_pit(input, output_path=None, callback=None) -> Raster
Calculates each cell elevation above the nearest downslope pit (or edge sink).
wbe.elev_above_pit_dist
wbe.elev_above_pit_dist(input, output_path=None, callback=None) -> Raster
Compatibility alias of wbe.elev_above_pit.
wbe.circular_variance_of_aspect
wbe.circular_variance_of_aspect(input, filter=11, output_path=None, callback=None) -> Raster
Calculates local circular variance of aspect (0 = uniform aspect, 1 = highly variable aspect).
wbe.hypsometric_analysis
wbe.hypsometric_analysis(inputs, watershed=None, output_path=None, callback=None) -> str
Creates an HTML hypsometric curve report for one or more DEMs, with optional watershed grouping.
wbe.profile
wbe.profile(lines_vector, surface, output_path=None, callback=None) -> str
Creates an HTML profile plot of elevation versus distance sampled along one or more input polyline features.
| Name | Type | Default | Description |
|---|---|---|---|
lines_vector | Vector | required | Input polyline vector containing profile lines |
surface | Raster | required | Input surface raster sampled along each line |
output_path | str | None | None | Output HTML report path |
callback | callable | None | None | Progress/message event handler |
wbe.hypsometrically_tinted_hillshade
wbe.hypsometrically_tinted_hillshade(input, solar_altitude=45.0, hillshade_weight=0.5, brightness=0.5, atmospheric_effects=0.0, palette='atlas', reverse_palette=False, full_360_mode=False, z_factor=1.0, output_path=None, callback=None) -> Raster
Creates a Swiss-style terrain rendering by blending hypsometric tint with multi-azimuth hillshade and optional atmospheric haze effects.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM/DSM raster |
solar_altitude | float | 45.0 | Illumination altitude in degrees [0, 90] |
hillshade_weight | float | 0.5 | Relative hillshade contribution in [0, 1] |
brightness | float | 0.5 | Brightness tuning in [0, 1] |
atmospheric_effects | float | 0.0 | Atmospheric haze amount in [0, 1] |
palette | str | 'atlas' | Hypsometric palette name |
reverse_palette | bool | False | Reverse palette ordering |
full_360_mode | bool | False | Use 8-direction illumination (true) instead of 4-direction mode |
z_factor | float | 1.0 | Vertical scaling factor for elevations |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.local_hypsometric_analysis
wbe.local_hypsometric_analysis(input, min_scale=4, step_size=1, num_steps=10, step_nonlinearity=1.0, output_path=None, output_scale_path=None, callback=None) -> tuple[Raster, Raster]
Computes local hypsometric integral (HI) across a nonlinearly sampled range of neighbourhood scales and returns two rasters: the minimum HI value found at each cell and the scale (filter size) where that minimum occurs.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
min_scale | int | 4 | Minimum half-window radius in cells |
step_size | int | 1 | Base step for scale sampling |
num_steps | int | 10 | Number of sampled scales |
step_nonlinearity | float | 1.0 | Nonlinearity exponent for scale spacing |
output_path | str | None | None | Optional path for HI-minimum magnitude raster |
output_scale_path | str | None | None | Optional path for scale raster |
callback | callable | None | None | Progress/message event handler |
wbe.low_points_on_headwater_divides
wbe.low_points_on_headwater_divides(dem, streams, output_path=None, callback=None) -> Vector
Locates low pass points on divides between neighboring headwater subbasins using a DEM-derived D8 flow network and an input streams raster.
| Name | Type | Default | Description |
|---|---|---|---|
dem | Raster | required | Input depressionless DEM raster |
streams | Raster | required | Input stream raster (positive cells are channels) |
output_path | str | None | None | Output vector path; omit to use a temporary file |
callback | callable | None | None | Progress/message event handler |
wbe.slope_vs_aspect_plot
wbe.slope_vs_aspect_plot(input, aspect_bin_size=2.0, min_slope=0.1, z_factor=1.0, output_path=None, callback=None) -> str
Creates an HTML radial slope-vs-aspect plot showing 25th/50th/75th percentile slope by aspect bin.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
aspect_bin_size | float | 2.0 | Aspect bin width in degrees |
min_slope | float | 0.1 | Minimum slope threshold (degrees) included in analysis |
z_factor | float | 1.0 | Vertical scaling factor for elevations |
output_path | str | None | None | Output HTML path |
callback | callable | None | None | Progress/message event handler |
wbe.slope_vs_elev_plot
wbe.slope_vs_elev_plot(inputs, watershed=None, output_path=None, callback=None) -> str
Creates an HTML slope-vs-elevation plot for one or more DEMs, with optional watershed grouping per DEM.
| Name | Type | Default | Description |
|---|---|---|---|
inputs | list[Raster] | required | One or more input DEM rasters |
watershed | list[Raster] | None | None | Optional watershed rasters matching each DEM |
output_path | str | None | None | Output HTML path |
callback | callable | None | None | Progress/message event handler |
wbe.directional_relief
wbe.directional_relief(input, azimuth=0.0, max_dist=None, output_path=None, callback=None) -> Raster
Calculates directional relief as the difference between each cell and the mean elevation sampled along a ray in the specified azimuth.
wbe.exposure_towards_wind_flux
wbe.exposure_towards_wind_flux(input, azimuth=0.0, max_dist=None, z_factor=1.0, output_path=None, callback=None) -> Raster
Calculates exposure of each terrain cell to a dominant wind direction by combining local slope/aspect with the upwind horizon angle.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
azimuth | float | 0.0 | Dominant wind azimuth in degrees clockwise from north |
max_dist | float | None | None | Optional maximum search distance for horizon-angle tracing |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.fetch_analysis
wbe.fetch_analysis(input, azimuth=0.0, hgt_inc=0.05, output_path=None, callback=None) -> Raster
Computes upwind distance to the nearest topographic obstacle; edge-truncated fetch values are negative.
wbe.relative_aspect
wbe.relative_aspect(input, azimuth=0.0, z_factor=1.0, output_path=None, callback=None) -> Raster
Calculates aspect relative to a specified azimuth; output ranges from 0° (aligned) to 180° (opposed).
wbe.edge_density
wbe.edge_density(input, filter_size=11, norm_diff=5.0, z_factor=1.0, output_path=None, callback=None) -> Raster
Calculates local density (0–1) of breaks-in-slope based on normal-vector angular differences.
wbe.find_ridges
wbe.find_ridges(input, line_thin=True, output_path=None, callback=None) -> Raster
Identifies potential ridge and peak cells, with optional post-processing line thinning.
wbe.breakline_mapping
wbe.breakline_mapping(dem, threshold=0.8, min_length=3, output_path=None, callback=None) -> Vector
Maps breaklines by thresholding log-transformed curvedness and vectorizing connected, thinned high-curvature line features.
| Name | Type | Default | Description |
|---|---|---|---|
dem | Raster | required | Input DEM raster |
threshold | float | 0.8 | Minimum log-curvedness threshold |
min_length | int | 3 | Minimum output line length in grid cells |
output_path | str | None | None | Output vector path; omit to use a temporary file |
callback | callable | None | None | Progress/message event handler |
wbe.assess_route
wbe.assess_route(routes, dem, segment_length=100.0, search_radius=15, output_path=None, callback=None) -> Vector
Splits polyline routes into equal-length segments and computes per-segment metrics including average slope, relief, sinuosity, breaks-in-slope, and maximum local openness visibility.
| Name | Type | Default | Description |
|---|---|---|---|
routes | Vector | required | Input polyline routes vector |
dem | Raster | required | Input projected DEM raster |
segment_length | float | 100.0 | Target segment length in map units |
search_radius | int | 15 | Visibility search radius in grid cells (minimum effective value is 4) |
output_path | str | None | None | Output vector path; omit to use a temporary file |
callback | callable | None | None | Progress/message event handler |
wbe.contours_from_raster
wbe.contours_from_raster(input, contour_interval=10.0, base_contour=0.0, smoothing_filter_size=9, deflection_tolerance=10.0, output_path=None, callback=None) -> Vector
Creates vector contour polylines from a raster surface using contour interval and base elevation controls. Optional smoothing and deflection-based simplification reduce vertex density.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster surface (e.g., DEM) |
contour_interval | float | 10.0 | Contour interval |
base_contour | float | 0.0 | Base contour value |
smoothing_filter_size | int | 9 | Smoothing filter size (odd integer preferred) |
deflection_tolerance | float | 10.0 | Minimum bend angle (degrees) retained during simplification |
output_path | str | None | None | Output vector path; defaults to contours_from_raster.shp in working directory |
callback | callable | None | None | Progress/message event handler |
wbe.contours_from_points
wbe.contours_from_points(input, field_name=None, use_z_values=False, max_triangle_edge_length=None, contour_interval=10.0, base_contour=0.0, smoothing_filter_size=9, output_path=None, callback=None) -> Vector
Creates vector contour polylines from point elevations by building a Delaunay triangulation and extracting contour intersections through each triangle.
| Name | Type | Default | Description |
|---|---|---|---|
input | Vector | required | Input point or multipoint vector |
field_name | str | None | None | Numeric elevation field; required when use_z_values=False unless a numeric field can be auto-selected |
use_z_values | bool | False | Use geometry Z values for elevations |
max_triangle_edge_length | float | None | None | Optional maximum triangle edge length used in contouring |
contour_interval | float | 10.0 | Contour interval |
base_contour | float | 0.0 | Base contour value |
smoothing_filter_size | int | 9 | Smoothing filter size (odd integer preferred) |
output_path | str | None | None | Output vector path; defaults to contours_from_points.shp in working directory |
callback | callable | None | None | Progress/message event handler |
wbe.topographic_hachures
wbe.topographic_hachures(dem, contour_interval=10.0, base_contour=0.0, deflection_tolerance=10.0, filter_size=9, separation=2.0, distmin=0.5, distmax=2.0, discretization=0.5, turnmax=45.0, slopemin=0.5, depth=16, output_path=None, callback=None) -> Vector
Creates topographic hachure polylines from a DEM by extracting contours and tracing slope-following flowlines between and across contour levels. This OSS port preserves the legacy authorship note for the original implementation because it was not authored by John Lindsay.
| Name | Type | Default | Description |
|---|---|---|---|
dem | Raster | required | Input DEM raster |
contour_interval | float | 10.0 | Contour interval |
base_contour | float | 0.0 | Base contour value |
deflection_tolerance | float | 10.0 | Minimum bend angle retained when simplifying contour seeds |
filter_size | int | 9 | Contour smoothing filter size |
separation | float | 2.0 | Nominal hachure seed spacing in average-cell units |
distmin | float | 0.5 | Minimum spacing multiplier used to truncate nearby hachures |
distmax | float | 2.0 | Maximum spacing multiplier used to insert additional hachures |
discretization | float | 0.5 | Flowline step size in average-cell units |
turnmax | float | 45.0 | Maximum allowed turn angle in traced hachures |
slopemin | float | 0.5 | Minimum slope angle required for continued tracing |
depth | int | 16 | Recursive infill depth for divergence areas |
output_path | str | None | None | Output vector path; defaults to topographic_hachures.shp in working directory |
callback | callable | None | None | Progress/message event handler |
wbe.topographic_position_animation
wbe.topographic_position_animation(input, palette='soft', min_scale=1, num_steps=10, step_nonlinearity=1.0, image_height=600, delay=250, label='', use_dev_max=False, output_path=None, callback=None) -> tuple[str, str]
Creates an animated multiscale topographic position visualization, returning the generated HTML viewer path and GIF path.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
palette | str | 'soft' | Palette name used for the DEV animation |
min_scale | int | 1 | Minimum analysis scale in cells |
num_steps | int | 10 | Number of animation frames/scales |
step_nonlinearity | float | 1.0 | Nonlinear exponent controlling scale spacing |
image_height | int | 600 | Output animation height in pixels |
delay | int | 250 | GIF frame delay in milliseconds |
label | str | '' | Optional label drawn in the animation viewer |
use_dev_max | bool | False | Use cumulative maximum absolute DEV instead of per-step DEV |
output_path | str | None | None | Output HTML path; the GIF is written beside it |
callback | callable | None | None | Progress/message event handler |
wbe.geomorphons
wbe.geomorphons(input, search_distance=50, flatness_threshold=1.0, flatness_distance=0, skip_distance=0, output_forms=True, analyze_residuals=False, output_path=None, callback=None) -> Raster
Classifies landforms using the geomorphons line-of-sight method. For each direction, the tool compares zenith and nadir angle magnitudes using a ternary rule: positive (2) when the zenith-nadir difference exceeds the flatness threshold, negative (0) when it is below the negative threshold, and flat (1) otherwise. When output_forms=True, outputs the 10 common landform classes; otherwise outputs raw ternary geomorphon codes ordered counter-clockwise from east.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
search_distance | int | 50 | Maximum look-up distance in cells per direction (endpoint cell is included) |
flatness_threshold | float | 1.0 | Flatness threshold angle in degrees, applied to the zenith-nadir angle difference |
flatness_distance | int | 0 | Distance in cells after which the flatness threshold tapers with horizon distance |
skip_distance | int | 0 | Distance in cells skipped before beginning line-of-sight evaluation |
output_forms | bool | True | Output 10 common landform classes instead of raw ternary geomorphon codes |
analyze_residuals | bool | False | Detrend the DEM with a fitted linear plane before classification |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
search_distance and flatness_distance are interpreted in cell steps (not a fixed map-unit radius), which keeps directional scanning behavior consistent for rasters with non-square pixel sizes. Horizon angles are still computed from true map-space distances.
Common landform classes when output_forms=True:
1 Flat
2 Peak
3 Ridge
4 Shoulder
5 Spur
6 Slope
7 Hollow
8 Footslope
9 Valley
10 Pit
wbe.pennock_landform_classification
wbe.pennock_landform_classification(input, slope_threshold=3.0, prof_curv_threshold=0.1, plan_curv_threshold=0.0, z_factor=1.0, output_path=None, callback=None) -> tuple[Raster, str]
Classifies each DEM cell into one of seven Pennock et al. (1987) landform classes using slope, plan curvature, and profile curvature thresholds.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
slope_threshold | float | 3.0 | Slope threshold in degrees used to separate level terrain |
prof_curv_threshold | float | 0.1 | Profile curvature threshold (degrees) |
plan_curv_threshold | float | 0.0 | Plan curvature threshold (degrees) |
z_factor | float | 1.0 | Vertical scaling factor; if negative and CRS is geographic, an approximate value is inferred from latitude |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Returns a (Raster, str) tuple where the string is a human-readable classification key:
1 Convergent Footslope
2 Divergent Footslope
3 Convergent Shoulder
4 Divergent Shoulder
5 Convergent Backslope
6 Divergent Backslope
7 Level
wbe.soil_landscape_classification
wbe.soil_landscape_classification(
input,
flat_slope_threshold=3.0,
profile_curvature_threshold=0.01,
plan_curvature_threshold=0.01,
fine_scale=2.0,
coarse_scale=8.0,
z_factor=1.0,
output_prefix=None,
landform_polygons_output=None,
callback=None,
) -> tuple[Raster, Raster, Vector, str]
Runs the workflow soil-landscape classifier and returns:
- landform-units raster
- multiscale-signature raster
- landform polygons vector
- summary JSON path
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
flat_slope_threshold | float | 3.0 | Slope threshold in degrees for flat/summit/depression separation |
profile_curvature_threshold | float | 0.01 | Absolute threshold for profile-curvature convex/concave separation |
plan_curvature_threshold | float | 0.01 | Absolute threshold for plan-curvature convergent/divergent separation |
fine_scale | float | 2.0 | Fine-scale smoothing radius |
coarse_scale | float | 8.0 | Coarse-scale smoothing radius |
z_factor | float | 1.0 | Vertical exaggeration factor |
output_prefix | str | None | None | Prefix for generated outputs |
landform_polygons_output | str | None | None | Optional explicit polygon output path |
callback | callable | None | None | Progress/message event handler |
wbe.spherical_std_dev_of_normals
wbe.spherical_std_dev_of_normals(input, filter_size=11, z_factor=1.0, output_path=None, callback=None) -> Raster
Calculates spherical standard deviation (degrees) of local surface-normal vectors.
wbe.average_normal_vector_angular_deviation
wbe.average_normal_vector_angular_deviation(input, filter_size=11, z_factor=1.0, output_path=None, callback=None) -> Raster
Calculates local mean angular deviation (degrees) between original and smoothed DEM normals.
wbe.openness
wbe.openness(input, dist=20, pos_output_path=None, neg_output_path=None, callback=None) -> tuple[Raster, Raster]
Computes Yokoyama et al. (2002) topographic openness using 8-directional horizon angles. Returns positive openness (high on convex landforms like ridges) and negative openness (high on concave landforms like valleys). Both values are in degrees (0–90).
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
dist | int | 20 | Search distance in cells |
pos_output_path | str | None | None | Optional output file path for positive openness |
neg_output_path | str | None | None | Optional output file path for negative openness |
callback | callable | None | None | Progress/message event handler |
Tier: Pro
wbe.difference_from_mean_elevation
wbe.difference_from_mean_elevation(input, filter_size_x=11, filter_size_y=None, output_path=None, callback=None) -> Raster
Calculates the difference between each elevation and the mean elevation of its local neighbourhood. This is a local-relief measure and is implemented using summed-area tables for efficient large-window filtering.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
filter_size_x | int | 11 | Filter width in cells; values are coerced to odd sizes >= 3 |
filter_size_y | int | None | None | Filter height in cells; defaults to filter_size_x |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.deviation_from_mean_elevation
wbe.deviation_from_mean_elevation(input, filter_size_x=11, filter_size_y=None, output_path=None, callback=None) -> Raster
Calculates the local elevation z-score (z - mean) / std_dev using a moving neighbourhood. This normalizes the local relief by local roughness and uses summed-area tables for filter-size-invariant performance.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
filter_size_x | int | 11 | Filter width in cells; values are coerced to odd sizes >= 3 |
filter_size_y | int | None | None | Filter height in cells; defaults to filter_size_x |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.standard_deviation_of_slope
wbe.standard_deviation_of_slope(input, filter_size=11, z_factor=1.0, output_path=None, callback=None) -> Raster
Calculates the local standard deviation of slope as a roughness measure. Slope is derived from the DEM (Horn kernel), then neighbourhood standard deviation is computed with summed-area tables.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
filter_size | int | 11 | Neighbourhood width/height in cells; coerced to odd sizes >= 3 |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.feature_preserving_smoothing
wbe.feature_preserving_smoothing(input, filter_size=11, normal_diff_threshold=8.0, iterations=3, max_elevation_diff=None, z_factor=1.0, output_path=None, callback=None) -> Raster
Smooths DEM roughness while preserving terrain breaks-in-slope by filtering and applying a smoothed normal-vector field over iterative updates.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
filter_size | int | 11 | Odd neighbourhood size for normal-field smoothing |
normal_diff_threshold | float | 8.0 | Maximum angular normal difference (degrees) included in smoothing |
iterations | int | 3 | Number of elevation update iterations |
max_elevation_diff | float | None | None | Maximum allowed absolute change from original elevation per cell |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.fill_missing_data
wbe.fill_missing_data(input, filter_size=11, weight=2.0, exclude_edge_nodata=False, output_path=None, callback=None) -> Raster
Fills NoData gaps using inverse-distance weighting of valid cells on the edge of data holes.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input raster |
filter_size | int | 11 | Search radius in grid cells |
weight | float | 2.0 | Inverse-distance power exponent |
exclude_edge_nodata | bool | False | Exclude NoData regions connected to raster edges |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.remove_off_terrain_objects
wbe.remove_off_terrain_objects(input, filter_size=11, slope_threshold=15.0, output_path=None, callback=None) -> Raster
Creates a bare-earth DEM from a surface DEM by detecting steep off-terrain objects (e.g., buildings and canopy residuals) after white top-hat normalization, then backfilling and interpolating the removed regions.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
filter_size | int | 11 | Maximum expected object size in cells; coerced to odd size >= 3 |
slope_threshold | float | 15.0 | Minimum OTO edge slope (degrees) used in backfill rule |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.map_off_terrain_objects
wbe.map_off_terrain_objects(input, max_slope=90.0, min_feature_size=0, output_path=None, callback=None) -> Raster
Maps connected off-terrain object segments in a DSM using slope-constrained region growing; small mapped segments can be merged into a background class.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DSM/DEM raster |
max_slope | float | 90.0 | Maximum connecting slope in degrees; lower values separate steeper objects |
min_feature_size | int | 0 | Minimum retained segment size in cells; smaller segments are assigned to background class |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.embankment_mapping
wbe.embankment_mapping(dem, roads_vector, search_dist=2.5, min_road_width=6.0, typical_embankment_width=30.0, typical_embankment_max_height=2.0, embankment_max_width=60.0, max_upwards_increment=0.05, spillout_slope=4.0, remove_embankments=False, output_path=None, output_dem_path=None, callback=None) -> Tuple[Raster, Raster | None]
Maps transportation embankment cells using road-constrained seed growth and morphometric criteria; optionally outputs an embankment-removed DEM interpolated from embankment-edge elevations.
| Name | Type | Default | Description |
|---|---|---|---|
dem | Raster | required | Input DEM raster |
roads_vector | Vector | required | Input polyline road/transportation network |
search_dist | float | 2.5 | Seed repositioning distance in map units |
min_road_width | float | 6.0 | Minimum road-width mapping distance in map units |
typical_embankment_width | float | 30.0 | Typical embankment width in map units |
typical_embankment_max_height | float | 2.0 | Typical embankment maximum height |
embankment_max_width | float | 60.0 | Maximum embankment width in map units |
max_upwards_increment | float | 0.05 | Maximum upward increment allowed during growth |
spillout_slope | float | 4.0 | Maximum spillout slope (degrees) for uphill transitions |
remove_embankments | bool | False | Also create embankment-removed DEM output |
output_path | str | None | None | Output embankment mask raster path |
output_dem_path | str | None | None | Output embankment-removed DEM path when enabled |
callback | callable | None | None | Progress/message event handler |
wbe.smooth_vegetation_residual
wbe.smooth_vegetation_residual(input, max_scale=30, dev_threshold=1.0, scale_threshold=5, output_path=None, callback=None) -> Raster
Suppresses residual vegetation roughness in DEMs by identifying cells with high local standardized elevation deviation (DEV) at small scales and re-interpolating masked cells from nearby non-masked neighbours.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
max_scale | int | 30 | Maximum DEV half-window radius in cells |
dev_threshold | float | 1.0 | Minimum DEV value used to flag roughness cells |
scale_threshold | int | 5 | Maximum scale considered vegetation roughness |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.dem_void_filling
wbe.dem_void_filling(input, fill, mean_plane_dist=20, edge_treatment='dem', weight_value=2.0, output_path=None, callback=None) -> Raster
Fills voids in an input DEM by fusing elevations from a secondary fill DEM. The method computes a DEM-of-difference in overlap areas and interpolates near-edge offsets so void fills transition seamlessly.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster containing voids |
fill | Raster | required | Fill DEM raster used to populate void cells |
mean_plane_dist | int | 20 | Distance in cells from void edge beyond which offsets are set to mean overlap offset |
edge_treatment | str | 'dem' | Void-edge handling: 'dem', 'fill', or 'average' |
weight_value | float | 2.0 | IDW power for offset interpolation near void edges |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.max_branch_length
wbe.max_branch_length(input, log_transform=False, output_path=None, callback=None) -> Raster
Calculates the maximum branch length (Bmax) between each cell's D8 flowpath and the flowpaths of its right and lower neighbours. High values often occur near drainage divides.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
log_transform | bool | False | Apply natural-log transform to positive output values |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
wbe.max_difference_from_mean
wbe.max_difference_from_mean(input, min_scale=1, max_scale=100, step_size=1, output_path=None, output_scale_path=None, callback=None) -> tuple[Raster, Raster]
Computes difference-from-mean over multiple neighbourhood scales and returns two rasters: maximum signed magnitude and the scale (half-window radius) where that maximum absolute response occurs.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
min_scale | int | 1 | Minimum half-window radius in cells |
max_scale | int | 100 | Maximum half-window radius in cells |
step_size | int | 1 | Scale increment |
output_path | str | None | None | Optional path for magnitude raster |
output_scale_path | str | None | None | Optional path for scale raster |
callback | callable | None | None | Progress/message event handler |
wbe.max_elevation_deviation
wbe.max_elevation_deviation(input, min_scale=1, max_scale=100, step_size=1, output_path=None, output_scale_path=None, callback=None) -> tuple[Raster, Raster]
Computes standardized elevation deviation over multiple neighbourhood scales and returns two rasters: maximum signed DEV magnitude and the scale (half-window radius) where that maximum absolute response occurs.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
min_scale | int | 1 | Minimum half-window radius in cells |
max_scale | int | 100 | Maximum half-window radius in cells |
step_size | int | 1 | Scale increment |
output_path | str | None | None | Optional path for DEVmax magnitude raster |
output_scale_path | str | None | None | Optional path for scale raster |
callback | callable | None | None | Progress/message event handler |
wbe.max_anisotropy_dev
wbe.max_anisotropy_dev(input, min_scale=3, max_scale=100, step_size=2, output_path=None, output_scale_path=None, callback=None) -> tuple[Raster, Raster]
Computes the anisotropy of standardized elevation deviation over multiple neighbourhood scales and returns two rasters: maximum anisotropy magnitude and the scale (half-window radius) where that maximum response occurs.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
min_scale | int | 3 | Minimum half-window radius in cells |
max_scale | int | 100 | Maximum half-window radius in cells |
step_size | int | 2 | Scale increment |
output_path | str | None | None | Optional path for anisotropy magnitude raster |
output_scale_path | str | None | None | Optional path for scale raster |
callback | callable | None | None | Progress/message event handler |
wbe.max_elev_dev_signature
wbe.max_elev_dev_signature(input, points, min_scale=1, max_scale=100, step_size=10, output_path=None, callback=None) -> str
Generates an HTML report containing multiscale elevation-deviation (DEV) signatures for each input point site.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
points | Vector | required | Input point or multipoint vector |
min_scale | int | 1 | Minimum half-window radius in cells |
max_scale | int | 100 | Maximum half-window radius in cells |
step_size | int | 10 | Scale increment |
output_path | str | None | None | Optional HTML output path |
callback | callable | None | None | Progress/message event handler |
wbe.max_anisotropy_dev_signature
wbe.max_anisotropy_dev_signature(input, points, min_scale=1, max_scale=100, step_size=1, output_path=None, callback=None) -> str
Generates an HTML report containing multiscale anisotropy signatures for each input point site.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
points | Vector | required | Input point or multipoint vector |
min_scale | int | 1 | Minimum half-window radius in cells |
max_scale | int | 100 | Maximum half-window radius in cells |
step_size | int | 1 | Scale increment |
output_path | str | None | None | Optional HTML output path |
callback | callable | None | None | Progress/message event handler |
wbe.multiscale_topographic_position_image
wbe.multiscale_topographic_position_image(local, meso, broad, hillshade=None, lightness=1.2, output_path=None, callback=None) -> Raster
Creates a packed RGB multiscale topographic-position image from local, meso, and broad DEVmax rasters. Optionally modulates colours using a hillshade raster.
| Name | Type | Default | Description |
|---|---|---|---|
local | Raster | required | Local-scale DEVmax raster (mapped to blue channel) |
meso | Raster | required | Meso-scale DEVmax raster (mapped to green channel) |
broad | Raster | required | Broad-scale DEVmax raster (mapped to red channel) |
hillshade | Raster | None | None | Optional hillshade raster for illumination modulation |
lightness | float | 1.2 | Logistic lightness scaling factor |
output_path | str | None | None | Output file path |
callback | callable | None | None | Progress/message event handler |
wbe.multiscale_topographic_position_class
wbe.multiscale_topographic_position_class(input, local_min_scale=5, local_max_scale=80, local_step_size=1, broad_min_scale=500, broad_max_scale=2000, broad_step_size=20, local_threshold=0.5, broad_threshold=0.5, min_patch_size=0, output_path=None, output_confidence_path=None, callback=None) -> Raster
Builds local- and broad-scale DEVmax responses internally from a DEM and combines them into a nine-class categorical landform raster. Broad-scale classes are lowland, intermediate, and upland; local classes are hollow, mid-position, and knoll. Class values are fixed as 0 = Lowland hollow, 1 = Lowland mid-position, 2 = Lowland knoll, 3 = Intermediate hollow, 4 = Intermediate mid-position, 5 = Intermediate knoll, 6 = Upland hollow, 7 = Upland mid-position, 8 = Upland knoll.
If output_confidence_path is supplied, the tool also writes a separate confidence raster with values in the range [0, 1]. The returned object is always the categorical class raster; the confidence raster is written only to the requested output path.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
local_min_scale | int | 5 | Minimum half-window radius in cells for the local DEVmax scale range |
local_max_scale | int | 80 | Maximum half-window radius in cells for the local DEVmax scale range |
local_step_size | int | 1 | Scale increment for the local DEVmax range |
broad_min_scale | int | 500 | Minimum half-window radius in cells for the broad DEVmax scale range |
broad_max_scale | int | 2000 | Maximum half-window radius in cells for the broad DEVmax scale range |
broad_step_size | int | 20 | Scale increment for the broad DEVmax range |
local_threshold | float | 0.5 | Ternary threshold for local hollow / mid-position / knoll classification |
broad_threshold | float | 0.5 | Ternary threshold for broad lowland / intermediate / upland classification |
min_patch_size | int | 0 | Optional minimum mapped patch size in cells; 0 disables patch filtering |
output_path | str | None | None | Optional path for the categorical class raster |
output_confidence_path | str | None | None | Optional path for the confidence raster in [0, 1] |
callback | callable | None | None | Progress/message event handler |
wbe.multiscale_elevation_percentile
wbe.multiscale_elevation_percentile(input, min_scale=4, max_scale=100, step_size=1, sig_digits=2, output_path=None, output_scale_path=None, callback=None) -> tuple[Raster, Raster]
Computes local elevation percentile across a range of neighbourhood scales and returns two rasters: the most extreme percentile magnitude (furthest from 50) and the scale where that response occurs.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
min_scale | int | 4 | Minimum half-window radius in cells |
max_scale | int | 100 | Maximum half-window radius in cells |
step_size | int | 1 | Scale increment |
sig_digits | int | 2 | Significant decimal digits preserved during percentile binning |
output_path | str | None | None | Optional path for percentile magnitude raster |
output_scale_path | str | None | None | Optional path for scale raster |
callback | callable | None | None | Progress/message event handler |
wbe.multiscale_elevated_index
wbe.multiscale_elevated_index(input, min_scale=2, step_size=1, num_steps=100, step_nonlinearity=1.1, output_path=None, output_scale_path=None, callback=None) -> tuple[Raster, Raster]
Computes a standardized multiscale elevated index using Gaussian scale-space smoothing. Returns two rasters: the maximum positive standardized residual magnitude and the scale where that maximum occurs.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
min_scale | int | 2 | Minimum half-window radius in cells |
step_size | int | 1 | Base step for scale sampling |
num_steps | int | 100 | Number of sampled scales |
step_nonlinearity | float | 1.1 | Nonlinearity exponent for scale spacing |
output_path | str | None | None | Optional path for magnitude raster |
output_scale_path | str | None | None | Optional path for scale raster |
callback | callable | None | None | Progress/message event handler |
wbe.multiscale_low_lying_index
wbe.multiscale_low_lying_index(input, min_scale=2, step_size=1, num_steps=100, step_nonlinearity=1.1, output_path=None, output_scale_path=None, callback=None) -> tuple[Raster, Raster]
Computes a standardized multiscale low-lying index using Gaussian scale-space smoothing. Returns two rasters: the maximum negative standardized residual magnitude (reported as positive values) and the scale where that maximum occurs.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
min_scale | int | 2 | Minimum half-window radius in cells |
step_size | int | 1 | Base step for scale sampling |
num_steps | int | 100 | Number of sampled scales |
step_nonlinearity | float | 1.1 | Nonlinearity exponent for scale spacing |
output_path | str | None | None | Optional path for magnitude raster |
output_scale_path | str | None | None | Optional path for scale raster |
callback | callable | None | None | Progress/message event handler |
wbe.multiscale_roughness
wbe.multiscale_roughness(input, min_scale=1, max_scale=100, step_size=1, z_factor=1.0, output_path=None, output_scale_path=None, callback=None) -> tuple[Raster, Raster]
Computes multiscale roughness from local angular differences between DEM surface normals and scale-smoothed normals. Returns maximum roughness magnitude and the scale where it occurs.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
min_scale | int | 1 | Minimum half-window radius in cells |
max_scale | int | 100 | Maximum half-window radius in cells |
step_size | int | 1 | Scale increment |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Optional path for roughness magnitude raster |
output_scale_path | str | None | None | Optional path for scale raster |
callback | callable | None | None | Progress/message event handler |
wbe.multiscale_std_dev_normals
wbe.multiscale_std_dev_normals(input, min_scale=1, step=1, num_steps=10, step_nonlinearity=1.0, z_factor=1.0, output_path=None, output_scale_path=None, callback=None) -> tuple[Raster, Raster]
Computes the maximum spherical standard deviation of surface normals over a nonlinearly sampled set of scales. Returns magnitude and the scale where that maximum occurs.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
min_scale | int | 1 | Minimum half-window radius in cells |
step | int | 1 | Base step used by nonlinear scale schedule |
num_steps | int | 10 | Number of sampled scales |
step_nonlinearity | float | 1.0 | Nonlinearity exponent for scale schedule |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Optional path for magnitude raster |
output_scale_path | str | None | None | Optional path for scale raster |
callback | callable | None | None | Progress/message event handler |
wbe.multiscale_std_dev_normals_signature
wbe.multiscale_std_dev_normals_signature(input, points, min_scale=1, step=1, num_steps=10, step_nonlinearity=1.0, z_factor=1.0, output_path=None, callback=None) -> str
Generates an HTML report containing spherical-standard-deviation signatures across nonlinearly sampled scales for each input point site.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
points | Vector | required | Input point or multipoint vector |
min_scale | int | 1 | Minimum half-window radius in cells |
step | int | 1 | Base step used by nonlinear scale schedule |
num_steps | int | 10 | Number of sampled scales |
step_nonlinearity | float | 1.0 | Nonlinearity exponent for scale schedule |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Optional HTML output path |
callback | callable | None | None | Progress/message event handler |
wbe.multiscale_roughness_signature
wbe.multiscale_roughness_signature(input, points, min_scale=1, max_scale=100, step_size=1, z_factor=1.0, output_path=None, callback=None) -> str
Generates an HTML report containing multiscale roughness signatures for each input point site.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
points | Vector | required | Input point or multipoint vector |
min_scale | int | 1 | Minimum half-window radius in cells |
max_scale | int | 100 | Maximum half-window radius in cells |
step_size | int | 1 | Scale increment |
z_factor | float | 1.0 | Z conversion factor when vertical and horizontal units differ |
output_path | str | None | None | Optional HTML output path |
callback | callable | None | None | Progress/message event handler |
wbe.horizon_angle
wbe.horizon_angle(input, azimuth=0.0, max_dist=None, output_path=None, callback=None) -> Raster
Computes horizon angle (maximum slope) along a specified azimuth direction.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM/DSM raster |
azimuth | float | 0.0 | Azimuth in degrees [0, 360) |
max_dist | float | None | None | Maximum search distance in map units |
output_path | str | None | None | Output file path |
callback | callable | None | None | Progress/message event handler |
wbe.sky_view_factor
wbe.sky_view_factor(input, az_fraction=5.0, max_dist=None, observer_hgt_offset=0.05, output_path=None, callback=None) -> Raster
Computes sky-view factor as the proportion of visible sky from each cell.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM/DSM raster |
az_fraction | float | 5.0 | Azimuth sampling increment in degrees [1, 45] |
max_dist | float | None | None | Maximum search distance in map units |
observer_hgt_offset | float | 0.05 | Observer height offset above terrain |
output_path | str | None | None | Output file path |
callback | callable | None | None | Progress/message event handler |
wbe.horizon_area
wbe.horizon_area(input, az_fraction=5.0, max_dist=None, observer_hgt_offset=0.05, output_path=None, callback=None) -> Raster
Computes area enclosed by the horizon polygon for each cell.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM/DSM raster |
az_fraction | float | 5.0 | Azimuth sampling increment in degrees [1, 45] |
max_dist | float | None | None | Maximum search distance in map units |
observer_hgt_offset | float | 0.05 | Observer height offset above terrain |
output_path | str | None | None | Output file path |
callback | callable | None | None | Progress/message event handler |
wbe.average_horizon_distance
wbe.average_horizon_distance(input, az_fraction=5.0, max_dist=None, observer_hgt_offset=0.05, output_path=None, callback=None) -> Raster
Computes average distance to the horizon across sampled azimuth directions.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM/DSM raster |
az_fraction | float | 5.0 | Azimuth sampling increment in degrees [1, 45] |
max_dist | float | None | None | Maximum search distance in map units |
observer_hgt_offset | float | 0.05 | Observer height offset above terrain |
output_path | str | None | None | Output file path |
callback | callable | None | None | Progress/message event handler |
wbe.skyline_analysis
wbe.skyline_analysis(input, points, max_dist=None, observer_hgt_offset=0.05, output_as_polygons=True, az_fraction=1.0, output_path=None, report_path=None, callback=None) -> (Vector, str)
Computes skyline/horizon characteristics from observer point locations. Returns a horizon vector layer (polygon or line output) and an HTML report path.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM/DSM raster |
points | Vector | required | Input point or multipoint observer locations |
max_dist | float | None | None | Maximum horizon search distance in map units |
observer_hgt_offset | float | 0.05 | Observer height offset above terrain |
output_as_polygons | bool | True | Output polygon horizon footprints when true, otherwise line strings |
az_fraction | float | 1.0 | Azimuth sampling increment in degrees [0.01, 45] |
output_path | str | None | None | Output vector file path |
report_path | str | None | None | Output HTML report path |
callback | callable | None | None | Progress/message event handler |
wbe.time_in_daylight
wbe.time_in_daylight(input, az_fraction=5.0, max_dist=None, latitude=None, longitude=None, utc_offset=None, start_day=1, end_day=365, start_time='sunrise', end_time='sunset', output_path=None, callback=None) -> Raster
Computes the proportion of daytime that each cell is illuminated (not shadowed), based on sampled solar positions through the specified date and time windows. Latitude/longitude are optional overrides; when omitted they are inferred automatically from the input DEM CRS and extent center. utc_offset is also optional; when omitted it is estimated from the inferred/overridden center longitude.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM/DSM raster |
az_fraction | float | 5.0 | Azimuth bin size in degrees (0, 360) |
max_dist | float | None | None | Maximum horizon search distance in map units |
latitude | float | None | None | Optional latitude override in degrees |
longitude | float | None | None | Optional longitude override in degrees |
utc_offset | str | None | None | Optional UTC offset used for almanac generation; inferred from longitude when omitted |
start_day | int | 1 | Start day-of-year (1..366) |
end_day | int | 365 | End day-of-year (1..366) |
start_time | str | 'sunrise' | Start time HH:MM:SS or 'sunrise' |
end_time | str | 'sunset' | End time HH:MM:SS or 'sunset' |
output_path | str | None | None | Output file path |
callback | callable | None | None | Progress/message event handler |
wbe.shadow_image
wbe.shadow_image(input, palette='soft', max_dist=None, date='21/06/2021', time='13:00', location='43.5448/-80.2482/-4', output_path=None, callback=None) -> Raster
Generates a terrain shadow-intensity image for a specified local date/time and location using horizon-angle shadowing and solar position.
The palette parameter controls hypsometric tinting before shadow modulation; use white or none for grayscale intensity-only output.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM/DSM raster |
palette | str | 'soft' | Hypsometric palette name (atlas, high_relief, arid, earthtones, soft, muted, light_quant, turbo, purple, viridis, green_yellow, pink_yellow_green, blue_yellow_red, deep, imhof, blue_green_yellow, dem, grey, white/none) |
max_dist | float | None | None | Maximum horizon search distance in map units |
date | str | '21/06/2021' | Date in DD/MM/YYYY format |
time | str | '13:00' | Local time in HH:MM or HH:MMAM/PM format |
location | str | '43.5448/-80.2482/-4' | LAT/LON/UTC_OFFSET string |
output_path | str | None | None | Output file path |
callback | callable | None | None | Progress/message event handler |
wbe.shadow_animation
wbe.shadow_animation(input, date='21/06/2021', time_interval=30, location='43.5448/-80.2482/-4', palette='soft', max_dist=None, image_height=600, delay=250, label='', output_path=None, callback=None) -> tuple[str, str]
Creates an interactive terrain-shadow animation for a specified date and location, returning the generated HTML viewer path and GIF path.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM/DSM raster |
date | str | '21/06/2021' | Date in DD/MM/YYYY format |
time_interval | int | 30 | Frame interval in minutes |
location | str | '43.5448/-80.2482/-4' | LAT/LON/UTC_OFFSET string |
palette | str | 'soft' | Hypsometric palette name used in the rendered frames |
max_dist | float | None | None | Maximum horizon search distance in map units |
image_height | int | 600 | Output animation height in pixels |
delay | int | 250 | GIF frame delay in milliseconds |
label | str | '' | Optional label drawn in the animation viewer |
output_path | str | None | None | Output HTML path; the GIF is written beside it |
callback | callable | None | None | Progress/message event handler |
wbe.topo_render
wbe.topo_render(input, palette='soft', reverse_palette=False, azimuth=315.0, altitude=30.0, clipping_polygon=None, background_hgt_offset=10.0, background_clr=(255, 255, 255, 255), attenuation_parameter=0.3, ambient_light=0.2, z_factor=1.0, max_dist=None, output_path=None, callback=None) -> Raster
Creates a pseudo-3D rendered topographic image using hypsometric tinting, hillshade, horizon-based shadowing, and distance attenuation.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM/DSM raster |
palette | str | 'soft' | Hypsometric palette name (atlas, high_relief, arid, earthtones, soft, muted, light_quant, turbo, purple, viridis, green_yellow, pink_yellow_green, blue_yellow_red, deep, imhof, blue_green_yellow, dem, grey, white/none) |
reverse_palette | bool | False | Reverse palette ordering |
azimuth | float | 315.0 | Light-source azimuth in degrees [0, 360] |
altitude | float | 30.0 | Light-source altitude in degrees [0, 90] |
clipping_polygon | Vector | None | None | Optional polygon vector mask; only DEM cells inside polygon(s) are rendered |
background_hgt_offset | float | 10.0 | Vertical offset from minimum DEM elevation to background plane |
background_clr | tuple[int,int,int,int] | (255, 255, 255, 255) | Background colour as RGBA |
attenuation_parameter | float | 0.3 | Distance attenuation exponent |
ambient_light | float | 0.2 | Ambient light amount in [0, 1] |
z_factor | float | 1.0 | Vertical exaggeration multiplier |
max_dist | float | None | None | Maximum horizon search distance in map units |
output_path | str | None | None | Output file path |
callback | callable | None | None | Progress/message event handler |
wbe.visibility_index
wbe.visibility_index(input, station_height=2.0, resolution_factor=8, max_dist=None, output_path=None, callback=None) -> Raster
Computes a terrain visibility index using sampled viewsheds.
wbe.viewshed
wbe.viewshed(input, stations, height=2.0, output_path=None, callback=None) -> Raster
Computes per-cell visibility counts from one or more viewing stations in a point vector layer.
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
station_height | float | 2.0 | Observer station height above terrain |
resolution_factor | int | 8 | Sampling resolution factor in [1, 25] |
max_dist | float | None | None | Maximum search distance in map units; omit for full extent |
output_path | str | None | None | Output file path |
callback | callable | None | None | Progress/message event handler |
Single-scale curvature signature
All single-scale curvature tools share this signature:
wbe.<tool>(input, z_factor=1.0, log_transform=False, output_path=None, callback=None) -> Raster
| Name | Type | Default | Description |
|---|---|---|---|
input | Raster | required | Input DEM raster |
z_factor | float | 1.0 | Z conversion factor |
log_transform | bool | False | Apply log transform to output values |
output_path | str | None | None | Output file path; omit to keep in memory |
callback | callable | None | None | Progress/message event handler |
Tier map
| Method | Tool ID | Tier |
|---|---|---|
wbe.slope(...) | slope | OSS |
wbe.aspect(...) | aspect | OSS |
wbe.convergence_index(...) | convergence_index | OSS |
wbe.contours_from_points(...) | contours_from_points | OSS |
wbe.contours_from_raster(...) | contours_from_raster | OSS |
wbe.dem_void_filling(...) | dem_void_filling | Pro |
wbe.max_branch_length(...) | max_branch_length | OSS |
wbe.hillshade(...) | hillshade | OSS |
wbe.multidirectional_hillshade(...) | multidirectional_hillshade | OSS |
wbe.ruggedness_index(...) | ruggedness_index | OSS |
wbe.surface_area_ratio(...) | surface_area_ratio | OSS |
wbe.elev_relative_to_min_max(...) | elev_relative_to_min_max | OSS |
wbe.wetness_index(...) | wetness_index | OSS |
wbe.relative_stream_power_index(...) | relative_stream_power_index | OSS |
wbe.sediment_transport_index(...) | sediment_transport_index | OSS |
wbe.elev_relative_to_watershed_min_max(...) | elev_relative_to_watershed_min_max | OSS |
wbe.percent_elev_range(...) | percent_elev_range | OSS |
wbe.relative_topographic_position(...) | relative_topographic_position | OSS |
wbe.num_downslope_neighbours(...) | num_downslope_neighbours | OSS |
wbe.num_upslope_neighbours(...) | num_upslope_neighbours | OSS |
wbe.max_downslope_elev_change(...) | max_downslope_elev_change | OSS |
wbe.max_upslope_elev_change(...) | max_upslope_elev_change | OSS |
wbe.min_downslope_elev_change(...) | min_downslope_elev_change | OSS |
wbe.elevation_percentile(...) | elevation_percentile | OSS |
wbe.downslope_index(...) | downslope_index | OSS |
wbe.elev_above_pit(...) | elev_above_pit | OSS |
wbe.elev_above_pit_dist(...) | elev_above_pit_dist | OSS |
wbe.circular_variance_of_aspect(...) | circular_variance_of_aspect | OSS |
wbe.hypsometric_analysis(...) | hypsometric_analysis | OSS |
wbe.profile(...) | profile | OSS |
wbe.hypsometrically_tinted_hillshade(...) | hypsometrically_tinted_hillshade | OSS |
wbe.slope_vs_aspect_plot(...) | slope_vs_aspect_plot | OSS |
wbe.slope_vs_elev_plot(...) | slope_vs_elev_plot | OSS |
wbe.directional_relief(...) | directional_relief | OSS |
wbe.exposure_towards_wind_flux(...) | exposure_towards_wind_flux | OSS |
wbe.fetch_analysis(...) | fetch_analysis | OSS |
wbe.relative_aspect(...) | relative_aspect | OSS |
wbe.edge_density(...) | edge_density | OSS |
wbe.find_ridges(...) | find_ridges | OSS |
wbe.assess_route(...) | assess_route | OSS |
wbe.breakline_mapping(...) | breakline_mapping | OSS |
wbe.geomorphons(...) | geomorphons | OSS |
wbe.pennock_landform_classification(...) | pennock_landform_classification | OSS |
wbe.spherical_std_dev_of_normals(...) | spherical_std_dev_of_normals | OSS |
wbe.average_normal_vector_angular_deviation(...) | average_normal_vector_angular_deviation | OSS |
wbe.difference_from_mean_elevation(...) | difference_from_mean_elevation | OSS |
wbe.deviation_from_mean_elevation(...) | deviation_from_mean_elevation | OSS |
wbe.standard_deviation_of_slope(...) | standard_deviation_of_slope | OSS |
wbe.feature_preserving_smoothing(...) | feature_preserving_smoothing | OSS |
wbe.fill_missing_data(...) | fill_missing_data | OSS |
wbe.remove_off_terrain_objects(...) | remove_off_terrain_objects | OSS |
wbe.low_points_on_headwater_divides(...) | low_points_on_headwater_divides | OSS |
wbe.map_off_terrain_objects(...) | map_off_terrain_objects | OSS |
wbe.embankment_mapping(...) | embankment_mapping | OSS |
wbe.local_hypsometric_analysis(...) | local_hypsometric_analysis | OSS |
wbe.smooth_vegetation_residual(...) | smooth_vegetation_residual | OSS |
wbe.max_difference_from_mean(...) | max_difference_from_mean | OSS |
wbe.max_anisotropy_dev(...) | max_anisotropy_dev | OSS |
wbe.max_anisotropy_dev_signature(...) | max_anisotropy_dev_signature | OSS |
wbe.max_elevation_deviation(...) | max_elevation_deviation | OSS |
wbe.max_elev_dev_signature(...) | max_elev_dev_signature | OSS |
wbe.multiscale_elevated_index(...) | multiscale_elevated_index | OSS |
wbe.multiscale_elevation_percentile(...) | multiscale_elevation_percentile | OSS |
wbe.multiscale_low_lying_index(...) | multiscale_low_lying_index | OSS |
wbe.multiscale_roughness(...) | multiscale_roughness | OSS |
wbe.multiscale_roughness_signature(...) | multiscale_roughness_signature | OSS |
wbe.multiscale_std_dev_normals(...) | multiscale_std_dev_normals | OSS |
wbe.multiscale_std_dev_normals_signature(...) | multiscale_std_dev_normals_signature | OSS |
wbe.multiscale_topographic_position_class(...) | multiscale_topographic_position_class | OSS |
wbe.multiscale_topographic_position_image(...) | multiscale_topographic_position_image | OSS |
wbe.horizon_angle(...) | horizon_angle | OSS |
wbe.sky_view_factor(...) | sky_view_factor | OSS |
wbe.horizon_area(...) | horizon_area | OSS |
wbe.average_horizon_distance(...) | average_horizon_distance | OSS |
wbe.skyline_analysis(...) | skyline_analysis | OSS |
wbe.time_in_daylight(...) | time_in_daylight | OSS |
wbe.shadow_image(...) | shadow_image | OSS |
wbe.shadow_animation(...) | shadow_animation | OSS |
wbe.topographic_hachures(...) | topographic_hachures | OSS |
wbe.topographic_position_animation(...) | topographic_position_animation | OSS |
wbe.topo_render(...) | topo_render | OSS |
wbe.visibility_index(...) | visibility_index | OSS |
wbe.viewshed(...) | viewshed | OSS |
wbe.plan_curvature(...) | plan_curvature | OSS |
wbe.profile_curvature(...) | profile_curvature | OSS |
wbe.tangential_curvature(...) | tangential_curvature | OSS |
wbe.total_curvature(...) | total_curvature | OSS |
wbe.mean_curvature(...) | mean_curvature | OSS |
wbe.gaussian_curvature(...) | gaussian_curvature | OSS |
wbe.minimal_curvature(...) | minimal_curvature | OSS |
wbe.maximal_curvature(...) | maximal_curvature | OSS |
wbe.shape_index(...) | shape_index | OSS |
wbe.curvedness(...) | curvedness | OSS |
wbe.unsphericity(...) | unsphericity | OSS |
wbe.ring_curvature(...) | ring_curvature | OSS |
wbe.rotor(...) | rotor | OSS |
wbe.difference_curvature(...) | difference_curvature | OSS |
wbe.horizontal_excess_curvature(...) | horizontal_excess_curvature | OSS |
wbe.vertical_excess_curvature(...) | vertical_excess_curvature | OSS |
wbe.accumulation_curvature(...) | accumulation_curvature | OSS |
wbe.generating_function(...) | generating_function | OSS |
wbe.principal_curvature_direction(...) | principal_curvature_direction | OSS |
wbe.casorati_curvature(...) | casorati_curvature | OSS |
wbe.openness(...) | openness | OSS |
wbe.multiscale_curvatures
wbe.multiscale_curvatures(
input,
curv_type='profile',
min_scale=4,
step=1,
num_steps=10,
step_nonlinearity=1.0,
log_transform=True,
standardize=False,
output_path=None,
callback=None,
) -> Raster
Tier: OSS
multiscale_curvatures always uses Gaussian scale-space smoothing by default. There is no hidden runtime switch to toggle to box smoothing.
Example
ms = wbe.multiscale_curvatures(
dem,
curv_type='shape_index',
min_scale=1,
step=2,
num_steps=8,
step_nonlinearity=1.0,
)
Basic terrain examples
slope_deg = wbe.slope(dem) # degrees
slope_pct = wbe.slope(dem, units='percent')
asp = wbe.aspect(dem)
hs = wbe.hillshade(dem, azimuth=315.0, altitude=30.0)
hs_steep = wbe.hillshade(dem, azimuth=270.0, altitude=45.0, z_factor=2.0)
mhs = wbe.multidirectional_hillshade(dem, altitude=30.0)
mhs_360 = wbe.multidirectional_hillshade(dem, altitude=30.0, full_360_mode=True)
tri = wbe.ruggedness_index(dem)
sar = wbe.surface_area_ratio(dem)
elev_pct = wbe.elev_relative_to_min_max(dem)
twi = wbe.wetness_index(sca, slope_deg)
rsp = wbe.relative_stream_power_index(sca, slope_deg)
sti = wbe.sediment_transport_index(sca, slope_deg)
erwm = wbe.elev_relative_to_watershed_min_max(dem, watersheds)
per = wbe.percent_elev_range(dem, filter_size_x=11)
rtp = wbe.relative_topographic_position(dem, filter_size_x=11)
n_dn = wbe.num_downslope_neighbours(dem)
max_drop = wbe.max_downslope_elev_change(dem)
min_drop = wbe.min_downslope_elev_change(dem)
diff_mean = wbe.difference_from_mean_elevation(dem, filter_size_x=11)
dev_mean = wbe.deviation_from_mean_elevation(dem, filter_size_x=11)
std_slope = wbe.standard_deviation_of_slope(dem, filter_size=11)
pos_open, neg_open = wbe.openness(dem, dist=20) # Pro: positive and negative openness
max_diff, max_scale = wbe.max_difference_from_mean(dem, min_scale=1, max_scale=100, step_size=2)
max_dev, dev_scale = wbe.max_elevation_deviation(dem, min_scale=1, max_scale=100, step_size=2)
mep, mep_scale = wbe.multiscale_elevation_percentile(dem, min_scale=4, max_scale=100, step_size=2, sig_digits=2)
# local_dev, meso_dev, and broad_dev are DEVmax rasters computed for distinct scale ranges.
mtp = wbe.multiscale_topographic_position_image(local_dev, meso_dev, broad_dev)
svf = wbe.sky_view_factor(dem, az_fraction=5.0)
hzn_ang = wbe.horizon_angle(dem, azimuth=315.0)
hzn_area = wbe.horizon_area(dem)
hzn_dist = wbe.average_horizon_distance(dem)
vis_idx = wbe.visibility_index(dem, station_height=2.0)
Openness tuple workflow
# 1) Compute positive and negative openness.
pos_open, neg_open = wbe.openness(dem, dist=20)
# 2) Visualize positive openness (ridges/peaks).
pos_hs = wbe.hillshade(pos_open, azimuth=315.0, altitude=30.0)
# 3) Visualize negative openness (valleys/basins).
neg_hs = wbe.hillshade(neg_open, azimuth=315.0, altitude=30.0)
max_difference_from_mean tuple workflow
# 1) Compute multiscale local-relief response.
max_diff, max_scale = wbe.max_difference_from_mean(
dem,
min_scale=1,
max_scale=75,
step_size=2,
)
# 2) Use magnitude for visualization or thresholding.
max_diff_hs = wbe.hillshade(max_diff, azimuth=315.0, altitude=35.0)
# 3) Use the scale raster to inspect dominant feature size.
# Larger values indicate broader landform scale.
max_scale.write("dominant_scale.tif")
Returns:
- first raster: maximum signed difference-from-mean magnitude.
- second raster: half-window radius (cells) at which the maximum absolute response occurs.
max_elevation_deviation tuple workflow
# 1) Compute multiscale standardized local-relief response (DEVmax).
max_dev, dev_scale = wbe.max_elevation_deviation(
dem,
min_scale=1,
max_scale=75,
step_size=2,
)
# 2) Visualize magnitude response.
max_dev_hs = wbe.hillshade(max_dev, azimuth=315.0, altitude=35.0)
# 3) Use scale raster to inspect dominant topographic-position scale.
dev_scale.write("dominant_dev_scale.tif")
Returns:
- first raster: maximum signed standardized deviation magnitude.
- second raster: half-window radius (cells) at which the maximum absolute response occurs.
DEVmax-to-MTP workflow (concrete scale ranges)
# Build three DEVmax rasters using distinct neighbourhood-scale ranges.
# Example ranges:
# local = 1..8 cells
# meso = 9..32 cells
# broad = 33..128 cells
local_dev, local_scale = wbe.max_elevation_deviation(
dem,
min_scale=1,
max_scale=8,
step_size=1,
)
meso_dev, meso_scale = wbe.max_elevation_deviation(
dem,
min_scale=9,
max_scale=32,
step_size=2,
)
broad_dev, broad_scale = wbe.max_elevation_deviation(
dem,
min_scale=33,
max_scale=128,
step_size=4,
)
# Optional illumination surface for visual clarity.
shade = wbe.multidirectional_hillshade(dem, altitude=35.0, full_360_mode=True)
# Compose the multiscale topographic position image.
mtp = wbe.multiscale_topographic_position_image(
local_dev,
meso_dev,
broad_dev,
hillshade=shade,
lightness=1.2,
output_path="mtp_local_meso_broad.tif",
)
Interpretation guide:
- blue-dominant areas: strongest topographic prominence at local scales
- green-dominant areas: strongest topographic prominence at meso scales
- red-dominant areas: strongest topographic prominence at broad scales
# Classify topographic position directly from the DEM using separate local and
# broad DEVmax scale ranges, and persist an optional confidence raster.
mstp = wbe.multiscale_topographic_position_class(
dem,
local_min_scale=5,
local_max_scale=80,
local_step_size=1,
broad_min_scale=500,
broad_max_scale=2000,
broad_step_size=20,
local_threshold=0.5,
broad_threshold=0.5,
output_path="mstp_class_map.tif",
output_confidence_path="mstp_class_confidence.tif",
)
Interpretation guide:
- 0-2: lowland settings, from hollow to knoll
- 3-5: intermediate settings, from hollow to knoll
- 6-8: upland settings, from hollow to knoll
mstp_class_confidence.tif: optional confidence raster in the range [0, 1]
multiscale_elevation_percentile tuple workflow
# 1) Compute multiscale elevation percentile response.
mep, mep_scale = wbe.multiscale_elevation_percentile(
dem,
min_scale=4,
max_scale=100,
step_size=2,
sig_digits=2,
)
# 2) Visualize extreme percentile magnitude.
mep_hs = wbe.hillshade(mep, azimuth=315.0, altitude=35.0)
# 3) Inspect the scale of strongest percentile response.
mep_scale.write("multiscale_elevation_percentile_scale.tif")
Returns:
- first raster: most extreme elevation percentile (furthest from 50).
- second raster: half-window radius (cells) where that extreme percentile occurs.
Single-scale examples
plan = wbe.plan_curvature(dem, z_factor=1.0)
mean = wbe.mean_curvature(dem, z_factor=1.0, log_transform=False)
minc = wbe.minimal_curvature(dem, z_factor=1.0)
genf = wbe.generating_function(dem, z_factor=1.0)
pcd = wbe.principal_curvature_direction(dem, z_factor=1.0)
Precision Agriculture
Whitebox Workflows for Python — Precision Agriculture Tools
This document covers Precision Agriculture workflows exposed through the WbEnvironment API.
For common conventions, Raster I/O, and math operators see TOOLS.md.
Precision Agriculture
Precision agriculture in the Python API is exposed as a packaged Pro workflow. The former standalone helper methods are intentionally not exposed in the public Python surface.
Workflow Product Index
wbe.yield_data_conditioning_and_qawbe.precision_irrigation_optimizationwbe.precision_ag_yield_zone_intelligence
wbe.yield_data_conditioning_and_qa
yield_data_conditioning_and_qa(
input: Vector,
output_prefix: str = "yield_pipeline",
yield_field_name: str = "YIELD",
profile: str = "balanced",
swath_width: float = 6.096,
edge_radius: float | None = None,
reconcile_radius: float | None = None,
normalization_radius: float | None = None,
z_score_threshold: float | None = None,
min_yield: float | None = None,
max_yield: float | None = None,
mean_tonnage: float | None = None,
header_field_name: str = "HEADER",
use_field_aliases: bool = True,
moisture_field_name: str | None = None,
target_moisture_pct: float = 15.5,
speed_field_name: str | None = None,
heading_field_name: str | None = None,
min_speed_kmh: float = 1.0,
max_speed_kmh: float = 18.0,
max_heading_change_deg: float = 35.0,
lag_correction_mode: str = "none",
lag_distance_m: float = 0.0,
filtering_mode: str = "standard",
robust_mad_threshold: float = 3.0,
standardize: bool = False,
ignore_zeros: bool = False,
max_change_in_heading: float = 25.0,
callback: callable | None = None,
) -> tuple[Vector, Vector, Vector, Vector, str]
Returns a 5-tuple in this order:
qa_flags_vectorclean_points_vectorclean_map_vectorconfidence_points_vectorsummary_json_path
Example
qa_flags, clean_points, clean_map, confidence_points, summary_json = wbe.yield_data_conditioning_and_qa(
input=yield_points,
output_prefix='output/yield_pipeline',
profile='balanced',
use_field_aliases=True,
filtering_mode='robust',
)
wbe.precision_irrigation_optimization
precision_irrigation_optimization(
dem: Raster,
field_boundary: Vector,
output_prefix: str = "irrigation_opt",
profile: str = "balanced",
callback: callable | None = None,
) -> tuple[Raster, Raster, Vector, str]
Returns a 4-tuple in this order:
irrigation_demand_rasterstress_risk_rastermanagement_zones_vectorsummary_json_path
Example
demand, stress, zones, summary = wbe.precision_irrigation_optimization(
dem=dem,
field_boundary=field_boundary,
profile='balanced',
)
wbe.precision_ag_yield_zone_intelligence
precision_ag_yield_zone_intelligence(
dem: Raster,
field_boundary: Vector,
output_prefix: str = "yield_zone_intelligence",
callback: callable | None = None,
) -> tuple[Raster, Raster, Vector, str]
Returns a 4-tuple in this order:
yield_stability_rasternutrient_transport_rastermanagement_zones_vectorsummary_json_path
Example
stability, nutrient, zones, summary = wbe.precision_ag_yield_zone_intelligence(
dem=dem,
field_boundary=field_boundary,
)
LiDAR Processing
LiDAR Processing Tools
This document defines the LiDAR processing porting roadmap and CRS requirements for the backend migration. Tool-level API reference entries will be added here as each tool is ported.
For shared conventions (paths, callback payloads, optional output_path behavior), see TOOLS.md.
Overview
LiDAR processing tools consume point-cloud datasets (LAS/LAZ/COPC/PLY/E57 via wblidar) and produce one or more of:
- LiDAR outputs (filtered/modified point clouds)
- Raster outputs (grids, interpolations, density, DSM/DTM-style derivatives)
- Vector outputs (contours, footprints, TIN-based products)
- Diagnostic products (metadata/statistics)
Implementation Priorities
- Phase 1: LiDAR-to-raster interpolation and gridding tools.
- Phase 2: LiDAR-to-LiDAR processing tools.
- Phase 3: LiDAR-to-vector and specialized diagnostics/analysis tools.
Current migration status and canonical API guidance are tracked in v2_migration_guide.md and internal/wbw_py_wbw_r_parity_ledger.md.
CRS Policy (Required)
These requirements are mandatory for all new LiDAR ports.
- LiDAR-to-raster outputs must inherit CRS metadata from input LiDAR.
- If source has EPSG, set raster CRS EPSG.
- If source has WKT only, set raster CRS WKT.
- If both exist, preserve both.
- Multi-input LiDAR tools must run in a single reference CRS.
- If all inputs already match, proceed directly.
- If inputs differ but are transformable, reproject to a common reference CRS before interpolation/aggregation.
- If CRS cannot be resolved, fail fast with a clear validation error.
- LiDAR-to-vector outputs must carry LiDAR CRS.
- Output vector layer CRS must be assigned from source/reference LiDAR CRS.
- Tests are required for CRS behavior.
- EPSG-only input
- WKT-only input
- Mismatched multi-input CRS
- Missing CRS metadata failure mode
First Batch Targets
- lidar_nearest_neighbour_gridding
- lidar_idw_interpolation
- lidar_tin_gridding
- lidar_radial_basis_function_interpolation
- lidar_sibson_interpolation
Rationale:
- high user impact
- representative interpolation pathways
- establishes reusable CRS propagation/alignment patterns for all other LiDAR-to-raster tools
Current Python API
The following convenience methods are available on WbEnvironment:
lidar_nearest_neighbour_gridding(input=None, resolution=1.0, search_radius=2.5, interpolation_parameter="elevation", returns_included="all", excluded_classes=None, min_elev=None, max_elev=None, output_path=None, callback=None)lidar_idw_interpolation(input=None, resolution=1.0, weight=1.0, search_radius=2.5, interpolation_parameter="elevation", returns_included="all", excluded_classes=None, min_elev=None, max_elev=None, min_points=1, output_path=None, callback=None)lidar_tin_gridding(input=None, resolution=1.0, max_triangle_edge_length=inf, interpolation_parameter="elevation", returns_included="all", excluded_classes=None, min_elev=None, max_elev=None, output_path=None, callback=None)lidar_radial_basis_function_interpolation(input=None, resolution=1.0, num_points=15, search_radius=0.0, func_type="thinplatespline", poly_order="none", weight=0.1, interpolation_parameter="elevation", returns_included="all", excluded_classes=None, min_elev=None, max_elev=None, output_path=None, callback=None)lidar_sibson_interpolation(input=None, resolution=1.0, interpolation_parameter="elevation", returns_included="all", excluded_classes=None, min_elev=None, max_elev=None, output_path=None, callback=None)lidar_block_maximum(input=None, resolution=1.0, interpolation_parameter="elevation", returns_included="all", excluded_classes=None, min_elev=None, max_elev=None, output_path=None, callback=None)lidar_block_minimum(input=None, resolution=1.0, interpolation_parameter="elevation", returns_included="all", excluded_classes=None, min_elev=None, max_elev=None, output_path=None, callback=None)lidar_point_density(input=None, resolution=1.0, search_radius=2.5, returns_included="all", excluded_classes=None, min_elev=None, max_elev=None, output_path=None, callback=None)lidar_digital_surface_model(input=None, resolution=1.0, search_radius=0.5, min_elev=None, max_elev=None, max_triangle_edge_length=inf, output_path=None, callback=None)lidar_hillshade(input=None, resolution=1.0, search_radius=-1.0, azimuth=315.0, altitude=30.0, returns_included="all", excluded_classes=None, min_elev=None, max_elev=None, output_path=None, callback=None)filter_lidar_classes(input=None, excluded_classes=None, output_path=None, callback=None)lidar_shift(input=None, x_shift=0.0, y_shift=0.0, z_shift=0.0, output_path=None, callback=None)remove_duplicates(input=None, include_z=False, output_path=None, callback=None)filter_lidar_scan_angles(input=None, threshold=0, output_path=None, callback=None)filter_lidar_noise(input=None, output_path=None, callback=None)lidar_thin(input=None, resolution=1.0, method="first", save_filtered=False, output_path=None, filtered_output_path=None, callback=None)lidar_elevation_slice(input=None, minz=-inf, maxz=inf, classify=False, in_class_value=2, out_class_value=1, output_path=None, callback=None)lidar_join(inputs, output_path=None, callback=None)lidar_thin_high_density(input=None, density=1.0, resolution=1.0, save_filtered=False, output_path=None, filtered_output_path=None, callback=None)lidar_tile(input, tile_width=1000.0, tile_height=1000.0, origin_x=0.0, origin_y=0.0, min_points_in_tile=2, output_laz_format=True, output_directory=None, callback=None)sort_lidar(sort_criteria, input=None, output_path=None, callback=None)filter_lidar_by_percentile(input=None, percentile=0.0, block_size=1.0, output_path=None, callback=None)split_lidar(split_criterion, input=None, interval=5.0, min_pts=5, output_directory=None, callback=None)lidar_remove_outliers(input=None, search_radius=2.0, elev_diff=50.0, use_median=False, classify=False, output_path=None, callback=None)normalize_lidar(input, dtm, no_negatives=False, output_path=None, callback=None)height_above_ground(input, output_path=None, callback=None)lidar_ground_point_filter(input=None, search_radius=2.0, min_neighbours=0, slope_threshold=45.0, height_threshold=1.0, classify=False, height_above_ground=False, output_path=None, callback=None)filter_lidar(statement, input=None, output_path=None, callback=None)modify_lidar(statement, input=None, output_path=None, callback=None)filter_lidar_by_reference_surface(input, ref_surface, query="within", threshold=0.0, classify=False, true_class_value=2, false_class_value=1, preserve_classes=False, output_path=None, callback=None)classify_lidar(input=None, search_radius=2.5, grd_threshold=0.1, oto_threshold=1.0, linearity_threshold=0.5, planarity_threshold=0.85, num_iter=30, facade_threshold=0.5, output_path=None, callback=None)classify_buildings_in_lidar(in_lidar, building_footprints, output_path=None, callback=None)ascii_to_las(input_ascii_files, pattern, epsg_code=4326, output_directory=None, callback=None)las_to_ascii(input=None, output_path=None, callback=None)select_tiles_by_polygon(input_directory, output_directory, polygons, callback=None)lidar_info(input, output_path=None, show_point_density=True, show_vlrs=True, show_geokeys=True, callback=None)lidar_histogram(input, output_path=None, parameter="elevation", clip_percent=1.0, callback=None)lidar_point_stats(input=None, resolution=1.0, num_points=False, num_pulses=False, avg_points_per_pulse=False, z_range=False, intensity_range=False, predominant_class=False, output_directory=None, callback=None)lidar_contour(input=None, contour_interval=10.0, base_contour=0.0, smooth=5, interpolation_parameter="elevation", returns_included="all", excluded_classes=None, min_elev=-inf, max_elev=inf, max_triangle_edge_length=inf, output_path=None, callback=None)lidar_tile_footprint(input=None, output_hulls=False, output_path=None, callback=None)las_to_shapefile(input=None, output_multipoint=False, output_path=None, callback=None)lidar_construct_vector_tin(input=None, returns_included="all", excluded_classes=None, min_elev=-inf, max_elev=inf, max_triangle_edge_length=inf, output_path=None, callback=None)lidar_hex_bin(input, width, orientation="h", output_path=None, callback=None)lidar_point_return_analysis(input, create_output=False, output_path=None, report_path=None, callback=None)flightline_overlap(input=None, resolution=1.0, output_path=None, callback=None)recover_flightline_info(input, max_time_diff=5.0, pt_src_id=False, user_data=False, rgb=False, output_path=None, callback=None)find_flightline_edge_points(input, output_path=None, callback=None)lidar_tophat_transform(input, search_radius, output_path=None, callback=None)normal_vectors(input, search_radius=-1.0, output_path=None, callback=None)lidar_kappa(classification_lidar, reference_lidar, report_path, resolution=1.0, output_class_accuracy=False, output_path=None, callback=None)lidar_eigenvalue_features(input=None, num_neighbours=None, search_radius=None, output_path=None, callback=None)lidar_ransac_planes(input, search_radius=2.0, num_iterations=50, num_samples=10, inlier_threshold=0.15, acceptable_model_size=30, max_planar_slope=75.0, classify=False, only_last_returns=False, output_path=None, callback=None)lidar_rooftop_analysis(lidar_inputs, building_footprints, search_radius=2.0, num_iterations=50, num_samples=10, inlier_threshold=0.15, acceptable_model_size=30, max_planar_slope=75.0, norm_diff_threshold=2.0, azimuth=180.0, altitude=30.0, output_path=None, callback=None)lidar_qa_and_confidence(input, profile="balanced", block_size=1.0, max_building_size=150.0, slope_threshold=15.0, elev_threshold=0.15, high_confidence_threshold=0.8, output_prefix=None, output_path=None, callback=None)lidar_terrain_product_suite(input, profile="balanced", block_size=1.0, max_building_size=150.0, slope_threshold=15.0, elev_threshold=0.15, z_factor=1.0, hillshade_azimuth=315.0, hillshade_altitude=45.0, high_confidence_threshold=0.8, output_prefix=None, output_path=None, callback=None)utility_corridor_encroachment_intelligence(input, corridors, profile="balanced", resolution=2.0, risk_height_threshold=3.0, corridor_influence_distance=60.0, priority_zone_threshold=None, max_zone_features=5000, output_prefix=None, callback=None)forestry_structure_and_biomass_intelligence(input, profile="balanced", resolution=2.0, stand_block_cells=12, biomass_cap=25.0, output_prefix=None, callback=None)
Notes:
returns_includedsupportsall,first, andlast.interpolation_parametersupportselevation,intensity,class,return_number,number_of_returns,scan_angle,time,rgb, anduser_data.excluded_classesaccepts integer classes (e.g.,[7, 18]in Python).- Backend tools now support legacy-style batch mode when
inputis omitted for all currently ported LiDAR raster tools. - In batch mode, the backend scans the current working directory for supported LiDAR formats (LAS, LAZ, COPC, PLY, E57), processes tiles in parallel, and writes per-tile GeoTIFF outputs with tool-specific suffixes.
- For interpolation tools, batch mode also includes points from neighboring batch tiles when processing each target tile, which helps reduce interpolation edge effects at tile boundaries.
- Python convenience methods now accept
input=Noneto trigger backend batch mode. - In batch mode, the returned Python
Rasteris a placeholder pointing to the first written output tile; all batch outputs are written directly to disk and not retained as in-memory raster objects. - For LiDAR-to-LiDAR tools in batch mode, the returned Python
Lidaris similarly a placeholder path to the first written output tile, while all batch outputs are written directly to disk.
Per-Tool Parameter Notes
lidar_nearest_neighbour_gridding
- Use when preserving local point values is preferred over smoothing.
search_radiuscontrols nodata behavior away from points.- Backend batch-mode suffix:
_nn.tif. - In backend batch mode, each target tile can include neighboring tile points for edge-effect reduction.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_nearest_neighbour_gridding(
input="value",
resolution=1.0,
search_radius=1.0,
interpolation_parameter=1,
returns_included,
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
search_radius | float | no | Numeric parameter for search_radius. |
interpolation_parameter | Literal["elevation", "intensity", "class", "return_number", "number_of_returns", "scan_angle", "time", "rgb", "user_data"] | no | Numeric parameter for interpolation_parameter. |
returns_included | Literal["all", "first", "last"] | no | Optional parameter returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_idw_interpolation
weightcontrols distance decay. Higher values emphasize closer points.search_radius <= 0triggers k-nearest fallback;min_pointscontrols k.- Backend batch-mode suffix:
_idw.tif. - In backend batch mode, each target tile can include neighboring tile points for edge-effect reduction.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_idw_interpolation(
input="value",
resolution=1.0,
weight=1.0,
search_radius=1.0,
interpolation_parameter=1,
returns_included,
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
min_points=1,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
weight | float | no | Numeric parameter for weight. |
search_radius | float | no | Numeric parameter for search_radius. |
interpolation_parameter | Literal["elevation", "intensity", "class", "return_number", "number_of_returns", "scan_angle", "time", "rgb", "user_data"] | no | Numeric parameter for interpolation_parameter. |
returns_included | Literal["all", "first", "last"] | no | Optional parameter returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
min_points | int | no | Numeric parameter for min_points. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_tin_gridding
- Uses Delaunay triangles with barycentric interpolation.
max_triangle_edge_length <= 0means no edge-length limit.- Backend batch-mode suffix:
_tin.tif. - In backend batch mode, each target tile can include neighboring tile points for edge-effect reduction.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_tin_gridding(
input="value",
resolution=1.0,
max_triangle_edge_length=1.0,
interpolation_parameter=1,
returns_included,
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
triangulation_backend,
triangulation_auto_threshold=1,
triangulation_epsilon=1.0,
triangulation_thin_cell_size=1.0,
triangulation_thin_method,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
max_triangle_edge_length | float | no | Numeric parameter for max_triangle_edge_length. |
interpolation_parameter | Literal["elevation", "intensity", "class", "return_number", "number_of_returns", "scan_angle", "time", "rgb", "user_data"] | no | Numeric parameter for interpolation_parameter. |
returns_included | Literal["all", "first", "last"] | no | Optional parameter returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
triangulation_backend | Literal["auto", "delaunator", "wbtopology"] | no | Optional parameter triangulation_backend. |
triangulation_auto_threshold | int | no | Numeric parameter for triangulation_auto_threshold. |
triangulation_epsilon | float | no | Numeric parameter for triangulation_epsilon. |
triangulation_thin_cell_size | float | no | Numeric parameter for triangulation_thin_cell_size. |
triangulation_thin_method | Literal["nearest_center", "min_value", "max_value"] | no | Optional parameter triangulation_thin_method. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_radial_basis_function_interpolation
num_pointssets the local neighbourhood size.func_typeoptions:thinplatespline,polyharmonic,gaussian,multiquadric,inversemultiquadric.poly_ordercontrols local polynomial trend correction:none,constant, orquadratic.- Backend batch-mode suffix:
_rbf.tif. - In backend batch mode, each target tile can include neighboring tile points for edge-effect reduction.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_radial_basis_function_interpolation(
input="value",
resolution=1.0,
num_points=1,
search_radius=1.0,
func_type,
poly_order,
weight=1.0,
interpolation_parameter=1,
returns_included,
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
num_points | int | no | Numeric parameter for num_points. |
search_radius | float | no | Numeric parameter for search_radius. |
func_type | Literal["thinplatespline", "polyharmonic", "gaussian", "multiquadric", "inversemultiquadric"] | no | Optional parameter func_type. |
poly_order | Literal["none", "constant", "quadratic"] | no | Optional parameter poly_order. |
weight | float | no | Numeric parameter for weight. |
interpolation_parameter | Literal["elevation", "intensity", "class", "return_number", "number_of_returns", "scan_angle", "time", "rgb", "user_data"] | no | Numeric parameter for interpolation_parameter. |
returns_included | Literal["all", "first", "last"] | no | Optional parameter returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_sibson_interpolation
- True Sibson natural-neighbour interpolation intended for smooth terrain surfaces.
- No explicit weight/radius tuning parameter is required for common use.
- Backend batch-mode suffix:
_sibson.tif. - In backend batch mode, each target tile can include neighboring tile points for edge-effect reduction.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_sibson_interpolation(
input="value",
resolution=1.0,
interpolation_parameter=1,
returns_included,
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
interpolation_parameter | Literal["elevation", "intensity", "class", "return_number", "number_of_returns", "scan_angle", "time", "rgb", "user_data"] | no | Numeric parameter for interpolation_parameter. |
returns_included | Literal["all", "first", "last"] | no | Optional parameter returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_block_maximum
- Computes a cell-wise maximum from filtered LiDAR points for rapid surface approximation.
- Backend batch-mode suffix:
_block_max.tif.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_block_maximum(
input="value",
resolution=1.0,
interpolation_parameter=1,
returns_included,
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
interpolation_parameter | Literal["elevation", "intensity", "class", "return_number", "number_of_returns", "scan_angle", "time", "rgb", "user_data"] | no | Numeric parameter for interpolation_parameter. |
returns_included | Literal["all", "first", "last"] | no | Optional parameter returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_block_minimum
- Computes a cell-wise minimum from filtered LiDAR points for rapid lower-envelope approximation.
- Backend batch-mode suffix:
_block_min.tif.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_block_minimum(
input="value",
resolution=1.0,
interpolation_parameter=1,
returns_included,
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
interpolation_parameter | Literal["elevation", "intensity", "class", "return_number", "number_of_returns", "scan_angle", "time", "rgb", "user_data"] | no | Numeric parameter for interpolation_parameter. |
returns_included | Literal["all", "first", "last"] | no | Optional parameter returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_point_density
- Counts nearby points around each cell center within
search_radiusand reports density per area. - Backend batch-mode suffix:
_density.tif.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.analysis_metrics.lidar_point_density(
input="value",
resolution=1.0,
search_radius=1.0,
returns_included,
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
search_radius | float | no | Numeric parameter for search_radius. |
returns_included | Literal["all", "first", "last"] | no | Optional parameter returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_digital_surface_model
- Uses local top-surface candidate filtering and TIN gridding for a DSM-style output.
- Supports
max_triangle_edge_lengthmasking for long-edge facet suppression. - Backend batch-mode suffix:
_dsm.tif.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_digital_surface_model(
input="value",
resolution=1.0,
search_radius=1.0,
min_elev=1.0,
max_elev=1.0,
max_triangle_edge_length=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
search_radius | float | no | Numeric parameter for search_radius. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
max_triangle_edge_length | float | no | Numeric parameter for max_triangle_edge_length. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_hillshade
- Derives a hillshade raster from LiDAR-derived local surface values.
- Supports illumination controls via
azimuthandaltitude. - Supports optional
search_radiuscompatibility parameter for legacy call-shape parity. - Backend batch-mode suffix:
_hillshade.tif.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_hillshade(
input="value",
resolution=1.0,
search_radius=1.0,
azimuth=1.0,
altitude=1.0,
returns_included,
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
search_radius | float | no | Numeric parameter for search_radius. |
azimuth | float | no | Numeric parameter for azimuth. |
altitude | float | no | Numeric parameter for altitude. |
returns_included | Literal["all", "first", "last"] | no | Optional parameter returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_contour
- Builds contour lines from LiDAR points using TIN-based contouring.
- Supports interval/base controls, interpolation parameter selection, returns/class filters, and optional triangle-edge-length masking.
- In batch mode (
input=None), processes all LiDAR files in the working directory and writes sibling contour shapefiles.
Outputs
return:Vector
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_contour(
input="value",
contour_interval=1.0,
base_contour=1.0,
smooth=1,
interpolation_parameter="value",
returns_included="value",
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
max_triangle_edge_length=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
contour_interval | float | no | Numeric parameter for contour_interval. |
base_contour | float | no | Numeric parameter for base_contour. |
smooth | int | no | Numeric parameter for smooth. |
interpolation_parameter | string | no | String parameter for interpolation_parameter. |
returns_included | string | no | String parameter for returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
max_triangle_edge_length | float | no | Numeric parameter for max_triangle_edge_length. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_tile_footprint
- Generates polygon footprints per tile with summary attributes (
LAS_NM,NUM_PNTS,Z_MIN,Z_MAX). - Writes bounding boxes by default; set
output_hulls=Trueto write convex hull footprints. - In batch mode (
input=None), writes a single combined footprint layer for all LiDAR tiles in the working directory.
Outputs
return:Vector
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_tile_footprint(
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
output_hulls | bool | no | Boolean option for output_hulls. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
las_to_shapefile
- Converts LiDAR points to vector output.
- By default writes one point feature per LiDAR point with key attributes (
Z,INTENSITY,CLASS, return fields). - If
output_multipoint=True, writes a single multipoint feature instead. - In batch mode (
input=None), writes one shapefile per LiDAR tile in the working directory.
Outputs
return:Vector
WbEnvironment usage
result = wbe.lidar.io_management.las_to_shapefile(
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
output_multipoint | bool | no | Boolean option for output_multipoint. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_construct_vector_tin
- Builds a triangular mesh vector layer directly from LiDAR points using Delaunay triangulation.
- Supports return filtering, class filtering, elevation limits, and optional max triangle-edge filtering.
- In batch mode (
input=None), writes one_tin.shpoutput per LiDAR tile in the working directory.
Outputs
return:Vector
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_construct_vector_tin(
input="value",
returns_included="value",
[excluded_classes_1, excluded_classes_2],
min_elev=1.0,
max_elev=1.0,
max_triangle_edge_length=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
returns_included | string | no | String parameter for returns_included. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
min_elev | float | no | Numeric parameter for min_elev. |
max_elev | float | no | Numeric parameter for max_elev. |
max_triangle_edge_length | float | no | Numeric parameter for max_triangle_edge_length. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_hex_bin
- Bins LiDAR points to a hexagonal polygon grid and summarizes per-cell point count and min/max z/intensity.
widthsets the distance between opposite hex sides.orientationsupportsh(pointy-up) andv(flat-up).
Outputs
return:Vector
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_hex_bin(
input="value",
width=1.0,
orientation="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
width | float | yes | Numeric parameter for width. |
orientation | string | no | String parameter for orientation. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_point_return_analysis
- Produces a return-sequence quality-control report (
report_path) covering missing returns, duplicates, andr > nanomalies. - If
create_output=True, also writes a classified QC LiDAR output (output) with class assignments for problematic return groups.
Outputs
return:str
WbEnvironment usage
result = wbe.lidar.analysis_metrics.lidar_point_return_analysis(
input="value",
output_path="result.tif",
report_path="report.dat",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
create_output | bool | no | Boolean option for create_output. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
report_path | string | no | Path value for report. |
callback | function | no | Optional progress callback receiving JSON events. |
flightline_overlap
- Builds a raster whose cell values equal the number of distinct
point_source_idvalues present in each cell. - In batch mode (
input=None), scans the working directory for LiDAR tiles and writes one_flightline_overlap.tifraster per tile.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.flightline_overlap(
input="value",
resolution=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
recover_flightline_info
- Sorts points by GPS time and starts a new inferred flightline when the time gap exceeds
max_time_diffseconds. - Writes inferred flightline identifiers into any combination of
point_source_id,user_data, and RGB. - If no output field flags are enabled, RGB output is enabled automatically.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.io_management.recover_flightline_info(
input="value",
max_time_diff=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
max_time_diff | float | no | Numeric parameter for max_time_diff. |
pt_src_id | bool | no | Boolean option for pt_src_id. |
user_data | bool | no | Boolean option for user_data. |
rgb | bool | no | Boolean option for rgb. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
find_flightline_edge_points
- Filters the input LiDAR to only points carrying the LAS
edge_of_flight_lineflag. - Returns a LiDAR output containing just the edge points.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.analysis_metrics.find_flightline_edge_points(
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_tophat_transform
- Applies a white top-hat transform to point elevations by subtracting a locally opened surface from each point z value.
search_radiuscontrols the XY neighbourhood used for the erosion and dilation steps.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.io_management.lidar_tophat_transform(
input="value",
search_radius=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
search_radius | float | yes | Numeric parameter for search_radius. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
normal_vectors
- Estimates local plane normals from neighbouring points and writes a compatibility color encoding based on normal direction.
- If
search_radius <= 0, the backend estimates a nominal point spacing and derives a default neighbourhood size automatically.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.analysis_metrics.normal_vectors(
input="value",
search_radius=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
search_radius | float | no | Numeric parameter for search_radius. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_kappa
- Compares classifications in two LiDAR datasets using nearest-point matching and writes an HTML agreement report.
- Also writes a raster of per-cell classification agreement percentages at
resolution. output_class_accuracyis accepted for legacy call-shape parity; the class-agreement raster is produced regardless.
Outputs
return:Raster
WbEnvironment usage
result = wbe.lidar.analysis_metrics.lidar_kappa(
classification_lidar="value",
reference_lidar="value",
report_path="report.dat",
resolution=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
classification_lidar | Lidar | yes | Input LiDAR dataset for classification_lidar. |
reference_lidar | Lidar | yes | Input LiDAR dataset for reference_lidar. |
report_path | string | yes | Path value for report. |
resolution | float | no | Numeric parameter for resolution. |
output_class_accuracy | bool | no | Boolean option for output_class_accuracy. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_eigenvalue_features
- Computes local PCA-based neighbourhood features and writes a binary
.eigenoutput plus a JSON schema sidecar. - Supports single-file mode (
input=...) and working-directory batch mode (input=None). num_neighboursmust be at least7when specified;search_radiuscan be used alone or together with neighbour-count limiting.
Outputs
return:str
WbEnvironment usage
result = wbe.lidar.analysis_metrics.lidar_eigenvalue_features(
input="value",
num_neighbours=1,
search_radius=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
num_neighbours | int | no | Numeric parameter for num_neighbours. |
search_radius | float | no | Numeric parameter for search_radius. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_ransac_planes
- Uses local RANSAC plane fitting to identify planar points.
- If
classify=False, non-planar points are filtered out; ifclassify=True, all points are retained and tagged as planar vs non-planar by class value. only_last_returns=Truerestricts model fitting to late returns.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.analysis_metrics.lidar_ransac_planes(
input="value",
search_radius=1.0,
num_iterations=1,
num_samples=1,
inlier_threshold=1.0,
acceptable_model_size=1,
max_planar_slope=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
search_radius | float | no | Numeric parameter for search_radius. |
num_iterations | int | no | Numeric parameter for num_iterations. |
num_samples | int | no | Numeric parameter for num_samples. |
inlier_threshold | float | no | Numeric parameter for inlier_threshold. |
acceptable_model_size | int | no | Numeric parameter for acceptable_model_size. |
max_planar_slope | float | no | Numeric parameter for max_planar_slope. |
classify | bool | no | Boolean option for classify. |
only_last_returns | bool | no | Boolean option for only_last_returns. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_rooftop_analysis
- Identifies rooftop facets inside
building_footprintsand writes polygon output with rooftop attributes such asMAX_ELEV,HILLSHADE,SLOPE,ASPECT, andAREA. lidar_inputsaccepts one or more LiDAR tiles covering the buildings of interest.- Current parity implementation outputs convex-hull roof facets per detected planar segment.
Outputs
return:Vector
WbEnvironment usage
result = wbe.lidar.analysis_metrics.lidar_rooftop_analysis(
[lidar_inputs_1, lidar_inputs_2],
building_footprints,
search_radius=1.0,
num_iterations=1,
num_samples=1,
inlier_threshold=1.0,
acceptable_model_size=1,
max_planar_slope=1.0,
norm_diff_threshold=1.0,
azimuth=1.0,
altitude=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lidar_inputs | Lidar | yes | Input LiDAR dataset for lidar_inputs. |
building_footprints | Vector | yes | Input vector layer for building_footprints. |
search_radius | float | no | Numeric parameter for search_radius. |
num_iterations | int | no | Numeric parameter for num_iterations. |
num_samples | int | no | Numeric parameter for num_samples. |
inlier_threshold | float | no | Numeric parameter for inlier_threshold. |
acceptable_model_size | int | no | Numeric parameter for acceptable_model_size. |
max_planar_slope | float | no | Numeric parameter for max_planar_slope. |
norm_diff_threshold | float | no | Numeric parameter for norm_diff_threshold. |
azimuth | float | no | Numeric parameter for azimuth. |
altitude | float | no | Numeric parameter for altitude. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_qa_and_confidence
- Runs a QA workflow that classifies/filters ground points and produces DTM, confidence, uncertainty, QA flags, and summary outputs.
- Returns a tuple of
(classified_lidar, dtm, confidence, uncertainty, qa_flags, summary_path). profilesupportsstrict,balanced, andpermissive.
Outputs
Returned as tuple[Lidar, Raster, Raster, Raster, Raster, str] in this order:
classified_lidar:Lidardtm:Rasterconfidence:Rasteruncertainty:Rasterqa_flags:Rastersummary:str
WbEnvironment usage
classified_lidar, dtm, confidence, uncertainty, qa_flags, summary = wbe.lidar.workflow_products.lidar_qa_and_confidence(
input,
profile="value",
block_size=1.0,
max_building_size=1.0,
slope_threshold=1.0,
elev_threshold=1.0,
high_confidence_threshold=1.0,
output_prefix="output/result",
output_path="output_path.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
profile | string | yes | String parameter for profile. |
block_size | float | yes | Numeric parameter for block_size. |
max_building_size | float | yes | Numeric parameter for max_building_size. |
slope_threshold | float | yes | Numeric parameter for slope_threshold. |
elev_threshold | float | yes | Numeric parameter for elev_threshold. |
high_confidence_threshold | float | yes | Numeric parameter for high_confidence_threshold. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
output_path | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_terrain_product_suite
- Runs an end-to-end terrain product workflow and outputs DTM, DSM, slope, hillshade, confidence, uncertainty, metadata summary, and optional classified lidar.
- Returns
(dtm, dsm, slope, hillshade, confidence, uncertainty, metadata_path, classified_lidar_optional). profilesupportsstrict,balanced, andpermissive.
Outputs
Returned as tuple[Raster, Vector, Vector, Raster, str] in this order:
risk:Rasterzones:Vectortable:Vectorconfidence:Rastersummary:str
WbEnvironment usage
risk, zones, table, confidence, summary = wbe.lidar.workflow_products.lidar_terrain_product_suite(
input,
profile="value",
block_size=1.0,
max_building_size=1.0,
slope_threshold=1.0,
elev_threshold=1.0,
z_factor=1.0,
hillshade_azimuth=1.0,
hillshade_altitude=1.0,
high_confidence_threshold=1.0,
output_prefix="output/result",
output_path="output_path.tif",
) -> PyResult<(Raster, Raster, Raster, Raster, Raster, Raster, String, Option<Lidar>)> {
let mut args = serde_json,
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
profile | string | yes | String parameter for profile. |
block_size | float | yes | Numeric parameter for block_size. |
max_building_size | float | yes | Numeric parameter for max_building_size. |
slope_threshold | float | yes | Numeric parameter for slope_threshold. |
elev_threshold | float | yes | Numeric parameter for elev_threshold. |
z_factor | float | yes | Numeric parameter for z_factor. |
hillshade_azimuth | float | yes | Numeric parameter for hillshade_azimuth. |
hillshade_altitude | float | yes | Numeric parameter for hillshade_altitude. |
high_confidence_threshold | float | yes | Numeric parameter for high_confidence_threshold. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
output_path | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
| `) -> PyResult<(Raster, Raster, Raster, Raster, Raster, Raster, String, Option | |||
| let mut args = serde_json` | function | no | Input raster for `) -> PyResult<(Raster, Raster, Raster, Raster, Raster, Raster, String, Option |
| let mut args = serde_json`. |
utility_corridor_encroachment_intelligence
- Detects LiDAR-derived vegetation encroachment risk near utility corridor centerlines.
- Returns
(encroachment_risk_raster, corridor_priority_zones_vector, asset_risk_table_vector, classification_confidence_raster, summary_path). profilesupportsfast,balanced, andstrict;priority_zone_thresholdandmax_zone_featurescontrol zone selection density.risk_height_thresholdcontrols the canopy height where risk increases, andcorridor_influence_distancecontrols proximity decay.
Outputs
Returned as tuple[Raster, Vector, Vector, Raster, str] in this order:
risk:Rasterzones:Vectortable:Vectorconfidence:Rastersummary:str
WbEnvironment usage
risk, zones, table, confidence, summary = wbe.terrain.workflow_products.utility_corridor_encroachment_intelligence(
input,
corridors,
profile="value",
resolution=1.0,
risk_height_threshold=1.0,
corridor_influence_distance=1.0,
priority_zone_threshold=1.0,
max_zone_features=1,
output_prefix="output/result",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
corridors | Vector | yes | Input vector layer for corridors. |
profile | string | yes | String parameter for profile. |
resolution | float | yes | Numeric parameter for resolution. |
risk_height_threshold | float | yes | Numeric parameter for risk_height_threshold. |
corridor_influence_distance | float | yes | Numeric parameter for corridor_influence_distance. |
priority_zone_threshold | float | no | Numeric parameter for priority_zone_threshold. |
max_zone_features | int | yes | Numeric parameter for max_zone_features. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
callback | function | no | Optional progress callback receiving JSON events. |
forestry_structure_and_biomass_intelligence
- Produces canopy metrics, vertical structure classes, stand units, biomass proxy, and confidence outputs from LiDAR.
- Returns
(canopy_height_metrics_raster, vertical_structure_class_raster, stand_structure_units_vector, biomass_proxy_raster, confidence_raster, summary_path). profilesupportsfast,balanced, andstrict;stand_block_cellscontrols stand-level aggregation size.biomass_capsets an upper bound for biomass proxy scaling.
Outputs
Returned as tuple[Raster, Raster, Vector, Raster, Raster, str] in this order:
canopy:Rasterclass:Rasterstand:Vectorbiomass:Rasterconfidence:Rastersummary:str
WbEnvironment usage
canopy, class, stand, biomass, confidence, summary = wbe.terrain.workflow_products.forestry_structure_and_biomass_intelligence(
input,
profile="value",
resolution=1.0,
stand_block_cells=1,
biomass_cap=1.0,
terrain_adaptation="value",
output_prefix="output/result",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
profile | string | yes | String parameter for profile. |
resolution | float | yes | Numeric parameter for resolution. |
stand_block_cells | int | yes | Numeric parameter for stand_block_cells. |
biomass_cap | float | yes | Numeric parameter for biomass_cap. |
terrain_adaptation | string | yes | String parameter for terrain_adaptation. |
output_prefix | string | no | Optional output prefix for multi-product outputs. |
callback | function | no | Optional progress callback receiving JSON events. |
filter_lidar_classes
- Removes points whose classification is listed in
excluded_classes. - Backend batch-mode suffix:
_filtered_clswith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.filter_lidar_classes(
input="value",
[excluded_classes_1, excluded_classes_2],
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
excluded_classes | list[int] |None | no | List input for excluded_classes. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_shift
- Applies additive
x_shift,y_shift, andz_shiftoffsets to each point. - Backend batch-mode suffix:
_shiftedwith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.io_management.lidar_shift(
input="value",
x_shift=1.0,
y_shift=1.0,
z_shift=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
x_shift | float | no | Numeric parameter for x_shift. |
y_shift | float | no | Numeric parameter for y_shift. |
z_shift | float | no | Numeric parameter for z_shift. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
remove_duplicates
- Removes duplicate points by x/y coordinates, optionally including z when
include_z=True. - Backend batch-mode suffix:
_dedupwith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.remove_duplicates(
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
include_z | bool | no | Boolean option for include_z. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
filter_lidar_scan_angles
- Removes points with absolute scan angle greater than
threshold. thresholduses LAS scan-angle integer units (1 unit = 0.006°).- Backend batch-mode suffix:
_scan_filteredwith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.filter_lidar_scan_angles(
input="value",
threshold=1,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
threshold | int | no | Numeric parameter for threshold. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
filter_lidar_noise
- Removes points classified as low noise (
class=7) or high noise (class=18). - Backend batch-mode suffix:
_denoisedwith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.filter_lidar_noise(
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_thin
- Keeps at most one point per grid cell at
resolution. methodsupportsfirst,last,lowest,highest, andnearest.- Backend batch-mode suffix:
_thinnedwith LiDAR output extension. - If
save_filtered=True, filtered-out points are also written and exposed asfiltered_pathin backend outputs (wrapper return remains the kept-pointLidar).
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_thin(
input="value",
resolution=1.0,
method="value",
output_path="result.tif",
filtered_output="value",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
method | string | no | String parameter for method. |
save_filtered | bool | no | Boolean option for save_filtered. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
filtered_output | string | no | String parameter for filtered_output. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_elevation_slice
- In filter mode (
classify=False), keeps only points withminz <= z <= maxz. - In classify mode (
classify=True), keeps all points and reassigns class values usingin_class_valueandout_class_value. - Backend batch-mode suffix:
_elev_slicewith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.lidar_elevation_slice(
input="value",
minz=1.0,
maxz=1.0,
in_class_value=1,
out_class_value=1,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
minz | float | no | Numeric parameter for minz. |
maxz | float | no | Numeric parameter for maxz. |
classify | bool | no | Boolean option for classify. |
in_class_value | int | no | Numeric parameter for in_class_value. |
out_class_value | int | no | Numeric parameter for out_class_value. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_join
- Merges multiple input LiDAR files into a single output point cloud.
- Expects
inputsto be a list of LiDAR objects/paths.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.io_management.lidar_join(
[inputs_1, inputs_2],
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
inputs | Lidar | yes | Input LiDAR dataset for inputs. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_thin_high_density
- Performs density-aware thinning by x/y blocks and z bins.
densitysets target points-per-area threshold; areas above threshold are thinned.- If
save_filtered=True, filtered points are also written and returned via backendfiltered_pathmetadata. - Backend batch-mode suffix:
_thinned_hdwith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.interpolation_gridding.lidar_thin_high_density(
input="value",
density=1.0,
resolution=1.0,
output_path="result.tif",
filtered_output="value",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
density | float | no | Numeric parameter for density. |
resolution | float | no | Numeric parameter for resolution. |
save_filtered | bool | no | Boolean option for save_filtered. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
filtered_output | string | no | String parameter for filtered_output. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_tile
- Splits a single input LiDAR into row/column tile outputs using a regular grid.
- Writes multiple files to
output_directory(or<input_stem>/by default) and returns a placeholder path to one written tile.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.io_management.lidar_tile(
input="value",
tile_width=1.0,
tile_height=1.0,
origin_x=1.0,
origin_y=1.0,
min_points_in_tile=1,
output_directory="value",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
tile_width | float | no | Numeric parameter for tile_width. |
tile_height | float | no | Numeric parameter for tile_height. |
origin_x | float | no | Numeric parameter for origin_x. |
origin_y | float | no | Numeric parameter for origin_y. |
min_points_in_tile | int | no | Numeric parameter for min_points_in_tile. |
output_laz_format | bool | no | Boolean option for output_laz_format. |
output_directory | string | no | String parameter for output_directory. |
callback | function | no | Optional progress callback receiving JSON events. |
sort_lidar
- Sorts points by one or more criteria (e.g.,
"x 100, y 100, z"). - Supports optional bin sizes per criterion for grouped sorting.
- Backend batch-mode suffix:
_sortedwith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.io_management.sort_lidar(
sort_criteria="value",
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
sort_criteria | string | yes | String parameter for sort_criteria. |
input | Lidar | no | Input LiDAR dataset for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
filter_lidar_by_percentile
- Selects one representative point per grid block by elevation percentile.
percentile=0selects local minima,100selects maxima,50approximates medians.- Excludes withheld and noise-classified points from percentile candidate sets.
- Backend batch-mode suffix:
_percentilewith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.filter_lidar_by_percentile(
input="value",
percentile=1.0,
block_size=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
percentile | float | no | Numeric parameter for percentile. |
block_size | float | no | Numeric parameter for block_size. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
split_lidar
- Splits a LiDAR file into multiple outputs using a grouping criterion (
num_pts,x,y,z,intensity,class,user_data,point_source_id,scan_angle,time). intervalcontrols bin width for numeric criteria and points-per-file whensplit_criterion="num_pts".min_ptsfilters sparse split outputs.- In both single and batch mode, tool returns a placeholder path to one written split file plus backend
output_countmetadata.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.io_management.split_lidar(
split_criterion="value",
input="value",
interval=1.0,
min_pts=1,
output_directory="value",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
split_criterion | string | yes | String parameter for split_criterion. |
input | Lidar | no | Input LiDAR dataset for input. |
interval | float | no | Numeric parameter for interval. |
min_pts | int | no | Numeric parameter for min_pts. |
output_directory | string | no | String parameter for output_directory. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_remove_outliers
- Computes local elevation residuals from neighborhood mean/median and either filters or reclassifies outliers.
classify=False: removes outliers;classify=True: keeps all points and assigns low/high noise classes 7/18.- Backend batch-mode suffix:
_outliers_removed(filter mode) or_outliers_classified(classify mode).
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.lidar_remove_outliers(
input="value",
search_radius=1.0,
elev_diff=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
search_radius | float | no | Numeric parameter for search_radius. |
elev_diff | float | no | Numeric parameter for elev_diff. |
use_median | bool | no | Boolean option for use_median. |
classify | bool | no | Boolean option for classify. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
normalize_lidar
- Uses an input DTM raster to convert LiDAR elevations to height above terrain (
z = z_lidar - z_dtm). dtmmay be provided as a path string or typed raster object.- If
no_negatives=True, negative normalized values are clamped to0.0.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.normalize_lidar(
input="value",
dtm,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
dtm | Raster | yes | Input raster for dtm. |
no_negatives | bool | no | Boolean option for no_negatives. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
height_above_ground
- Converts each point elevation to height above the nearest ground-classified point (
class=2). - Ground-classified points are assigned
z=0.0in output. - Fails with a validation/runtime error if there are no ground-classified points.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.height_above_ground(
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_ground_point_filter
- Applies a slope-and-height neighborhood test to identify off-terrain points.
classify=Truewrites classification labels (ground=2,off-terrain=1); otherwise off-terrain points are removed.- Supports optional
height_above_ground=Trueoutput z normalization from local neighborhood minima. - Backend batch-mode suffix:
_ground_filteredwith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.remote_sensing.filters.lidar_ground_point_filter(
input="value",
search_radius=1.0,
min_neighbours=1,
slope_threshold=1.0,
height_threshold=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
search_radius | float | no | Numeric parameter for search_radius. |
min_neighbours | int | no | Numeric parameter for min_neighbours. |
slope_threshold | float | no | Numeric parameter for slope_threshold. |
height_threshold | float | no | Numeric parameter for height_threshold. |
classify | bool | no | Boolean option for classify. |
height_above_ground | bool | no | Boolean option for height_above_ground. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
filter_lidar
- Filters points with a boolean
statementevaluated against point attributes. - Supports core variables: coordinates (
x,y,z), returns (ret,nret,is_late,...), class flags, scan metrics, color/time, and file min/mid/max stats. - Backend batch-mode suffix:
_filteredwith LiDAR output extension.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.filter_lidar(
statement="value",
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
statement | string | yes | String parameter for statement. |
input | Lidar | no | Input LiDAR dataset for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
modify_lidar
- Applies assignment expressions to mutate LiDAR point attributes (e.g.,
z = z + 1,class = if(z > 10, 2, class),rgb = (255,0,0)). - Supports semicolon-separated multi-expression statements evaluated per point.
- Supports no-input batch mode with
_modifiedoutput suffix.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.modify_lidar(
statement="value",
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
statement | string | yes | String parameter for statement. |
input | Lidar | no | Input LiDAR dataset for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
filter_lidar_by_reference_surface
- Compares each point elevation against a raster reference surface using query modes:
within,<,<=,>,>=. - In filter mode (
classify=False), outputs only points that satisfy the query. - In classify mode, all points are retained and classes are written using
true_class_valueandfalse_class_value(or preserved whenpreserve_classes=True).
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.filter_lidar_by_reference_surface(
input="value",
ref_surface,
query="value",
threshold=1.0,
true_class_value=1,
false_class_value=1,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
ref_surface | Raster | yes | Input raster for ref_surface. |
query | string | no | String parameter for query. |
threshold | float | no | Numeric parameter for threshold. |
classify | bool | no | Boolean option for classify. |
true_class_value | int | no | Numeric parameter for true_class_value. |
false_class_value | int | no | Numeric parameter for false_class_value. |
preserve_classes | bool | no | Boolean option for preserve_classes. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
classify_lidar
- Performs basic neighborhood-based classification into ground (
2), building (6), vegetation (5), and unclassified (1). - Uses
search_radius,grd_threshold, andoto_thresholdas primary controls, with RANSAC-style local planarity/linearity estimation. - Supports no-input batch mode; backend batch-mode suffix:
_classifiedwith LiDAR output extension. linearity_threshold,planarity_threshold,num_iter, andfacade_thresholdare actively used during segmentation and refinement stages.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.classify_lidar(
input="value",
search_radius=1.0,
grd_threshold=1.0,
oto_threshold=1.0,
linearity_threshold=1.0,
planarity_threshold=1.0,
num_iter=1,
facade_threshold=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
search_radius | float | no | Numeric parameter for search_radius. |
grd_threshold | float | no | Numeric parameter for grd_threshold. |
oto_threshold | float | no | Numeric parameter for oto_threshold. |
linearity_threshold | float | no | Numeric parameter for linearity_threshold. |
planarity_threshold | float | no | Numeric parameter for planarity_threshold. |
num_iter | int | no | Numeric parameter for num_iter. |
facade_threshold | float | no | Numeric parameter for facade_threshold. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
classify_buildings_in_lidar
- Reclassifies points to building class (
6) when they fall within polygon building footprints. - Input polygons should represent building outlines in the same CRS as the LiDAR input.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.classify_buildings_in_lidar(
in_lidar="value",
building_footprints,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
in_lidar | Lidar | yes | Input LiDAR dataset for in_lidar. |
building_footprints | Vector | yes | Input vector layer for building_footprints. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
ascii_to_las
- Converts one or more ASCII point files into LAS output files.
patternmust includex,y,zand can include:i,c,rn,nr,time,sa,r,g,b.- If
rnis used,nrmust also be used; RGB fields must be supplied as a fullr,g,bset. epsg_codesets output LAS CRS metadata; outputs are written tooutput_directorywhen provided.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.io_management.ascii_to_las(
[input_ascii_files_1, input_ascii_files_2],
pattern="value",
epsg_code=1,
output_directory="value",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_ascii_files | list[stringinginging] | yes | List input for input_ascii_files. |
pattern | string | yes | String parameter for pattern. |
epsg_code | int | no | Numeric parameter for epsg_code. |
output_directory | string | no | String parameter for output_directory. |
callback | function | no | Optional progress callback receiving JSON events. |
las_to_ascii
- Converts an input LiDAR file to CSV with columns based on available attributes (time/RGB columns are included when present).
- If
input=None, runs in batch mode over LiDAR files in the current working directory and returns a placeholder path to one produced CSV.
Outputs
return:str
WbEnvironment usage
result = wbe.lidar.io_management.las_to_ascii(
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
select_tiles_by_polygon
- Scans LiDAR tiles in
input_directoryand copies selected tiles tooutput_directorybased on polygon overlap. - Tile selection uses representative tile-bounding-box sample points (corners, center, and edge midpoints) against polygon geometry.
- Returns the output directory path and writes selected tile files directly to disk.
Outputs
return:str
WbEnvironment usage
result = wbe.lidar.io_management.select_tiles_by_polygon(
input_directory="value",
output_directory="value",
polygons,
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_directory | string | yes | String parameter for input_directory. |
output_directory | string | yes | String parameter for output_directory. |
polygons | Vector | yes | Input vector layer for polygons. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_info
- Produces a LiDAR summary report with point counts, coordinate/intensity ranges, class counts, and return counts.
- Writes to
.txtor.htmlreport output and returns the report path.
Outputs
return:str
WbEnvironment usage
result = wbe.lidar.analysis_metrics.lidar_info(
input="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
show_point_density | bool | no | Boolean option for show_point_density. |
show_vlrs | bool | no | Boolean option for show_vlrs. |
show_geokeys | bool | no | Boolean option for show_geokeys. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_histogram
- Builds a histogram report for one parameter (
elevation,intensity,scan angle,class, ortime). - Supports lower/upper tail clipping using
clip_percent. - Writes an HTML report and returns its path.
Outputs
return:str
WbEnvironment usage
result = wbe.lidar.analysis_metrics.lidar_histogram(
input="value",
output_path="result.tif",
parameter="value",
clip_percent=1.0,
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
parameter | string | no | String parameter for parameter. |
clip_percent | float | no | Numeric parameter for clip_percent. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_point_stats
- Generates one or more summary rasters (point count, pulse count, avg points/pulse, z range, intensity range, predominant class).
- If no output flags are set, all point-stat rasters are generated.
- Returns the output directory path containing generated GeoTIFF rasters.
Outputs
return:str
WbEnvironment usage
result = wbe.lidar.analysis_metrics.lidar_point_stats(
input="value",
resolution=1.0,
output_directory="value",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
num_points | bool | no | Boolean option for num_points. |
num_pulses | bool | no | Boolean option for num_pulses. |
avg_points_per_pulse | bool | no | Boolean option for avg_points_per_pulse. |
z_range | bool | no | Boolean option for z_range. |
intensity_range | bool | no | Boolean option for intensity_range. |
predominant_class | bool | no | Boolean option for predominant_class. |
output_directory | string | no | String parameter for output_directory. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_classify_subset
- Reclassifies points in a base cloud when they spatially match points in a subset cloud.
- Uses 3D nearest-neighbour matching with configurable
tolerance(map units). - Assigns
subset_class_valueto matches andnonsubset_class_valueto non-matches (255preserves original classes).
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.lidar_classify_subset(
base_lidar="value",
subset_lidar="value",
subset_class_value=1,
nonsubset_class_value=1,
tolerance=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base_lidar | Lidar | yes | Input LiDAR dataset for base_lidar. |
subset_lidar | Lidar | yes | Input LiDAR dataset for subset_lidar. |
subset_class_value | int | no | Numeric parameter for subset_class_value. |
nonsubset_class_value | int | no | Numeric parameter for nonsubset_class_value. |
tolerance | float | no | Numeric parameter for tolerance. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
clip_lidar_to_polygon
- Retains only points that lie within input polygon geometry (
polygonsvector path/object). - Supports polygon holes; points inside holes are excluded from output.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.clip_lidar_to_polygon(
input="value",
polygons,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
polygons | Vector | yes | Input vector layer for polygons. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
erase_polygon_from_lidar
- Removes points that lie within input polygon geometry (
polygonsvector path/object). - Complement of
clip_lidar_to_polygon; points outside polygons are retained.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.erase_polygon_from_lidar(
input="value",
polygons,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
polygons | Vector | yes | Input vector layer for polygons. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
classify_overlap_points
- Identifies overlap points in grid cells containing multiple point-source IDs and either classifies (
class=12) or filters them. - Supported criteria:
max scan angle,not min point source id,not min time,multiple point source IDs. filter=Trueremoves overlap points; otherwise flagged points are reclassified.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.classify_overlap_points(
input="value",
resolution=1.0,
overlap_criterion="value",
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
resolution | float | no | Numeric parameter for resolution. |
overlap_criterion | string | no | String parameter for overlap_criterion. |
filter | bool | no | Boolean option for filter. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_segmentation
- Segments points into connected components using XY neighbourhood (
search_radius) and vertical continuity (max_z_diff). - Writes per-segment colours into point RGB values; largest segment receives dark green
(25,120,0). - Compatibility parameters for legacy call-shape are accepted (
num_iterations,num_samples,inlier_threshold,acceptable_model_size,max_planar_slope,norm_diff_threshold). - Optional
ground=Trueassigns class2to the largest segment and class1to other segmented points.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.lidar_segmentation(
input="value",
search_radius=1.0,
num_iterations=1,
num_samples=1,
inlier_threshold=1.0,
acceptable_model_size=1,
max_planar_slope=1.0,
norm_diff_threshold=1.0,
max_z_diff=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
search_radius | float | no | Numeric parameter for search_radius. |
num_iterations | int | no | Numeric parameter for num_iterations. |
num_samples | int | no | Numeric parameter for num_samples. |
inlier_threshold | float | no | Numeric parameter for inlier_threshold. |
acceptable_model_size | int | no | Numeric parameter for acceptable_model_size. |
max_planar_slope | float | no | Numeric parameter for max_planar_slope. |
norm_diff_threshold | float | no | Numeric parameter for norm_diff_threshold. |
max_z_diff | float | no | Numeric parameter for max_z_diff. |
classes | bool | no | Boolean option for classes. |
ground | bool | no | Boolean option for ground. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
individual_tree_segmentation
- Segments individual tree points using a mean-shift mode-seeking workflow over LiDAR points.
- Algorithm inspiration and credit: this implementation is inspired by the self-adaptive mean-shift tree-segmentation approach described in the 2020 MDPI Remote Sensing article on individual-tree segmentation, and by the grid-accelerated approximation ideas in the MeanShift++ paper (arXiv, 2021).
- Defaults to vegetation-only segmentation (
only_use_veg=True,veg_classes="3,4,5") and height filtering (min_height=2.0). - Uses adaptive per-seed horizontal bandwidth by default (
adaptive_bandwidth=True) based on local neighbour density and angular sector crown-radius cues. - Adaptive controls:
adaptive_neighbors(default24) andadaptive_sector_count(default8), with fallback to bounded height-based scaling when adaptive mode is disabled. - Supports optional MeanShift++-style grid approximation (
grid_acceleration=True) that runs mode updates against aggregated grid cells for faster large-cloud processing. - Grid approximation control:
grid_cell_size(default0.5in XY map units). - Optional post-grid exact refinement:
grid_refine_exact=Truewithgrid_refine_iterations(default2) to recover local precision after coarse grid updates. - Optional tiled seed scheduling for very large inputs:
tile_size(default0.0, disabled) andtile_overlap(default0.0, must be smaller thantile_size). - Supports deterministic random segment colouring (
output_id_mode="rgb"), optional id storage inuser_data/point_source_id, and optional sidecar CSV output (output_sidecar_csv=True). - Includes performance controls:
threadsandsimd.
Benchmarking notes (developer reference):
- Benchmark target:
individual_tree_segmentation_benchin Rust/whitebox_next_gen/crates/wbtools_oss/benches/individual_tree_segmentation_bench.rs - Run command:
cargo bench -p wbtools_oss --bench individual_tree_segmentation_bench
- Suggested result-record template:
| Date | Dataset | Points | Mode | Threads | SIMD | Wall time (ms) | Assigned veg points | Segment count |
|---|---|---|---|---|---|---|---|---|
| YYYY-MM-DD | name | n | exact / grid_accel | t | true/false | value | value | value |
Expanded local matrix (2026-03-24):
| Date | Dataset | Points | Mode | Threads | SIMD | Wall time (ms) | Assigned veg points | Segment count |
|---|---|---|---|---|---|---|---|---|
| 2026-03-24 | synthetic small_t32_p180 | 5952 | exact | auto | true | 28.28 (median) | 5536 | 32 |
| 2026-03-24 | synthetic small_t32_p180 | 5952 | grid_accel | auto | true | 9.20 (median) | 5536 | 32 |
| 2026-03-24 | synthetic small_t32_p180 | 5952 | grid_refine | auto | true | 14.29 (median) | 5536 | 32 |
| 2026-03-24 | synthetic small_t32_p180 | 5952 | grid_refine_tiled | auto | true | 14.86 (median) | 5536 | 32 |
| 2026-03-24 | synthetic small_t32_p180 | 5952 | grid_refine_tiled_t1 | 1 | true | 61.15 (median) | 5536 | 32 |
| 2026-03-24 | synthetic medium_t64_p220 | 14464 | exact | auto | true | 90.10 (median) | 13632 | 64 |
| 2026-03-24 | synthetic medium_t64_p220 | 14464 | grid_accel | auto | true | 28.40 (median) | 13632 | 64 |
| 2026-03-24 | synthetic medium_t64_p220 | 14464 | grid_refine | auto | true | 44.48 (median) | 13632 | 64 |
| 2026-03-24 | synthetic medium_t64_p220 | 14464 | grid_refine_tiled | auto | true | 48.20 (median) | 13632 | 64 |
| 2026-03-24 | synthetic medium_t64_p220 | 14464 | grid_refine_tiled_t1 | 1 | true | 191.91 (median) | 13632 | 64 |
| 2026-03-24 | synthetic medium_t64_p220 | 14464 | grid_refine_tiled_t4 | 4 | true | 72.74 (median) | 13632 | 64 |
Observed speed/quality summary:
- Quality parity on synthetic data: assigned-point and segment-count ratios are 1.0 for all measured variants versus exact.
- Fastest profile in this matrix: grid_accel (about 3.07x faster on small, 3.17x faster on medium versus exact).
- Grid refine improves precision pathway while retaining speedup (about 1.98x small, 2.03x medium versus exact).
- Tiling is useful for scalability controls, but on these moderate synthetic sizes it adds overhead unless required for memory/partitioning constraints.
Parameter tuning guidance: For recommended parameter profiles tailored to your use case (speed-critical, precision-optimized, balanced, or memory-constrained), see Section 16 (Parameter tuning guide) in lidar_individual_tree_segmentation_design.md. This guide provides ready-to-use parameter sets plus hyperparameter tuning directions for common forest types.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.individual_tree_segmentation(
input="value",
veg_classes="value",
4,
5",
min_height=1.0,
max_height=1.0,
bandwidth_min=1.0,
bandwidth_max=1.0,
adaptive_neighbors=1,
adaptive_sector_count=1,
grid_cell_size=1.0,
grid_refine_iterations=1,
tile_size=1.0,
tile_overlap=1.0,
vertical_bandwidth=1.0,
max_iterations=1,
convergence_tol=1.0,
min_cluster_points=1,
mode_merge_dist=1.0,
threads=1,
output_id_mode="value",
seed=1,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
only_use_veg | bool | no | Boolean option for only_use_veg. |
veg_classes | string | no | String parameter for veg_classes. |
4 | Any | yes | Parameter 4. |
5" | Any | yes | Parameter 5". |
min_height | float | no | Numeric parameter for min_height. |
max_height | float | no | Numeric parameter for max_height. |
bandwidth_min | float | no | Numeric parameter for bandwidth_min. |
bandwidth_max | float | no | Numeric parameter for bandwidth_max. |
adaptive_bandwidth | bool | no | Boolean option for adaptive_bandwidth. |
adaptive_neighbors | int | no | Numeric parameter for adaptive_neighbors. |
adaptive_sector_count | int | no | Numeric parameter for adaptive_sector_count. |
grid_acceleration | bool | no | Boolean option for grid_acceleration. |
grid_cell_size | float | no | Numeric parameter for grid_cell_size. |
grid_refine_exact | bool | no | Boolean option for grid_refine_exact. |
grid_refine_iterations | int | no | Numeric parameter for grid_refine_iterations. |
tile_size | float | no | Numeric parameter for tile_size. |
tile_overlap | float | no | Numeric parameter for tile_overlap. |
vertical_bandwidth | float | no | Numeric parameter for vertical_bandwidth. |
max_iterations | int | no | Numeric parameter for max_iterations. |
convergence_tol | float | no | Numeric parameter for convergence_tol. |
min_cluster_points | int | no | Numeric parameter for min_cluster_points. |
mode_merge_dist | float | no | Numeric parameter for mode_merge_dist. |
threads | int | no | Numeric parameter for threads. |
simd | bool | no | Boolean option for simd. |
output_id_mode | string | no | String parameter for output_id_mode. |
output_sidecar_csv | bool | no | Boolean option for output_sidecar_csv. |
seed | int | no | Numeric parameter for seed. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
individual_tree_detection
- Identifies tree top points in a LiDAR cloud using local maxima detection.
- Detects points that are the highest within a local search neighbourhood in XY, with optional height range constraints.
- Search neighbourhood size can vary with height:
min_search_radiusapplies at lower heights,max_search_radiusat upper heights, with linear interpolation between. - Requires vegetation-only filtering by default (
only_use_veg=True, vegetation classes 3, 4, 5); can be disabled if input is unclassified. - Outputs a vector shapefile of tree top points with attributes:
FID(1-based point index) andZ(height value). - Use case: rapid treetop detection for forest inventory, DBH estimation, or canopy analysis; complements individual_tree_segmentation for cases where only crown centroids are needed.
- Parameters:
min_search_radius(default 1.0): search neighbourhood radius at minimum heightmax_search_radius(optional): neighbourhood size at upper heights; if not specified, uses min_search_radius (constant neighbourhood)min_height(default 0.0): minimum height threshold (points below this are skipped)max_height(optional): height value where max_search_radius applies (linear interpolation between min and max)only_use_veg(default true): if true, process only vegetation classes 3, 4, 5; if false, use all non-withheld, non-noise points
Outputs
return:Vector
WbEnvironment usage
result = wbe.lidar.analysis_metrics.individual_tree_detection(
input="value",
min_search_radius=1.0,
min_height=1.0,
max_search_radius=1.0,
max_height=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
min_search_radius | float | no | Numeric parameter for min_search_radius. |
min_height | float | no | Numeric parameter for min_height. |
max_search_radius | float | no | Numeric parameter for max_search_radius. |
max_height | float | no | Numeric parameter for max_height. |
only_use_veg | bool | no | Boolean option for only_use_veg. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_segmentation_based_filter
- Performs neighbourhood-connected low-relief ground extraction using
search_radiusandmax_z_diff. classify_points=Falseoutputs only extracted ground-like points.classify_points=Trueretains all points and assigns class2(ground-like) or class1(other).
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.filtering_classification.lidar_segmentation_based_filter(
input="value",
search_radius=1.0,
norm_diff_threshold=1.0,
max_z_diff=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
search_radius | float | no | Numeric parameter for search_radius. |
norm_diff_threshold | float | no | Numeric parameter for norm_diff_threshold. |
max_z_diff | float | no | Numeric parameter for max_z_diff. |
classify_points | bool | no | Boolean option for classify_points. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lidar_colourize
- Assigns point RGB values from an overlapping raster image sampled at each point XY location.
imagecan be provided as a raster object/path; out-of-image or nodata samples are assigned black.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.io_management.lidar_colourize(
input="value",
image,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | yes | Input LiDAR dataset for input. |
image | Raster | yes | Input raster for image. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
colourize_based_on_class
- Applies class-based colours for LAS classes 0-18, with optional per-class overrides via
clr_str. - Supports optional intensity blending (
intensity_blending_amountin percent). use_unique_clrs_for_buildings=Trueassigns unique colours to connected building clusters (class=6) usingsearch_radius.- Supports batch mode when
input=None.
Outputs
return:Lidar
WbEnvironment usage
result = wbe.lidar.analysis_metrics.colourize_based_on_class(
input="value",
intensity_blending_amount=1.0,
clr_str="value",
search_radius=1.0,
output_path="result.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
intensity_blending_amount | float | no | Numeric parameter for intensity_blending_amount. |
clr_str | string | no | String parameter for clr_str. |
use_unique_clrs_for_buildings | bool | no | Boolean option for use_unique_clrs_for_buildings. |
search_radius | float | no | Numeric parameter for search_radius. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
colourize_based_on_point_returns
- Applies colours by return type: only, first, intermediate, and last returns.
- Supports optional intensity blending (
intensity_blending_amountin percent). - Supports batch mode when
input=None.
Callback Payload Examples
All LiDAR interpolation methods emit JSON strings through callback using message/progress events.
Example message event:
{"type":"message","message":"reading input lidar"}
Example progress event:
{"type":"progress","percent":0.63}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Lidar | no | Input LiDAR dataset for input. |
intensity_blending_amount | float | no | Numeric parameter for intensity_blending_amount. |
only_ret_colour | string | no | String parameter for only_ret_colour. |
first_ret_colour | string | no | String parameter for first_ret_colour. |
intermediate_ret_colour | string | no | String parameter for intermediate_ret_colour. |
last_ret_colour | string | no | String parameter for last_ret_colour. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
percent is normalized in [0, 1] and reaches 1.0 on completion.
Outputs
return:Lidar
Example:
import whitebox_workflows as wbw
wbe = wbw.WbEnvironment()
lidar = wbe.read_lidar("tile.laz")
dem = wbe.lidar_idw_interpolation(
lidar,
resolution=1.0,
weight=2.0,
returns_included="last",
excluded_classes=[7, 18],
)
Notes
- This document is intentionally planning-oriented for now.
- As each tool is ported, add full parameter and examples sections in this file.
Stream Network Analysis
Stream Network Analysis Tools
This document provides comprehensive documentation for stream network analysis tools. For common raster I/O conventions, parameter formats, and usage patterns, see the main TOOLS.md reference.
Overview
Stream network analysis tools operate on digital elevation models (DEMs) to extract, analyze, and characterize stream networks. These tools use D8 (eight-directional) flow direction algorithms to trace flow paths and compute stream properties.
Key Concepts
- D8 Pointer: A raster encoding the direction of steepest descent from each cell to one of its 8 neighbors. Required input for most tools.
- Streams Raster: A binary or continuous raster where positive values mark stream cells; zero and NoData values mark non-stream cells.
- Stream Order: A hierarchical classification system ranking stream segments based on tributaries and confluence patterns.
- Stream Link: A continuous stream segment between junctions (confluences) or from a source to the first junction.
Tool Index
Stream Ordering Tools
Stream ordering systems classify streams hierarchically based on network structure. Each system makes different assumptions about what constitutes the "main stem" and how order changes at confluences.
Strahler Stream Order
Assigns stream order based on the algorithm: headwater links are order 1; when two links of equal order join, the downstream link is order+1; when links of different orders join, the downstream link takes the higher order.
Parameters:
d8_pntr(Raster): D8 flow direction pointer rasterstreams(Raster): Stream network raster (positive values = streams)esri_pntr(bool, optional): If true, use ESRI-style pointer values; otherwise use Whitebox style (default: false)zero_background(bool, optional): If true, assign zero to non-stream cells; otherwise use NoData (default: false)output(str, optional): Output raster path
Output: Raster with Strahler order values
References:
- Strahler, A. N. (1957). Quantitative analysis of watershed geomorphology. EOS Transactions American Geophysical Union, 38(6), 913-920.
Horton Stream Order
Assigns stream order starting from Strahler order, then replaces all cells along the main trunk (longest path from outlet) with the outlet's order value. This emphasizes the main channel rather than tributary networks.
Parameters: Same as Strahler Stream Order
Output: Raster with Horton order values
References:
- Horton, R. E. (1945). Erosional development of streams and their drainage basins. GSA Bulletin, 56(3), 275-370.
Hack Stream Order
Assigns order from the outlet upstream: the outlet (main stem) is order 1, tributaries to the main stem are order 2, and tributary order increases upstream. Unlike Strahler, order increases away from the outlet, which is useful when outlet location is certain but headwater extent is uncertain.
Parameters: Same as Strahler Stream Order
Output: Raster with Hack order values
References:
- Hack, J. T. (1957). Studies of longitudinal stream profiles in Virginia and Maryland. USGS Professional Paper 294-B.
Topological Stream Order
Assigns order based on the count of upstream links (topological distance from the outlet). Each confluence increases order by one moving downstream.
Parameters: Same as Strahler Stream Order
Output: Raster with topological order values
Stream Magnitude and Magnitude-Related Tools
Shreve Stream Magnitude
Calculates Shreve stream magnitude: the sum of magnitude values of upstream headwater cells (all headwaters count as magnitude 1). Magnitude increases when tributaries join—new magnitude = sum of upstream tributaries.
Parameters: Same as Strahler Stream Order
Output: Raster with Shreve magnitude values
References:
- Shreve, R. L. (1966). Statistical law of stream numbers. Journal of Geology, 74(1), 17-37.
Stream Link Identifier
Assigns unique integer identifiers to each stream link (continuous segment between junctions or from headwater to first junction). Useful for extracting and analyzing individual segments.
Parameters:
d8_pntr(Raster): D8 flow direction pointerstreams_raster(Raster): Stream network rasteresri_pntr(bool, optional): ESRI-style pointer flagzero_background(bool, optional): Zero background flagoutput(str, optional): Output raster path
Output: Raster with unique link identifiers
Stream Link Class
Classifies each stream link by type:
- 1: Exterior (headwater link with no upstream)
- 2: Interior (link with 1+ upstream tributaries, drains to another link)
- 3: Source (similar to exterior)
- 4: Link (standard interior link)
- 5: Sink (terminal outlet)
Parameters: Same as Stream Link Identifier
Output: Raster with classified link types
Stream Link Length
Calculates total length for each stream link. All cells in the same link have the same value (the complete link length).
Parameters)
d8_pntr(Raster): D8 flow direction pointerstreams_raster(Raster): Stream network rasterdem(Raster): Digital elevation model (for cell size/distance calculation)esri_pntr(bool, optional): ESRI-style pointer flagoutput(str, optional): Output raster path
Output: Raster with link lengths
Stream Link Slope
Calculates average slope for each stream link. Slope is computed as vertical drop over horizontal distance along the stream.
Parameters:
d8_pntr(Raster): D8 flow direction pointerstreams_raster(Raster): Stream network rasterdem(Raster): Digital elevation modelesri_pntr(bool, optional): ESRI-style pointer flagoutput(str, optional): Output raster path
Output: Raster with link slopes
Stream Slope Continuous
Calculates slope at each stream cell using neighbors along the flow direction. Provides cell-by-cell slope rather than constant per-link values.
Parameters: Same as Stream Link Slope
Output: Raster with per-cell slopes
Stream Network Extraction Tools
Extract Streams
Extracts stream network from flow accumulation raster using a user-defined threshold. Cells with flow accumulation >= threshold are marked as streams.
Parameters:
flow_accumulation(Raster): Flow accumulation raster (output from a flow accumulation tool)threshold(float): Minimum flow accumulation value to designate as streamoutput(str, optional): Output raster path
Output: Binary stream raster (1 = stream, 0 = non-stream)
Extract Valleys
Extracts valley networks (broader low-lying areas) from a DEM. Offers multiple algorithms:
- Laplace/Quadratic: Curvature-based valley detection
- Lindsay-Curvature: Custom curvature index
- Peucker-Douglas: Tangential curvature method
Parameters:
dem(Raster): Digital elevation modeltype(str): Valley detection method (default: "quadratic")thin(bool, optional): Thin valley lines to single-cell width (default: false)output(str, optional): Output raster path
Output: Valley network raster
Stream Network Distance and Upstream Analysis Tools
Distance to Outlet
Calculates downstream channel distance along the D8 network to the outlet for each stream cell.
Parameters:
d8_pntr(Raster): D8 flow direction pointerstreams_raster(Raster): Stream network rasterdem(Raster): Digital elevation model (for distance calculation)esri_pntr(bool, optional): ESRI-style pointer flagoutput(str, optional): Output raster path
Output: Raster with distance to outlet (in horizontal distance units)
Length of Upstream Channels
Calculates total upstream channel length for each stream cell. Useful for identifying headwater areas and stream densities.
Parameters:
d8_pntr(Raster): D8 flow direction pointerstreams_raster(Raster): Stream network rasterdem(Raster): Digital elevation modelesri_pntr(bool, optional): ESRI-style pointer flagoutput(str, optional): Output raster path
Output: Raster with upstream channel lengths
Farthest Channel Head
Calculates upstream distance to the most distant channel head for each stream cell.
Parameters: Same as Length of Upstream Channels
Output: Raster with distance to farthest upstream head
Stream Main Stem and Tributary Tools
Find Main Stem
Identifies cells belonging to the main channel (longest stream path from outlet). Outputs a binary mask.
Parameters:
d8_pntr(Raster): D8 flow direction pointerstreams_raster(Raster): Stream network rasteresri_pntr(bool, optional): ESRI-style pointer flagoutput(str, optional): Output raster path
Output: Boolean raster (1 = main stem, 0 = tributary)
Tributary Identifier
Assigns unique identifier to each tributary system. Useful for analyzing tributary properties.
Parameters: Same as Find Main Stem
Output: Raster with tributary identifiers
Remove Short Streams
Prunes stream links shorter than a minimum length threshold. Useful for cleaning noisy stream networks.
Parameters:
d8_pntr(Raster): D8 flow direction pointerstreams_raster(Raster): Stream network rasterdem(Raster): Digital elevation modelmin_length(float): Minimum link length to retain (in map units)esri_pntr(bool, optional): ESRI-style pointer flagoutput(str, optional): Output raster path
Output: Pruned stream raster with short links removed
Stream Network Conversion Tools
Raster Streams to Vector
Converts a raster stream network to a vector line layer. Each stream link becomes a PolyLine feature with attributes showing stream value and link length.
Parameters:
streams(Raster): Stream network rasterd8_pointer(Raster): D8 flow direction pointeresri_pointer(bool, optional): ESRI-style pointer flagall_vertices(bool, optional): Include all vertices or only direction changes (default: false)
Output: Vector layer with stream PolyLines
Rasterize Streams
Converts a vector stream line layer to a raster grid.
Parameters:
input_vector(Vector): Input stream network vector layerreference_raster(Raster): Reference raster for grid specificationfield(str, optional): Attribute field for output values (default: stream ID)output(str, optional): Output raster path
Output: Raster stream network
Repair Stream Vector Topology
Repairs broken topology in vector stream networks, including:
- Snapping nearly-overlapping endpoints
- Splitting lines at intersections
- Removing duplicate segments
- Removing invalid geometries
Parameters:
input_vector(Vector): Input stream vector layersnap_distance(float): Maximum distance for snapping endpoints (default: 1 cell size)output(str, optional): Output vector path
Output: Repaired vector stream layer
Long Profile Tools
Long profiles are plots of elevation against downstream distance. Useful for analyzing stream gradient and identifying bedrock steps.
Long Profile
Creates an interactive SVG line graph showing elevation against distance to outlet for the entire stream network. Outputs an HTML document with embedded SVG.
Parameters:
d8_pointer(Raster): D8 flow direction pointerstreams_raster(Raster): Stream network rasterdem(Raster): Digital elevation modeloutput_html_file(str): Output HTML file pathesri_pointer(bool, optional): ESRI-style pointer flag
Output: Interactive HTML document with longitudinal profile
Long Profile from Points
Creates long profiles for sample points along stream network. Useful for extracting profiles at specific locations.
Parameters:
points_vector(Vector): Vector points at profile sample locationsd8_pointer(Raster): D8 flow direction pointerstreams_raster(Raster): Stream network rasterdem(Raster): Digital elevation modeloutput_folder(str): Output folder for HTML filesesri_pointer(bool, optional): ESRI-style pointer flag
Output: Set of HTML profile documents (one per input point)
Comprehensive Stream Analysis Tools
Vector Stream Network Analysis
Performs comprehensive analysis on a vector stream network, generating multiple output layers:
- Stream links with order, magnitude, length, and slope
- Stream thalwegs (centerlines)
- Drainage basins (catchments)
- Stream confluences (junctions)
Parameters:
input_vector(Vector): Input stream networkdem(Raster, optional): Digital elevation model for slope/aspect analysisoutput_folder(str): Output folder for generated layers
Output: Multiple vector layers with comprehensive stream attributes
Professional Tools (Pro License Required)
Prune Vector Streams
Advanced vector stream pruning based on Shreve magnitude and stream type criteria. Allows selective removal of minor tributaries while preserving main stem structure.
Parameters:
input(Vector): Input stream networkmagnitude_threshold(float): Minimum Shreve magnitude to retain (default: 2)output(str, optional): Output vector path
Output: Pruned stream network
River Centerlines
Extracts river centerlines from a binary water mask raster using medial axis transformation. Useful for generating channel centerlines from satellite or aerial imagery.
Parameters:
water_raster(Raster): Binary water/non-water rasteroutput(str, optional): Output vector centerline path
Output: Vector centerline PolyLines
Usage Notes
D8 Pointer Conventions
Stream network tools accept both Whitebox and ESRI D8 pointer conventions. Whitebox convention:
- 1 = E, 2 = NE, 4 = N, 8 = NW, 16 = W, 32 = SW, 64 = S, 128 = SE
ESRI convention:
- 1 = E, 2 = SE, 4 = S, 8 = SW, 16 = W, 32 = NW, 64 = N, 128 = NE
Set esri_pntr=True when using ESRI-convention pointers.
DEM Preparation
Before extracting streams, DEMs should be preprocessed to remove topographic depressions and flat areas. Tools are typically:
fill_depressionsorbreach_depressions_least_cost(from geomorphometry tools)d8_pointer(compute D8 flow directions on depressionless DEM)flow_accumulation(compute d8 flow accumulation)
Typical Workflow
# Example workflow (pseudocode)
dem_filled = fill_depressions(dem)
d8_ptr = d8_pointer(dem_filled)
flow_accum = flow_accumulation(d8_ptr)
streams = extract_streams(flow_accum, threshold=100)
strahler_order = strahler_stream_order(d8_ptr, streams)
streams_vector = raster_streams_to_vector(streams, d8_ptr)
See Also
- Geomorphometry Tools - Related DEM analysis tools
- TOOLS.md - Common conventions and raster I/O methods
Data Tools
Data Tools
This document covers the first batch of data and format conversion tools ported into the new backend.
Tool Index
add_point_coordinates_to_tableclean_vectorconvert_nodata_to_zerocsv_points_to_vectorexport_table_to_csvfix_dangling_arcsjoin_tableslines_to_polygonsmerge_table_with_csvmerge_vectorsmodify_nodata_valuemultipart_to_singlepartnew_raster_from_base_rasternew_raster_from_base_vectorpolygons_to_linesprint_geotiff_tagsraster_to_vector_linesraster_to_vector_polygonsraster_to_vector_pointsreinitialize_attribute_tableremove_polygon_holesremove_raster_polygon_holesset_nodata_valuesinglepart_to_multipartvector_lines_to_rastervector_polygons_to_rastervector_points_to_raster
add_point_coordinates_to_table
Copies a point layer and appends XCOORD and YCOORD fields using each feature's point coordinates.
Outputs
return:Vector
WbEnvironment usage
points_with_xy = wbe.conversion.vector_table_io.add_point_coordinates_to_table(points, output_path="points_with_xy.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
clean_vector
Removes null and invalid geometries from a vector layer. For line and polygon data, undersized parts are removed and fully invalid features are dropped.
Outputs
return:Vector
WbEnvironment usage
cleaned = wbe.conversion.vector_table_io.clean_vector(input_vector, output_path="cleaned.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
convert_nodata_to_zero
Replaces nodata cells in a raster with 0 while leaving all valid cells unchanged.
Outputs
return:Raster
WbEnvironment usage
result = wbe.conversion.raster_vector_conversion.convert_nodata_to_zero(input_raster, output_path="zeroed.tif")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
csv_points_to_vector
Imports point features from a CSV text table using selected X and Y field indices.
Outputs
return:Vector
WbEnvironment usage
points = wbe.conversion.vector_table_io.csv_points_to_vector(
input_file="samples.csv",
x_field_num=2,
y_field_num=3,
epsg=4326,
output_path="samples_points.geojson",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_file | string | yes | String parameter for input_file. |
x_field_num | int | no | Numeric parameter for x_field_num. |
y_field_num | int | no | Numeric parameter for y_field_num. |
epsg | int |None | no | Numeric parameter for epsg. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
export_table_to_csv
Exports a vector layer's attribute table to CSV format.
Outputs
return:str
WbEnvironment usage
csv_path = wbe.conversion.vector_table_io.export_table_to_csv(parcels, output_csv_file="parcels_table.csv", headers=True)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
output_csv_file | string |None | no | String parameter for output_csv_file. |
headers | bool | no | Boolean option for headers. |
callback | function | no | Optional progress callback receiving JSON events. |
fix_dangling_arcs
Fixes undershot and overshot dangling arcs in a line network by snapping line endpoints that fall within a distance threshold.
Outputs
return:Vector
WbEnvironment usage
fixed_lines = wbe.conversion.geometry_topology.fix_dangling_arcs(lines, snap_dist=5.0, output_path="lines_fixed.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
snap_dist | float | yes | Numeric parameter for snap_dist. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
new_raster_from_base_raster
Creates a new raster with the same rows, columns, extent, cell size, and CRS as a base raster.
Outputs
return:Raster
WbEnvironment usage
blank = wbe.conversion.raster_vector_conversion.new_raster_from_base_raster(base_raster, out_val=0.0, data_type="float", output_path="blank.tif")
Parameters:
base: Base raster.out_val: Optional fill value. Defaults to the base raster nodata value.data_type: One offloat,double, orinteger.output_path: Optional output path.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base | Raster | yes | Input raster for base. |
out_val | float |None | no | Numeric parameter for out_val. |
data_type | string | no | String parameter for data_type. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
new_raster_from_base_vector
Creates a new raster using the extent and CRS from a base vector layer and a required cell_size.
Outputs
return:Raster
WbEnvironment usage
blank = wbe.conversion.raster_vector_conversion.new_raster_from_base_vector(
base=study_area,
cell_size=10.0,
out_val=0.0,
data_type="float",
output_path="blank_from_vector.tif",
)
Parameters:
base: Base vector defining extent.cell_size: Output cell size (> 0).out_val: Optional fill value. Defaults to nodata (-32768).data_type: One offloat,double, orinteger.output_path: Optional output path.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
base | Vector | yes | Input vector layer for base. |
cell_size | float | yes | Numeric parameter for cell_size. |
out_val | float |None | no | Numeric parameter for out_val. |
data_type | Literal["integer", "float", "double"] | no | Numeric parameter for data_type. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
polygons_to_lines
Converts polygon or multipolygon features into boundary linework.
Outputs
return:Vector
WbEnvironment usage
lines = wbe.conversion.geometry_topology.polygons_to_lines(polygons, output_path="boundaries.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
lines_to_polygons
Converts polyline features into polygon features. The first part of a multipart line becomes the exterior ring and later parts become holes.
Outputs
return:Vector
WbEnvironment usage
polygons = wbe.conversion.geometry_topology.lines_to_polygons(lines, output_path="polygons.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
join_tables
Joins attributes from one vector table onto another by matching key fields.
Outputs
return:Vector
WbEnvironment usage
joined = wbe.conversion.vector_table_io.join_tables(
primary_vector=countries,
primary_key_field="COUNTRY",
foreign_vector=stats,
foreign_key_field="COUNTRY",
import_field="POPULATION",
output_path="countries_joined.gpkg",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
primary_vector | Vector | yes | Input vector layer for primary_vector. |
primary_key_field | string | yes | String parameter for primary_key_field. |
foreign_vector | Vector | yes | Input vector layer for foreign_vector. |
foreign_key_field | string | yes | String parameter for foreign_key_field. |
import_field | string |None | no | String parameter for import_field. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
merge_table_with_csv
Merges attributes from a CSV table into a vector attribute table using key fields.
Outputs
return:Vector
WbEnvironment usage
merged = wbe.conversion.vector_table_io.merge_table_with_csv(
primary_vector=countries,
primary_key_field="COUNTRY",
foreign_csv_filename="country_stats.csv",
foreign_key_field="COUNTRY",
import_field="GDP",
output_path="countries_merged.gpkg",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
primary_vector | Vector | yes | Input vector layer for primary_vector. |
primary_key_field | string | yes | String parameter for primary_key_field. |
foreign_csv_filename | string | yes | String parameter for foreign_csv_filename. |
foreign_key_field | string | yes | String parameter for foreign_key_field. |
import_field | string |None | no | String parameter for import_field. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
modify_nodata_value
Changes the raster nodata value and rewrites any existing nodata cells to the new value.
Outputs
return:Raster
WbEnvironment usage
updated = wbe.conversion.raster_vector_conversion.modify_nodata_value(input_raster, new_value=-9999.0, output_path="nodata_modified.tif")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster for input. |
new_value | float | no | Numeric parameter for new_value. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
print_geotiff_tags
Builds a text report describing TIFF/GeoTIFF tags and key metadata. If the input is not a TIFF-family raster, the tool returns a warning message instead of a hard failure.
Outputs
return:str
WbEnvironment usage
report = wbe.raster.print_geotiff_tags(input_raster)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster for input. |
callback | function | no | Optional progress callback receiving JSON events. |
raster_to_vector_points
Converts each non-zero, non-nodata cell in a single-band raster into a point feature located at the cell centre, with FID and VALUE attributes.
Outputs
return:Vector
WbEnvironment usage
points = wbe.conversion.raster_vector_conversion.raster_to_vector_points(classified_raster, output_path="classified_points.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
raster_to_vector_lines
Converts non-zero, non-nodata cells in a single-band raster to polyline features. Output attributes include FID and the raster VALUE represented by each traced line.
Outputs
return:Vector
WbEnvironment usage
lines = wbe.conversion.raster_vector_conversion.raster_to_vector_lines(line_raster, output_path="line_features.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
raster_to_vector_polygons
Converts contiguous non-zero, non-nodata raster regions into polygon vector features. Output attributes include FID and source raster VALUE for each polygonized region.
Outputs
return:Vector
WbEnvironment usage
polys = wbe.conversion.raster_vector_conversion.raster_to_vector_polygons(classified_raster, output_path="regions.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
reinitialize_attribute_table
Creates a copy of a vector layer whose attribute table contains only a regenerated FID field.
Outputs
return:Vector
WbEnvironment usage
fid_only = wbe.conversion.vector_table_io.reinitialize_attribute_table(input_vector, output_path="fid_only.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
remove_polygon_holes
Removes all interior rings from polygon and multipolygon features while preserving attributes.
Outputs
return:Vector
WbEnvironment usage
solid_polygons = wbe.conversion.geometry_topology.remove_polygon_holes(polygons, output_path="polygons_no_holes.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
remove_raster_polygon_holes
Removes enclosed background holes from raster polygons, where background is defined as 0 or nodata. Holes connected to raster edges are preserved. Optionally limits removals to holes below a threshold_size and can use 8-neighbour connectedness with use_diagonals=True.
Outputs
return:Raster
WbEnvironment usage
filled = wbe.conversion.raster_vector_conversion.remove_raster_polygon_holes(
input=classified,
threshold_size=500,
use_diagonals=True,
output_path="classified_no_holes.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster for input. |
threshold_size | int |None | no | Numeric parameter for threshold_size. |
use_diagonals | bool | no | Boolean option for use_diagonals. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
set_nodata_value
Sets a new nodata background value for a raster and maps existing nodata cells to that value. If a negative value is used with an unsigned input, the output raster type is promoted to a compatible signed integer type.
Outputs
return:Raster
WbEnvironment usage
updated = wbe.conversion.raster_vector_conversion.set_nodata_value(input_raster, back_value=-9999.0, output_path="nodata_set.tif")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Raster | yes | Input raster for input. |
back_value | float | no | Numeric parameter for back_value. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
merge_vectors
Combines two or more input vectors of the same geometry type into a single output vector. The output attribute table contains FID, PARENT (source layer filename stem), PARENT_FID, and any attribute fields that are common to all input layers (same name and field type).
Outputs
return:Vector
WbEnvironment usage
merged = wbe.conversion.vector_table_io.merge_vectors([roads_a, roads_b, roads_c], output_path="roads_merged.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
inputs | Vector | yes | Input vector layer for inputs. |
output_path | string | yes | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
multipart_to_singlepart
Splits multi-part features (MultiPoint, MultiLineString, MultiPolygon) into individual single-part features. Each sub-geometry becomes a new output feature inheriting the source feature's attributes. For polygon inputs, setting exclude_holes=True keeps interior rings attached to their enclosing exterior ring rather than splitting them into independent features.
Outputs
return:Vector
WbEnvironment usage
# Split all parts (holes become independent polygons)
single = wbe.conversion.geometry_topology.multipart_to_singlepart(parcels, output_path="parcels_single.geojson")
# Keep holes attached to their enclosing polygon
single = wbe.conversion.geometry_topology.multipart_to_singlepart(parcels, exclude_holes=True, output_path="parcels_single.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
exclude_holes | bool | no | Boolean option for exclude_holes. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
singlepart_to_multipart
Merges single-part features into multi-part features. When field is provided, features sharing the same value for that field are grouped into one multi-part geometry. When field is omitted, all features in the layer are merged into a single geometry. Output geometry type is promoted to the corresponding multi-part type (Point → MultiPoint; LineString → MultiLineString; Polygon → MultiPolygon).
Outputs
return:Vector
WbEnvironment usage
# Group parcels belonging to the same owner
multi = wbe.conversion.geometry_topology.singlepart_to_multipart(parcels, field="OWNER_ID", output_path="parcels_multi.geojson")
# Merge all features into one geometry
multi = wbe.conversion.geometry_topology.singlepart_to_multipart(parcels, output_path="all_merged.geojson")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
field | string |None | no | String parameter for field. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
vector_points_to_raster
Rasterizes point or multipoint vectors to a grid using a selected assignment operation (last, first, min, max, sum, num, mean). Grid definition can come from a base_raster or from cell_size plus vector extent.
Outputs
return:Raster
WbEnvironment usage
# Use a base raster grid and compute per-cell mean
out = wbe.conversion.raster_vector_conversion.vector_points_to_raster(
input=points,
field_name="VALUE",
assign_op="mean",
base_raster=base,
output_path="points_mean.tif",
)
# Build output grid from point extent and cell size
out2 = wbe.conversion.raster_vector_conversion.vector_points_to_raster(
input=points,
field_name="VALUE",
assign_op="max",
cell_size=5.0,
zero_background=True,
output_path="points_max.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
field_name | string |None | no | String parameter for field_name. |
assign_op | string | no | String parameter for assign_op. |
zero_background | bool | no | Boolean option for zero_background. |
cell_size | float | no | Numeric parameter for cell_size. |
base_raster | Raster | no | Input raster for base_raster. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
vector_lines_to_raster
Rasterizes line or polygon-boundary geometries to a raster grid. Burn values come from an optional numeric field_name or from feature IDs when no field is supplied. Grid geometry can be inherited from a base_raster or created from input extent and cell_size.
Outputs
return:Raster
WbEnvironment usage
# Burn road class values onto an existing base raster grid
roads_r = wbe.conversion.raster_vector_conversion.vector_lines_to_raster(
input=roads,
field_name="CLASS_ID",
base_raster=base,
output_path="roads_burned.tif",
)
# Build output grid from vector extent
lines_r = wbe.conversion.raster_vector_conversion.vector_lines_to_raster(
input=lines,
cell_size=10.0,
zero_background=True,
output_path="lines_extent_grid.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
field_name | string |None | no | String parameter for field_name. |
zero_background | bool | no | Boolean option for zero_background. |
cell_size | float | no | Numeric parameter for cell_size. |
base_raster | Raster | no | Input raster for base_raster. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
vector_polygons_to_raster
Rasterizes polygon features using an optional numeric attribute field; otherwise burns feature IDs.
Outputs
return:Raster
WbEnvironment usage
poly_raster = wbe.conversion.raster_vector_conversion.vector_polygons_to_raster(
input=landcover_polys,
field_name="CLASS_ID",
zero_background=True,
base_raster=base,
output_path="landcover.tif",
)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | Vector | yes | Input vector layer for input. |
field_name | string |None | no | String parameter for field_name. |
zero_background | bool | no | Boolean option for zero_background. |
cell_size | float | no | Numeric parameter for cell_size. |
base_raster | Raster | no | Input raster for base_raster. |
output | string | no | Optional output path. If omitted, the result is returned in memory when supported. |
callback | function | no | Optional progress callback receiving JSON events. |
Tool Call Paths (R)
This chapter maps each tool identifier to concrete R call surfaces and summarizes outputs.
Call pattern:
- Generated wrapper: s$tool_id(...)
- Generic execution: wbw_run_tool("tool_id", args = list(...), session = s)
Total tools: 747
| Tool ID | Category | Subcategory | Wrapper Call | Generic Call | Return Type | Output Summary |
|---|---|---|---|---|---|---|
abs | raster | general | s$abs(...) | wbw_run_tool("abs", args = list(...), session = s) | Raster | Raster output |
accumulation_curvature | terrain | derivatives | s$accumulation_curvature(...) | wbw_run_tool("accumulation_curvature", args = list(...), session = s) | Raster | Raster output |
adaptive_filter | remote_sensing | filters | s$adaptive_filter(...) | wbw_run_tool("adaptive_filter", args = list(...), session = s) | Raster | Raster output |
add | raster | overlay_math | s$add(...) | wbw_run_tool("add", args = list(...), session = s) | Raster | Raster output |
add_field | vector | attribute_analysis | s$add_field(...) | wbw_run_tool("add_field", args = list(...), session = s) | Vector | Vector output |
add_geometry_attributes | vector | attribute_analysis | s$add_geometry_attributes(...) | wbw_run_tool("add_geometry_attributes", args = list(...), session = s) | Vector | Vector output |
add_point_coordinates_to_table | conversion | vector_table_io | s$add_point_coordinates_to_table(...) | wbw_run_tool("add_point_coordinates_to_table", args = list(...), session = s) | Vector | Vector output |
aggregate_raster | raster | general | s$aggregate_raster(...) | wbw_run_tool("aggregate_raster", args = list(...), session = s) | Raster | Raster output |
anisotropic_diffusion_filter | remote_sensing | filters | s$anisotropic_diffusion_filter(...) | wbw_run_tool("anisotropic_diffusion_filter", args = list(...), session = s) | Raster | Raster output |
anova | raster | general | s$anova(...) | wbw_run_tool("anova", args = list(...), session = s) | str | Report/path string output |
arccos | raster | general | s$arccos(...) | wbw_run_tool("arccos", args = list(...), session = s) | Raster | Raster output |
arcosh | raster | general | s$arcosh(...) | wbw_run_tool("arcosh", args = list(...), session = s) | Raster | Raster output |
arcsin | raster | general | s$arcsin(...) | wbw_run_tool("arcsin", args = list(...), session = s) | Raster | Raster output |
arctan | raster | general | s$arctan(...) | wbw_run_tool("arctan", args = list(...), session = s) | Raster | Raster output |
arsinh | raster | general | s$arsinh(...) | wbw_run_tool("arsinh", args = list(...), session = s) | Raster | Raster output |
artanh | raster | general | s$artanh(...) | wbw_run_tool("artanh", args = list(...), session = s) | Raster | Raster output |
ascii_to_las | lidar | io_management | s$ascii_to_las(...) | wbw_run_tool("ascii_to_las", args = list(...), session = s) | Lidar | LiDAR output |
aspect | terrain | derivatives | s$aspect(...) | wbw_run_tool("aspect", args = list(...), session = s) | Raster | Raster output |
assess_route | terrain | general | s$assess_route(...) | wbw_run_tool("assess_route", args = list(...), session = s) | Vector | Vector output |
assign_projection_lidar | projection_georeferencing | general | s$assign_projection_lidar(...) | wbw_run_tool("assign_projection_lidar", args = list(...), session = s) | Any | See tool docs |
assign_projection_raster | projection_georeferencing | general | s$assign_projection_raster(...) | wbw_run_tool("assign_projection_raster", args = list(...), session = s) | Any | See tool docs |
assign_projection_vector | projection_georeferencing | general | s$assign_projection_vector(...) | wbw_run_tool("assign_projection_vector", args = list(...), session = s) | Any | See tool docs |
atan2 | raster | general | s$atan2(...) | wbw_run_tool("atan2", args = list(...), session = s) | Raster | Raster output |
attribute_correlation | vector | attribute_analysis | s$attribute_correlation(...) | wbw_run_tool("attribute_correlation", args = list(...), session = s) | str | Report/path string output |
attribute_histogram | vector | attribute_analysis | s$attribute_histogram(...) | wbw_run_tool("attribute_histogram", args = list(...), session = s) | str | Report/path string output |
attribute_scattergram | vector | attribute_analysis | s$attribute_scattergram(...) | wbw_run_tool("attribute_scattergram", args = list(...), session = s) | str | Report/path string output |
average_flowpath_slope | hydrology | flow_routing | s$average_flowpath_slope(...) | wbw_run_tool("average_flowpath_slope", args = list(...), session = s) | Raster | Raster output |
average_horizon_distance | terrain | visibility | s$average_horizon_distance(...) | wbw_run_tool("average_horizon_distance", args = list(...), session = s) | Raster | Raster output |
average_normal_vector_angular_deviation | terrain | roughness_texture | s$average_normal_vector_angular_deviation(...) | wbw_run_tool("average_normal_vector_angular_deviation", args = list(...), session = s) | Raster | Raster output |
average_overlay | raster | overlay_math | s$average_overlay(...) | wbw_run_tool("average_overlay", args = list(...), session = s) | Raster | Raster output |
average_upslope_flowpath_length | hydrology | flow_routing | s$average_upslope_flowpath_length(...) | wbw_run_tool("average_upslope_flowpath_length", args = list(...), session = s) | Raster | Raster output |
balance_contrast_enhancement | remote_sensing | enhancement_contrast | s$balance_contrast_enhancement(...) | wbw_run_tool("balance_contrast_enhancement", args = list(...), session = s) | Raster | Raster output |
basins | hydrology | watersheds_basins | s$basins(...) | wbw_run_tool("basins", args = list(...), session = s) | Raster | Raster output |
bilateral_filter | remote_sensing | filters | s$bilateral_filter(...) | wbw_run_tool("bilateral_filter", args = list(...), session = s) | Raster | Raster output |
block_maximum | raster | general | s$block_maximum(...) | wbw_run_tool("block_maximum", args = list(...), session = s) | Raster | Raster output |
block_minimum | raster | general | s$block_minimum(...) | wbw_run_tool("block_minimum", args = list(...), session = s) | Raster | Raster output |
bool_and | raster | overlay_math | s$bool_and(...) | wbw_run_tool("bool_and", args = list(...), session = s) | Raster | Raster output |
bool_not | raster | overlay_math | s$bool_not(...) | wbw_run_tool("bool_not", args = list(...), session = s) | Raster | Raster output |
bool_or | raster | overlay_math | s$bool_or(...) | wbw_run_tool("bool_or", args = list(...), session = s) | Raster | Raster output |
bool_xor | raster | overlay_math | s$bool_xor(...) | wbw_run_tool("bool_xor", args = list(...), session = s) | Raster | Raster output |
boundary_shape_complexity | raster | general | s$boundary_shape_complexity(...) | wbw_run_tool("boundary_shape_complexity", args = list(...), session = s) | Raster | Raster output |
brdf_normalization | remote_sensing | radiometric_correction | s$brdf_normalization(...) | wbw_run_tool("brdf_normalization", args = list(...), session = s) | Any | See tool docs |
brdf_surface_reflectance_consistency | remote_sensing | radiometric_correction | s$brdf_surface_reflectance_consistency(...) | wbw_run_tool("brdf_surface_reflectance_consistency", args = list(...), session = s) | tuple[Raster, Raster, Raster, str] | Multiple outputs (tuple) |
breach_depressions_least_cost | hydrology | depressions_storage | s$breach_depressions_least_cost(...) | wbw_run_tool("breach_depressions_least_cost", args = list(...), session = s) | Raster | Raster output |
breach_single_cell_pits | hydrology | depressions_storage | s$breach_single_cell_pits(...) | wbw_run_tool("breach_single_cell_pits", args = list(...), session = s) | Raster | Raster output |
breakline_mapping | terrain | general | s$breakline_mapping(...) | wbw_run_tool("breakline_mapping", args = list(...), session = s) | Vector | Vector output |
buffer_raster | raster | distance_cost | s$buffer_raster(...) | wbw_run_tool("buffer_raster", args = list(...), session = s) | Raster | Raster output |
build_network_topology | vector | network_analysis | s$build_network_topology(...) | wbw_run_tool("build_network_topology", args = list(...), session = s) | Any | See tool docs |
build_object_hierarchy_multiscale | remote_sensing | obia | s$build_object_hierarchy_multiscale(...) | wbw_run_tool("build_object_hierarchy_multiscale", args = list(...), session = s) | str | Report/path string output |
burn_streams | hydrology | depressions_storage | s$burn_streams(...) | wbw_run_tool("burn_streams", args = list(...), session = s) | Raster | Raster output |
burn_streams_at_roads | hydrology | depressions_storage | s$burn_streams_at_roads(...) | wbw_run_tool("burn_streams_at_roads", args = list(...), session = s) | Raster | Raster output |
canny_edge_detection | remote_sensing | edge_feature_detection | s$canny_edge_detection(...) | wbw_run_tool("canny_edge_detection", args = list(...), session = s) | Raster | Raster output |
carbon_sequestration_verification_audit | terrain | workflow_products | s$carbon_sequestration_verification_audit(...) | wbw_run_tool("carbon_sequestration_verification_audit", args = list(...), session = s) | Any | See tool docs |
casorati_curvature | terrain | derivatives | s$casorati_curvature(...) | wbw_run_tool("casorati_curvature", args = list(...), session = s) | Raster | Raster output |
ceil | raster | general | s$ceil(...) | wbw_run_tool("ceil", args = list(...), session = s) | Raster | Raster output |
centroid_raster | raster | general | s$centroid_raster(...) | wbw_run_tool("centroid_raster", args = list(...), session = s) | tuple[Raster, str] | Multiple outputs (tuple) |
centroid_vector | vector | geometry_processing | s$centroid_vector(...) | wbw_run_tool("centroid_vector", args = list(...), session = s) | Vector | Vector output |
change_vector_analysis | remote_sensing | change_detection | s$change_vector_analysis(...) | wbw_run_tool("change_vector_analysis", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
circular_variance_of_aspect | terrain | roughness_texture | s$circular_variance_of_aspect(...) | wbw_run_tool("circular_variance_of_aspect", args = list(...), session = s) | Raster | Raster output |
classify_buildings_in_lidar | lidar | filtering_classification | s$classify_buildings_in_lidar(...) | wbw_run_tool("classify_buildings_in_lidar", args = list(...), session = s) | Lidar | LiDAR output |
classify_lidar | lidar | filtering_classification | s$classify_lidar(...) | wbw_run_tool("classify_lidar", args = list(...), session = s) | Lidar | LiDAR output |
classify_objects_ensemble_pro | remote_sensing | obia | s$classify_objects_ensemble_pro(...) | wbw_run_tool("classify_objects_ensemble_pro", args = list(...), session = s) | str | Report/path string output |
classify_objects_random_forest | remote_sensing | obia | s$classify_objects_random_forest(...) | wbw_run_tool("classify_objects_random_forest", args = list(...), session = s) | str | Report/path string output |
classify_objects_rules_basic | remote_sensing | obia | s$classify_objects_rules_basic(...) | wbw_run_tool("classify_objects_rules_basic", args = list(...), session = s) | str | Report/path string output |
classify_objects_rules_hierarchical | remote_sensing | obia | s$classify_objects_rules_hierarchical(...) | wbw_run_tool("classify_objects_rules_hierarchical", args = list(...), session = s) | str | Report/path string output |
classify_objects_svm | remote_sensing | obia | s$classify_objects_svm(...) | wbw_run_tool("classify_objects_svm", args = list(...), session = s) | str | Report/path string output |
classify_overlap_points | lidar | filtering_classification | s$classify_overlap_points(...) | wbw_run_tool("classify_overlap_points", args = list(...), session = s) | Lidar | LiDAR output |
clean_vector | conversion | vector_table_io | s$clean_vector(...) | wbw_run_tool("clean_vector", args = list(...), session = s) | Vector | Vector output |
clip | vector | overlay_analysis | s$clip(...) | wbw_run_tool("clip", args = list(...), session = s) | Vector | Vector output |
clip_lidar_to_polygon | lidar | filtering_classification | s$clip_lidar_to_polygon(...) | wbw_run_tool("clip_lidar_to_polygon", args = list(...), session = s) | Lidar | LiDAR output |
clip_raster_to_polygon | raster | general | s$clip_raster_to_polygon(...) | wbw_run_tool("clip_raster_to_polygon", args = list(...), session = s) | Raster | Raster output |
closest_facility_network | vector | network_analysis | s$closest_facility_network(...) | wbw_run_tool("closest_facility_network", args = list(...), session = s) | Vector | Vector output |
closing | remote_sensing | filters | s$closing(...) | wbw_run_tool("closing", args = list(...), session = s) | Raster | Raster output |
cloude_pottier_decomposition | remote_sensing | sar | s$cloude_pottier_decomposition(...) | wbw_run_tool("cloude_pottier_decomposition", args = list(...), session = s) | Any | See tool docs |
clump | raster | general | s$clump(...) | wbw_run_tool("clump", args = list(...), session = s) | Raster | Raster output |
colourize_based_on_class | lidar | analysis_metrics | s$colourize_based_on_class(...) | wbw_run_tool("colourize_based_on_class", args = list(...), session = s) | Lidar | LiDAR output |
colourize_based_on_point_returns | lidar | analysis_metrics | s$colourize_based_on_point_returns(...) | wbw_run_tool("colourize_based_on_point_returns", args = list(...), session = s) | Lidar | LiDAR output |
compactness_ratio | vector | shape_metrics | s$compactness_ratio(...) | wbw_run_tool("compactness_ratio", args = list(...), session = s) | Vector | Vector output |
concave_hull | vector | geometry_processing | s$concave_hull(...) | wbw_run_tool("concave_hull", args = list(...), session = s) | Vector | Vector output |
conditional_evaluation | raster | reclass_mask | s$conditional_evaluation(...) | wbw_run_tool("conditional_evaluation", args = list(...), session = s) | Raster | Raster output |
conservative_smoothing_filter | remote_sensing | filters | s$conservative_smoothing_filter(...) | wbw_run_tool("conservative_smoothing_filter", args = list(...), session = s) | Raster | Raster output |
construct_vector_tin | vector | sampling_gridding | s$construct_vector_tin(...) | wbw_run_tool("construct_vector_tin", args = list(...), session = s) | Vector | Vector output |
continuum_removal | remote_sensing | spectral_analytics | s$continuum_removal(...) | wbw_run_tool("continuum_removal", args = list(...), session = s) | Any | See tool docs |
contours_from_points | vector | sampling_gridding | s$contours_from_points(...) | wbw_run_tool("contours_from_points", args = list(...), session = s) | Vector | Vector output |
contours_from_raster | vector | sampling_gridding | s$contours_from_raster(...) | wbw_run_tool("contours_from_raster", args = list(...), session = s) | Vector | Vector output |
convergence_index | terrain | general | s$convergence_index(...) | wbw_run_tool("convergence_index", args = list(...), session = s) | Raster | Raster output |
convert_nodata_to_zero | conversion | raster_vector_conversion | s$convert_nodata_to_zero(...) | wbw_run_tool("convert_nodata_to_zero", args = list(...), session = s) | Raster | Raster output |
corner_detection | remote_sensing | edge_feature_detection | s$corner_detection(...) | wbw_run_tool("corner_detection", args = list(...), session = s) | Raster | Raster output |
correct_vignetting | remote_sensing | radiometric_correction | s$correct_vignetting(...) | wbw_run_tool("correct_vignetting", args = list(...), session = s) | Raster | Raster output |
corridor_mapping_intelligence | terrain | workflow_products | s$corridor_mapping_intelligence(...) | wbw_run_tool("corridor_mapping_intelligence", args = list(...), session = s) | Any | See tool docs |
cos | raster | general | s$cos(...) | wbw_run_tool("cos", args = list(...), session = s) | Raster | Raster output |
cosh | raster | general | s$cosh(...) | wbw_run_tool("cosh", args = list(...), session = s) | Raster | Raster output |
cost_allocation | raster | distance_cost | s$cost_allocation(...) | wbw_run_tool("cost_allocation", args = list(...), session = s) | Raster | Raster output |
cost_distance | raster | distance_cost | s$cost_distance(...) | wbw_run_tool("cost_distance", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
cost_pathway | raster | distance_cost | s$cost_pathway(...) | wbw_run_tool("cost_pathway", args = list(...), session = s) | Raster | Raster output |
count_if | raster | overlay_math | s$count_if(...) | wbw_run_tool("count_if", args = list(...), session = s) | Raster | Raster output |
create_colour_composite | remote_sensing | enhancement_contrast | s$create_colour_composite(...) | wbw_run_tool("create_colour_composite", args = list(...), session = s) | Raster | Raster output |
create_plane | raster | general | s$create_plane(...) | wbw_run_tool("create_plane", args = list(...), session = s) | Raster | Raster output |
crispness_index | raster | general | s$crispness_index(...) | wbw_run_tool("crispness_index", args = list(...), session = s) | str | Report/path string output |
cross_tabulation | raster | general | s$cross_tabulation(...) | wbw_run_tool("cross_tabulation", args = list(...), session = s) | str | Report/path string output |
csv_points_to_vector | conversion | vector_table_io | s$csv_points_to_vector(...) | wbw_run_tool("csv_points_to_vector", args = list(...), session = s) | Vector | Vector output |
cumulative_distribution | raster | general | s$cumulative_distribution(...) | wbw_run_tool("cumulative_distribution", args = list(...), session = s) | Raster | Raster output |
curvedness | terrain | derivatives | s$curvedness(...) | wbw_run_tool("curvedness", args = list(...), session = s) | Raster | Raster output |
d8_flow_accum | hydrology | flow_routing | s$d8_flow_accum(...) | wbw_run_tool("d8_flow_accum", args = list(...), session = s) | Raster | Raster output |
d8_mass_flux | hydrology | flow_routing | s$d8_mass_flux(...) | wbw_run_tool("d8_mass_flux", args = list(...), session = s) | Raster | Raster output |
d8_pointer | hydrology | flow_routing | s$d8_pointer(...) | wbw_run_tool("d8_pointer", args = list(...), session = s) | Raster | Raster output |
dark_object_subtraction | remote_sensing | radiometric_correction | s$dark_object_subtraction(...) | wbw_run_tool("dark_object_subtraction", args = list(...), session = s) | Any | See tool docs |
dbscan | raster | general | s$dbscan(...) | wbw_run_tool("dbscan", args = list(...), session = s) | tuple[Raster, str] | Multiple outputs (tuple) |
decrement | raster | general | s$decrement(...) | wbw_run_tool("decrement", args = list(...), session = s) | Raster | Raster output |
delete_field | vector | attribute_analysis | s$delete_field(...) | wbw_run_tool("delete_field", args = list(...), session = s) | Vector | Vector output |
dem_void_filling | terrain | general | s$dem_void_filling(...) | wbw_run_tool("dem_void_filling", args = list(...), session = s) | Raster | Raster output |
densify_features | vector | geometry_processing | s$densify_features(...) | wbw_run_tool("densify_features", args = list(...), session = s) | Vector | Vector output |
depth_in_sink | hydrology | depressions_storage | s$depth_in_sink(...) | wbw_run_tool("depth_in_sink", args = list(...), session = s) | Raster | Raster output |
depth_to_water | hydrology | hydrologic_indices | s$depth_to_water(...) | wbw_run_tool("depth_to_water", args = list(...), session = s) | Raster | Raster output |
deviation_from_mean_elevation | terrain | general | s$deviation_from_mean_elevation(...) | wbw_run_tool("deviation_from_mean_elevation", args = list(...), session = s) | Raster | Raster output |
deviation_from_regional_direction | vector | shape_metrics | s$deviation_from_regional_direction(...) | wbw_run_tool("deviation_from_regional_direction", args = list(...), session = s) | Vector | Vector output |
diff_of_gaussians_filter | remote_sensing | filters | s$diff_of_gaussians_filter(...) | wbw_run_tool("diff_of_gaussians_filter", args = list(...), session = s) | Raster | Raster output |
difference | vector | overlay_analysis | s$difference(...) | wbw_run_tool("difference", args = list(...), session = s) | Vector | Vector output |
difference_curvature | terrain | derivatives | s$difference_curvature(...) | wbw_run_tool("difference_curvature", args = list(...), session = s) | Raster | Raster output |
difference_from_mean_elevation | terrain | general | s$difference_from_mean_elevation(...) | wbw_run_tool("difference_from_mean_elevation", args = list(...), session = s) | Raster | Raster output |
dinf_flow_accum | hydrology | flow_routing | s$dinf_flow_accum(...) | wbw_run_tool("dinf_flow_accum", args = list(...), session = s) | Raster | Raster output |
dinf_mass_flux | hydrology | flow_routing | s$dinf_mass_flux(...) | wbw_run_tool("dinf_mass_flux", args = list(...), session = s) | Raster | Raster output |
dinf_pointer | hydrology | flow_routing | s$dinf_pointer(...) | wbw_run_tool("dinf_pointer", args = list(...), session = s) | Raster | Raster output |
direct_decorrelation_stretch | remote_sensing | enhancement_contrast | s$direct_decorrelation_stretch(...) | wbw_run_tool("direct_decorrelation_stretch", args = list(...), session = s) | Raster | Raster output |
directional_relief | terrain | general | s$directional_relief(...) | wbw_run_tool("directional_relief", args = list(...), session = s) | Raster | Raster output |
dissolve | vector | overlay_analysis | s$dissolve(...) | wbw_run_tool("dissolve", args = list(...), session = s) | Vector | Vector output |
distance_to_outlet | hydrology | hydrologic_indices | s$distance_to_outlet(...) | wbw_run_tool("distance_to_outlet", args = list(...), session = s) | Raster | Raster output |
diversity_filter | remote_sensing | filters | s$diversity_filter(...) | wbw_run_tool("diversity_filter", args = list(...), session = s) | Raster | Raster output |
divide | raster | overlay_math | s$divide(...) | wbw_run_tool("divide", args = list(...), session = s) | Raster | Raster output |
dn_to_toa_reflectance | remote_sensing | radiometric_correction | s$dn_to_toa_reflectance(...) | wbw_run_tool("dn_to_toa_reflectance", args = list(...), session = s) | Any | See tool docs |
download_osm_vector | vector | online_data | s$download_osm_vector(...) | wbw_run_tool("download_osm_vector", args = list(...), session = s) | Any | See tool docs |
downslope_distance_to_stream | hydrology | hydrologic_indices | s$downslope_distance_to_stream(...) | wbw_run_tool("downslope_distance_to_stream", args = list(...), session = s) | Raster | Raster output |
downslope_flowpath_length | hydrology | flow_routing | s$downslope_flowpath_length(...) | wbw_run_tool("downslope_flowpath_length", args = list(...), session = s) | Raster | Raster output |
downslope_index | hydrology | hydrologic_indices | s$downslope_index(...) | wbw_run_tool("downslope_index", args = list(...), session = s) | Raster | Raster output |
edge_contamination | hydrology | hydrologic_indices | s$edge_contamination(...) | wbw_run_tool("edge_contamination", args = list(...), session = s) | Raster | Raster output |
edge_density | terrain | roughness_texture | s$edge_density(...) | wbw_run_tool("edge_density", args = list(...), session = s) | Raster | Raster output |
edge_preserving_mean_filter | remote_sensing | filters | s$edge_preserving_mean_filter(...) | wbw_run_tool("edge_preserving_mean_filter", args = list(...), session = s) | Raster | Raster output |
edge_proportion | raster | general | s$edge_proportion(...) | wbw_run_tool("edge_proportion", args = list(...), session = s) | Raster | Raster output |
elev_above_pit | terrain | general | s$elev_above_pit(...) | wbw_run_tool("elev_above_pit", args = list(...), session = s) | Raster | Raster output |
elev_above_pit_dist | terrain | general | s$elev_above_pit_dist(...) | wbw_run_tool("elev_above_pit_dist", args = list(...), session = s) | Raster | Raster output |
elev_relative_to_min_max | terrain | landform_indices | s$elev_relative_to_min_max(...) | wbw_run_tool("elev_relative_to_min_max", args = list(...), session = s) | Raster | Raster output |
elev_relative_to_watershed_min_max | hydrology | hydrologic_indices | s$elev_relative_to_watershed_min_max(...) | wbw_run_tool("elev_relative_to_watershed_min_max", args = list(...), session = s) | Raster | Raster output |
elevation_above_stream | hydrology | hydrologic_indices | s$elevation_above_stream(...) | wbw_run_tool("elevation_above_stream", args = list(...), session = s) | Raster | Raster output |
elevation_above_stream_euclidean | hydrology | hydrologic_indices | s$elevation_above_stream_euclidean(...) | wbw_run_tool("elevation_above_stream_euclidean", args = list(...), session = s) | Raster | Raster output |
elevation_percentile | terrain | general | s$elevation_percentile(...) | wbw_run_tool("elevation_percentile", args = list(...), session = s) | Raster | Raster output |
eliminate_coincident_points | vector | geometry_processing | s$eliminate_coincident_points(...) | wbw_run_tool("eliminate_coincident_points", args = list(...), session = s) | Vector | Vector output |
elongation_ratio | vector | shape_metrics | s$elongation_ratio(...) | wbw_run_tool("elongation_ratio", args = list(...), session = s) | Vector | Vector output |
embankment_mapping | terrain | general | s$embankment_mapping(...) | wbw_run_tool("embankment_mapping", args = list(...), session = s) | `tuple[Raster, Raster | None]` |
emboss_filter | remote_sensing | filters | s$emboss_filter(...) | wbw_run_tool("emboss_filter", args = list(...), session = s) | Raster | Raster output |
emergency_scenario_routing_and_accessibility_simulator | vector | network_analysis | s$emergency_scenario_routing_and_accessibility_simulator(...) | wbw_run_tool("emergency_scenario_routing_and_accessibility_simulator", args = list(...), session = s) | Any | See tool docs |
enhanced_lee_filter | remote_sensing | sar | s$enhanced_lee_filter(...) | wbw_run_tool("enhanced_lee_filter", args = list(...), session = s) | Raster | Raster output |
equal_to | raster | general | s$equal_to(...) | wbw_run_tool("equal_to", args = list(...), session = s) | Raster | Raster output |
erase | vector | overlay_analysis | s$erase(...) | wbw_run_tool("erase", args = list(...), session = s) | Vector | Vector output |
erase_polygon_from_lidar | lidar | filtering_classification | s$erase_polygon_from_lidar(...) | wbw_run_tool("erase_polygon_from_lidar", args = list(...), session = s) | Lidar | LiDAR output |
erase_polygon_from_raster | raster | general | s$erase_polygon_from_raster(...) | wbw_run_tool("erase_polygon_from_raster", args = list(...), session = s) | Raster | Raster output |
euclidean_allocation | raster | distance_cost | s$euclidean_allocation(...) | wbw_run_tool("euclidean_allocation", args = list(...), session = s) | Raster | Raster output |
euclidean_distance | raster | distance_cost | s$euclidean_distance(...) | wbw_run_tool("euclidean_distance", args = list(...), session = s) | Raster | Raster output |
evaluate_object_classification_accuracy | remote_sensing | obia | s$evaluate_object_classification_accuracy(...) | wbw_run_tool("evaluate_object_classification_accuracy", args = list(...), session = s) | str | Report/path string output |
evaluate_segmentation_quality_pro | remote_sensing | obia | s$evaluate_segmentation_quality_pro(...) | wbw_run_tool("evaluate_segmentation_quality_pro", args = list(...), session = s) | str | Report/path string output |
evaluate_training_sites | remote_sensing | classification | s$evaluate_training_sites(...) | wbw_run_tool("evaluate_training_sites", args = list(...), session = s) | str | Report/path string output |
exp | raster | general | s$exp(...) | wbw_run_tool("exp", args = list(...), session = s) | Raster | Raster output |
exp2 | raster | general | s$exp2(...) | wbw_run_tool("exp2", args = list(...), session = s) | Raster | Raster output |
export_table_to_csv | conversion | vector_table_io | s$export_table_to_csv(...) | wbw_run_tool("export_table_to_csv", args = list(...), session = s) | str | Report/path string output |
exposure_towards_wind_flux | terrain | general | s$exposure_towards_wind_flux(...) | wbw_run_tool("exposure_towards_wind_flux", args = list(...), session = s) | Raster | Raster output |
extend_vector_lines | vector | geometry_processing | s$extend_vector_lines(...) | wbw_run_tool("extend_vector_lines", args = list(...), session = s) | Vector | Vector output |
extract_by_attribute | vector | attribute_analysis | s$extract_by_attribute(...) | wbw_run_tool("extract_by_attribute", args = list(...), session = s) | Vector | Vector output |
extract_nodes | vector | sampling_gridding | s$extract_nodes(...) | wbw_run_tool("extract_nodes", args = list(...), session = s) | Vector | Vector output |
extract_raster_values_at_points | vector | sampling_gridding | s$extract_raster_values_at_points(...) | wbw_run_tool("extract_raster_values_at_points", args = list(...), session = s) | tuple[Vector, str] | Multiple outputs (tuple) |
extract_streams | streams | network_extraction | s$extract_streams(...) | wbw_run_tool("extract_streams", args = list(...), session = s) | Raster | Raster output |
extract_valleys | streams | network_extraction | s$extract_valleys(...) | wbw_run_tool("extract_valleys", args = list(...), session = s) | Raster | Raster output |
false_colour_composite | remote_sensing | enhancement_contrast | s$false_colour_composite(...) | wbw_run_tool("false_colour_composite", args = list(...), session = s) | Any | See tool docs |
farthest_channel_head | streams | longitudinal_analysis | s$farthest_channel_head(...) | wbw_run_tool("farthest_channel_head", args = list(...), session = s) | Raster | Raster output |
fast_almost_gaussian_filter | remote_sensing | filters | s$fast_almost_gaussian_filter(...) | wbw_run_tool("fast_almost_gaussian_filter", args = list(...), session = s) | Raster | Raster output |
fd8_flow_accum | hydrology | flow_routing | s$fd8_flow_accum(...) | wbw_run_tool("fd8_flow_accum", args = list(...), session = s) | Raster | Raster output |
fd8_pointer | hydrology | flow_routing | s$fd8_pointer(...) | wbw_run_tool("fd8_pointer", args = list(...), session = s) | Raster | Raster output |
feature_preserving_smoothing | terrain | general | s$feature_preserving_smoothing(...) | wbw_run_tool("feature_preserving_smoothing", args = list(...), session = s) | Raster | Raster output |
feature_preserving_smoothing_multiscale | terrain | general | s$feature_preserving_smoothing_multiscale(...) | wbw_run_tool("feature_preserving_smoothing_multiscale", args = list(...), session = s) | Any | See tool docs |
fetch_analysis | terrain | general | s$fetch_analysis(...) | wbw_run_tool("fetch_analysis", args = list(...), session = s) | Raster | Raster output |
fft_random_field | raster | general | s$fft_random_field(...) | wbw_run_tool("fft_random_field", args = list(...), session = s) | Raster | Raster output |
field_calculator | vector | attribute_analysis | s$field_calculator(...) | wbw_run_tool("field_calculator", args = list(...), session = s) | Vector | Vector output |
field_trafficability_and_operation_planning | precision_agriculture | general | s$field_trafficability_and_operation_planning(...) | wbw_run_tool("field_trafficability_and_operation_planning", args = list(...), session = s) | Any | See tool docs |
fill_burn | hydrology | depressions_storage | s$fill_burn(...) | wbw_run_tool("fill_burn", args = list(...), session = s) | Raster | Raster output |
fill_depressions | hydrology | depressions_storage | s$fill_depressions(...) | wbw_run_tool("fill_depressions", args = list(...), session = s) | Raster | Raster output |
fill_depressions_planchon_and_darboux | hydrology | depressions_storage | s$fill_depressions_planchon_and_darboux(...) | wbw_run_tool("fill_depressions_planchon_and_darboux", args = list(...), session = s) | Raster | Raster output |
fill_depressions_wang_and_liu | hydrology | depressions_storage | s$fill_depressions_wang_and_liu(...) | wbw_run_tool("fill_depressions_wang_and_liu", args = list(...), session = s) | Raster | Raster output |
fill_missing_data | terrain | general | s$fill_missing_data(...) | wbw_run_tool("fill_missing_data", args = list(...), session = s) | Raster | Raster output |
fill_pits | hydrology | depressions_storage | s$fill_pits(...) | wbw_run_tool("fill_pits", args = list(...), session = s) | Raster | Raster output |
filter_lidar | lidar | filtering_classification | s$filter_lidar(...) | wbw_run_tool("filter_lidar", args = list(...), session = s) | Lidar | LiDAR output |
filter_lidar_by_percentile | lidar | filtering_classification | s$filter_lidar_by_percentile(...) | wbw_run_tool("filter_lidar_by_percentile", args = list(...), session = s) | Lidar | LiDAR output |
filter_lidar_by_reference_surface | lidar | filtering_classification | s$filter_lidar_by_reference_surface(...) | wbw_run_tool("filter_lidar_by_reference_surface", args = list(...), session = s) | Lidar | LiDAR output |
filter_lidar_classes | lidar | filtering_classification | s$filter_lidar_classes(...) | wbw_run_tool("filter_lidar_classes", args = list(...), session = s) | Lidar | LiDAR output |
filter_lidar_noise | lidar | filtering_classification | s$filter_lidar_noise(...) | wbw_run_tool("filter_lidar_noise", args = list(...), session = s) | Lidar | LiDAR output |
filter_lidar_scan_angles | lidar | filtering_classification | s$filter_lidar_scan_angles(...) | wbw_run_tool("filter_lidar_scan_angles", args = list(...), session = s) | Lidar | LiDAR output |
filter_raster_features_by_area | raster | general | s$filter_raster_features_by_area(...) | wbw_run_tool("filter_raster_features_by_area", args = list(...), session = s) | Raster | Raster output |
filter_vector_features_by_area | vector | attribute_analysis | s$filter_vector_features_by_area(...) | wbw_run_tool("filter_vector_features_by_area", args = list(...), session = s) | Vector | Vector output |
find_flightline_edge_points | lidar | analysis_metrics | s$find_flightline_edge_points(...) | wbw_run_tool("find_flightline_edge_points", args = list(...), session = s) | Lidar | LiDAR output |
find_lowest_or_highest_points | vector | sampling_gridding | s$find_lowest_or_highest_points(...) | wbw_run_tool("find_lowest_or_highest_points", args = list(...), session = s) | Vector | Vector output |
find_main_stem | streams | longitudinal_analysis | s$find_main_stem(...) | wbw_run_tool("find_main_stem", args = list(...), session = s) | Raster | Raster output |
find_noflow_cells | hydrology | hydrologic_indices | s$find_noflow_cells(...) | wbw_run_tool("find_noflow_cells", args = list(...), session = s) | Raster | Raster output |
find_parallel_flow | hydrology | hydrologic_indices | s$find_parallel_flow(...) | wbw_run_tool("find_parallel_flow", args = list(...), session = s) | Raster | Raster output |
find_patch_edge_cells | raster | general | s$find_patch_edge_cells(...) | wbw_run_tool("find_patch_edge_cells", args = list(...), session = s) | Raster | Raster output |
find_ridges | terrain | general | s$find_ridges(...) | wbw_run_tool("find_ridges", args = list(...), session = s) | Raster | Raster output |
fix_dangling_arcs | conversion | geometry_topology | s$fix_dangling_arcs(...) | wbw_run_tool("fix_dangling_arcs", args = list(...), session = s) | Vector | Vector output |
flatten_lakes | hydrology | depressions_storage | s$flatten_lakes(...) | wbw_run_tool("flatten_lakes", args = list(...), session = s) | Raster | Raster output |
fleet_routing_and_dispatch_optimizer | vector | network_analysis | s$fleet_routing_and_dispatch_optimizer(...) | wbw_run_tool("fleet_routing_and_dispatch_optimizer", args = list(...), session = s) | Any | See tool docs |
flightline_overlap | lidar | interpolation_gridding | s$flightline_overlap(...) | wbw_run_tool("flightline_overlap", args = list(...), session = s) | Raster | Raster output |
flip_image | remote_sensing | filters | s$flip_image(...) | wbw_run_tool("flip_image", args = list(...), session = s) | Raster | Raster output |
flood_order | hydrology | watersheds_basins | s$flood_order(...) | wbw_run_tool("flood_order", args = list(...), session = s) | Raster | Raster output |
floor | raster | general | s$floor(...) | wbw_run_tool("floor", args = list(...), session = s) | Raster | Raster output |
flow_accum_full_workflow | hydrology | flow_routing | s$flow_accum_full_workflow(...) | wbw_run_tool("flow_accum_full_workflow", args = list(...), session = s) | tuple[Raster, Raster, Raster] | Multiple outputs (tuple) |
flow_length_diff | hydrology | flow_routing | s$flow_length_diff(...) | wbw_run_tool("flow_length_diff", args = list(...), session = s) | Raster | Raster output |
forestry_structure_and_biomass_intelligence | terrain | workflow_products | s$forestry_structure_and_biomass_intelligence(...) | wbw_run_tool("forestry_structure_and_biomass_intelligence", args = list(...), session = s) | Any | See tool docs |
frangi_filter | remote_sensing | filters | s$frangi_filter(...) | wbw_run_tool("frangi_filter", args = list(...), session = s) | Raster | Raster output |
freeman_durden_decomposition | remote_sensing | sar | s$freeman_durden_decomposition(...) | wbw_run_tool("freeman_durden_decomposition", args = list(...), session = s) | Any | See tool docs |
frost_filter | remote_sensing | sar | s$frost_filter(...) | wbw_run_tool("frost_filter", args = list(...), session = s) | Raster | Raster output |
fuzzy_knn_classification | remote_sensing | classification | s$fuzzy_knn_classification(...) | wbw_run_tool("fuzzy_knn_classification", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
gabor_filter_bank | remote_sensing | filters | s$gabor_filter_bank(...) | wbw_run_tool("gabor_filter_bank", args = list(...), session = s) | Raster | Raster output |
gamma_correction | remote_sensing | enhancement_contrast | s$gamma_correction(...) | wbw_run_tool("gamma_correction", args = list(...), session = s) | Raster | Raster output |
gamma_map_filter | remote_sensing | sar | s$gamma_map_filter(...) | wbw_run_tool("gamma_map_filter", args = list(...), session = s) | Raster | Raster output |
gaussian_contrast_stretch | remote_sensing | enhancement_contrast | s$gaussian_contrast_stretch(...) | wbw_run_tool("gaussian_contrast_stretch", args = list(...), session = s) | Raster | Raster output |
gaussian_curvature | terrain | derivatives | s$gaussian_curvature(...) | wbw_run_tool("gaussian_curvature", args = list(...), session = s) | Raster | Raster output |
gaussian_filter | remote_sensing | filters | s$gaussian_filter(...) | wbw_run_tool("gaussian_filter", args = list(...), session = s) | Raster | Raster output |
generalize_classified_raster | remote_sensing | classification | s$generalize_classified_raster(...) | wbw_run_tool("generalize_classified_raster", args = list(...), session = s) | Raster | Raster output |
generalize_with_similarity | remote_sensing | classification | s$generalize_with_similarity(...) | wbw_run_tool("generalize_with_similarity", args = list(...), session = s) | Raster | Raster output |
generate_network_nodes | vector | network_analysis | s$generate_network_nodes(...) | wbw_run_tool("generate_network_nodes", args = list(...), session = s) | Any | See tool docs |
generating_function | terrain | derivatives | s$generating_function(...) | wbw_run_tool("generating_function", args = list(...), session = s) | Raster | Raster output |
geomorphons | terrain | landform_indices | s$geomorphons(...) | wbw_run_tool("geomorphons", args = list(...), session = s) | Raster | Raster output |
georeference_raster_from_control_points | projection_georeferencing | general | s$georeference_raster_from_control_points(...) | wbw_run_tool("georeference_raster_from_control_points", args = list(...), session = s) | Any | See tool docs |
glcm_texture | remote_sensing | filters | s$glcm_texture(...) | wbw_run_tool("glcm_texture", args = list(...), session = s) | Raster | Raster output |
greater_than | raster | general | s$greater_than(...) | wbw_run_tool("greater_than", args = list(...), session = s) | Raster | Raster output |
guided_filter | remote_sensing | filters | s$guided_filter(...) | wbw_run_tool("guided_filter", args = list(...), session = s) | Raster | Raster output |
guided_uav_image_intake_workflow | remote_sensing | workflow_products | s$guided_uav_image_intake_workflow(...) | wbw_run_tool("guided_uav_image_intake_workflow", args = list(...), session = s) | Any | See tool docs |
h_alpha_wisart_classification | remote_sensing | sar | s$h_alpha_wisart_classification(...) | wbw_run_tool("h_alpha_wisart_classification", args = list(...), session = s) | Raster | Raster output |
hack_stream_order | streams | ordering_metrics | s$hack_stream_order(...) | wbw_run_tool("hack_stream_order", args = list(...), session = s) | Raster | Raster output |
heat_map | raster | general | s$heat_map(...) | wbw_run_tool("heat_map", args = list(...), session = s) | Raster | Raster output |
height_above_ground | lidar | filtering_classification | s$height_above_ground(...) | wbw_run_tool("height_above_ground", args = list(...), session = s) | Lidar | LiDAR output |
hexagonal_grid_from_raster_base | vector | sampling_gridding | s$hexagonal_grid_from_raster_base(...) | wbw_run_tool("hexagonal_grid_from_raster_base", args = list(...), session = s) | Vector | Vector output |
hexagonal_grid_from_vector_base | vector | sampling_gridding | s$hexagonal_grid_from_vector_base(...) | wbw_run_tool("hexagonal_grid_from_vector_base", args = list(...), session = s) | Vector | Vector output |
high_pass_bilateral_filter | remote_sensing | filters | s$high_pass_bilateral_filter(...) | wbw_run_tool("high_pass_bilateral_filter", args = list(...), session = s) | Raster | Raster output |
high_pass_filter | remote_sensing | filters | s$high_pass_filter(...) | wbw_run_tool("high_pass_filter", args = list(...), session = s) | Raster | Raster output |
high_pass_median_filter | remote_sensing | filters | s$high_pass_median_filter(...) | wbw_run_tool("high_pass_median_filter", args = list(...), session = s) | Raster | Raster output |
highest_position | raster | overlay_math | s$highest_position(...) | wbw_run_tool("highest_position", args = list(...), session = s) | Raster | Raster output |
hillshade | terrain | general | s$hillshade(...) | wbw_run_tool("hillshade", args = list(...), session = s) | Raster | Raster output |
hillslopes | hydrology | watersheds_basins | s$hillslopes(...) | wbw_run_tool("hillslopes", args = list(...), session = s) | Raster | Raster output |
histogram_equalization | remote_sensing | enhancement_contrast | s$histogram_equalization(...) | wbw_run_tool("histogram_equalization", args = list(...), session = s) | Raster | Raster output |
histogram_matching | remote_sensing | enhancement_contrast | s$histogram_matching(...) | wbw_run_tool("histogram_matching", args = list(...), session = s) | Raster | Raster output |
histogram_matching_two_images | remote_sensing | enhancement_contrast | s$histogram_matching_two_images(...) | wbw_run_tool("histogram_matching_two_images", args = list(...), session = s) | Raster | Raster output |
hole_proportion | vector | shape_metrics | s$hole_proportion(...) | wbw_run_tool("hole_proportion", args = list(...), session = s) | Vector | Vector output |
horizon_angle | terrain | visibility | s$horizon_angle(...) | wbw_run_tool("horizon_angle", args = list(...), session = s) | Raster | Raster output |
horizon_area | terrain | visibility | s$horizon_area(...) | wbw_run_tool("horizon_area", args = list(...), session = s) | Raster | Raster output |
horizontal_excess_curvature | terrain | derivatives | s$horizontal_excess_curvature(...) | wbw_run_tool("horizontal_excess_curvature", args = list(...), session = s) | Raster | Raster output |
horton_ratios | streams | ordering_metrics | s$horton_ratios(...) | wbw_run_tool("horton_ratios", args = list(...), session = s) | `tuple[float, float, float, float, str | None]` |
horton_stream_order | streams | ordering_metrics | s$horton_stream_order(...) | wbw_run_tool("horton_stream_order", args = list(...), session = s) | Raster | Raster output |
hydrologic_connectivity | hydrology | hydrologic_indices | s$hydrologic_connectivity(...) | wbw_run_tool("hydrologic_connectivity", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
hypsometric_analysis | terrain | landform_indices | s$hypsometric_analysis(...) | wbw_run_tool("hypsometric_analysis", args = list(...), session = s) | str | Report/path string output |
hypsometrically_tinted_hillshade | terrain | general | s$hypsometrically_tinted_hillshade(...) | wbw_run_tool("hypsometrically_tinted_hillshade", args = list(...), session = s) | Raster | Raster output |
identity | vector | overlay_analysis | s$identity(...) | wbw_run_tool("identity", args = list(...), session = s) | Vector | Vector output |
idw_interpolation | raster | general | s$idw_interpolation(...) | wbw_run_tool("idw_interpolation", args = list(...), session = s) | Raster | Raster output |
ihs_to_rgb | remote_sensing | enhancement_contrast | s$ihs_to_rgb(...) | wbw_run_tool("ihs_to_rgb", args = list(...), session = s) | tuple[Raster, Raster, Raster] | Multiple outputs (tuple) |
image_autocorrelation | raster | general | s$image_autocorrelation(...) | wbw_run_tool("image_autocorrelation", args = list(...), session = s) | str | Report/path string output |
image_correlation | raster | general | s$image_correlation(...) | wbw_run_tool("image_correlation", args = list(...), session = s) | str | Report/path string output |
image_correlation_neighbourhood_analysis | raster | local_neighborhood | s$image_correlation_neighbourhood_analysis(...) | wbw_run_tool("image_correlation_neighbourhood_analysis", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
image_difference_change_detection | remote_sensing | change_detection | s$image_difference_change_detection(...) | wbw_run_tool("image_difference_change_detection", args = list(...), session = s) | Any | See tool docs |
image_regression | raster | general | s$image_regression(...) | wbw_run_tool("image_regression", args = list(...), session = s) | tuple[Raster, str] | Multiple outputs (tuple) |
image_segmentation | remote_sensing | obia | s$image_segmentation(...) | wbw_run_tool("image_segmentation", args = list(...), session = s) | Raster | Raster output |
image_slider | remote_sensing | obia | s$image_slider(...) | wbw_run_tool("image_slider", args = list(...), session = s) | str | Report/path string output |
image_stack_profile | remote_sensing | obia | s$image_stack_profile(...) | wbw_run_tool("image_stack_profile", args = list(...), session = s) | Any | See tool docs |
impoundment_size_index | hydrology | depressions_storage | s$impoundment_size_index(...) | wbw_run_tool("impoundment_size_index", args = list(...), session = s) | `tuple[Raster | None, Raster |
improved_ground_point_filter | lidar | filtering_classification | s$improved_ground_point_filter(...) | wbw_run_tool("improved_ground_point_filter", args = list(...), session = s) | Lidar | LiDAR output |
in_season_crop_stress_intervention_planning | precision_agriculture | general | s$in_season_crop_stress_intervention_planning(...) | wbw_run_tool("in_season_crop_stress_intervention_planning", args = list(...), session = s) | Any | See tool docs |
increment | raster | general | s$increment(...) | wbw_run_tool("increment", args = list(...), session = s) | Raster | Raster output |
individual_tree_detection | lidar | analysis_metrics | s$individual_tree_detection(...) | wbw_run_tool("individual_tree_detection", args = list(...), session = s) | Vector | Vector output |
individual_tree_segmentation | lidar | filtering_classification | s$individual_tree_segmentation(...) | wbw_run_tool("individual_tree_segmentation", args = list(...), session = s) | Lidar | LiDAR output |
inplace_add | raster | general | s$inplace_add(...) | wbw_run_tool("inplace_add", args = list(...), session = s) | Raster | Raster output |
inplace_divide | raster | general | s$inplace_divide(...) | wbw_run_tool("inplace_divide", args = list(...), session = s) | Raster | Raster output |
inplace_multiply | raster | general | s$inplace_multiply(...) | wbw_run_tool("inplace_multiply", args = list(...), session = s) | Raster | Raster output |
inplace_subtract | raster | general | s$inplace_subtract(...) | wbw_run_tool("inplace_subtract", args = list(...), session = s) | Raster | Raster output |
insert_dams | hydrology | depressions_storage | s$insert_dams(...) | wbw_run_tool("insert_dams", args = list(...), session = s) | Raster | Raster output |
integer_division | raster | general | s$integer_division(...) | wbw_run_tool("integer_division", args = list(...), session = s) | Raster | Raster output |
integral_image_transform | remote_sensing | filters | s$integral_image_transform(...) | wbw_run_tool("integral_image_transform", args = list(...), session = s) | Raster | Raster output |
intersect | vector | overlay_analysis | s$intersect(...) | wbw_run_tool("intersect", args = list(...), session = s) | Vector | Vector output |
inverse_pca | raster | general | s$inverse_pca(...) | wbw_run_tool("inverse_pca", args = list(...), session = s) | list[Raster] | Raster output |
is_nodata | raster | general | s$is_nodata(...) | wbw_run_tool("is_nodata", args = list(...), session = s) | Raster | Raster output |
isobasins | hydrology | watersheds_basins | s$isobasins(...) | wbw_run_tool("isobasins", args = list(...), session = s) | Raster | Raster output |
jenson_snap_pour_points | hydrology | watersheds_basins | s$jenson_snap_pour_points(...) | wbw_run_tool("jenson_snap_pour_points", args = list(...), session = s) | Vector | Vector output |
join_tables | conversion | vector_table_io | s$join_tables(...) | wbw_run_tool("join_tables", args = list(...), session = s) | Vector | Vector output |
k_means_clustering | remote_sensing | classification | s$k_means_clustering(...) | wbw_run_tool("k_means_clustering", args = list(...), session = s) | `tuple[Raster, int, str | None]` |
k_nearest_mean_filter | remote_sensing | filters | s$k_nearest_mean_filter(...) | wbw_run_tool("k_nearest_mean_filter", args = list(...), session = s) | Raster | Raster output |
k_shortest_paths_network | vector | network_analysis | s$k_shortest_paths_network(...) | wbw_run_tool("k_shortest_paths_network", args = list(...), session = s) | Vector | Vector output |
kappa_index | raster | general | s$kappa_index(...) | wbw_run_tool("kappa_index", args = list(...), session = s) | str | Report/path string output |
knn_classification | remote_sensing | classification | s$knn_classification(...) | wbw_run_tool("knn_classification", args = list(...), session = s) | Raster | Raster output |
knn_regression | remote_sensing | classification | s$knn_regression(...) | wbw_run_tool("knn_regression", args = list(...), session = s) | Raster | Raster output |
ks_normality_test | raster | general | s$ks_normality_test(...) | wbw_run_tool("ks_normality_test", args = list(...), session = s) | str | Report/path string output |
kuan_filter | remote_sensing | sar | s$kuan_filter(...) | wbw_run_tool("kuan_filter", args = list(...), session = s) | Raster | Raster output |
kuwahara_filter | remote_sensing | filters | s$kuwahara_filter(...) | wbw_run_tool("kuwahara_filter", args = list(...), session = s) | Raster | Raster output |
land_surface_temperature_single_channel | remote_sensing | thermal_emissivity | s$land_surface_temperature_single_channel(...) | wbw_run_tool("land_surface_temperature_single_channel", args = list(...), session = s) | Any | See tool docs |
land_surface_temperature_split_window | remote_sensing | thermal_emissivity | s$land_surface_temperature_split_window(...) | wbw_run_tool("land_surface_temperature_split_window", args = list(...), session = s) | Any | See tool docs |
landslide_susceptibility_assessment | terrain | workflow_products | s$landslide_susceptibility_assessment(...) | wbw_run_tool("landslide_susceptibility_assessment", args = list(...), session = s) | Any | See tool docs |
laplacian_filter | remote_sensing | edge_feature_detection | s$laplacian_filter(...) | wbw_run_tool("laplacian_filter", args = list(...), session = s) | Raster | Raster output |
laplacian_of_gaussians_filter | remote_sensing | edge_feature_detection | s$laplacian_of_gaussians_filter(...) | wbw_run_tool("laplacian_of_gaussians_filter", args = list(...), session = s) | Raster | Raster output |
las_to_ascii | lidar | io_management | s$las_to_ascii(...) | wbw_run_tool("las_to_ascii", args = list(...), session = s) | str | Report/path string output |
las_to_shapefile | lidar | io_management | s$las_to_shapefile(...) | wbw_run_tool("las_to_shapefile", args = list(...), session = s) | Vector | Vector output |
layer_footprint_raster | vector | sampling_gridding | s$layer_footprint_raster(...) | wbw_run_tool("layer_footprint_raster", args = list(...), session = s) | Vector | Vector output |
layer_footprint_vector | vector | sampling_gridding | s$layer_footprint_vector(...) | wbw_run_tool("layer_footprint_vector", args = list(...), session = s) | Vector | Vector output |
lee_filter | remote_sensing | filters | s$lee_filter(...) | wbw_run_tool("lee_filter", args = list(...), session = s) | Raster | Raster output |
length_of_upstream_channels | streams | longitudinal_analysis | s$length_of_upstream_channels(...) | wbw_run_tool("length_of_upstream_channels", args = list(...), session = s) | Raster | Raster output |
less_than | raster | general | s$less_than(...) | wbw_run_tool("less_than", args = list(...), session = s) | Raster | Raster output |
lidar_block_maximum | lidar | interpolation_gridding | s$lidar_block_maximum(...) | wbw_run_tool("lidar_block_maximum", args = list(...), session = s) | Raster | Raster output |
lidar_block_minimum | lidar | interpolation_gridding | s$lidar_block_minimum(...) | wbw_run_tool("lidar_block_minimum", args = list(...), session = s) | Raster | Raster output |
lidar_change_and_disturbance_analysis | lidar | workflow_products | s$lidar_change_and_disturbance_analysis(...) | wbw_run_tool("lidar_change_and_disturbance_analysis", args = list(...), session = s) | Any | See tool docs |
lidar_classify_subset | lidar | filtering_classification | s$lidar_classify_subset(...) | wbw_run_tool("lidar_classify_subset", args = list(...), session = s) | Lidar | LiDAR output |
lidar_colourize | lidar | io_management | s$lidar_colourize(...) | wbw_run_tool("lidar_colourize", args = list(...), session = s) | Lidar | LiDAR output |
lidar_construct_vector_tin | lidar | interpolation_gridding | s$lidar_construct_vector_tin(...) | wbw_run_tool("lidar_construct_vector_tin", args = list(...), session = s) | Vector | Vector output |
lidar_contour | lidar | interpolation_gridding | s$lidar_contour(...) | wbw_run_tool("lidar_contour", args = list(...), session = s) | Vector | Vector output |
lidar_digital_surface_model | lidar | interpolation_gridding | s$lidar_digital_surface_model(...) | wbw_run_tool("lidar_digital_surface_model", args = list(...), session = s) | Raster | Raster output |
lidar_eigenvalue_features | lidar | analysis_metrics | s$lidar_eigenvalue_features(...) | wbw_run_tool("lidar_eigenvalue_features", args = list(...), session = s) | str | Report/path string output |
lidar_elevation_slice | lidar | filtering_classification | s$lidar_elevation_slice(...) | wbw_run_tool("lidar_elevation_slice", args = list(...), session = s) | Lidar | LiDAR output |
lidar_ground_point_filter | remote_sensing | filters | s$lidar_ground_point_filter(...) | wbw_run_tool("lidar_ground_point_filter", args = list(...), session = s) | Lidar | LiDAR output |
lidar_hex_bin | lidar | interpolation_gridding | s$lidar_hex_bin(...) | wbw_run_tool("lidar_hex_bin", args = list(...), session = s) | Vector | Vector output |
lidar_hillshade | lidar | interpolation_gridding | s$lidar_hillshade(...) | wbw_run_tool("lidar_hillshade", args = list(...), session = s) | Raster | Raster output |
lidar_histogram | lidar | analysis_metrics | s$lidar_histogram(...) | wbw_run_tool("lidar_histogram", args = list(...), session = s) | str | Report/path string output |
lidar_idw_interpolation | lidar | interpolation_gridding | s$lidar_idw_interpolation(...) | wbw_run_tool("lidar_idw_interpolation", args = list(...), session = s) | Raster | Raster output |
lidar_info | lidar | analysis_metrics | s$lidar_info(...) | wbw_run_tool("lidar_info", args = list(...), session = s) | str | Report/path string output |
lidar_join | lidar | io_management | s$lidar_join(...) | wbw_run_tool("lidar_join", args = list(...), session = s) | Lidar | LiDAR output |
lidar_kappa | lidar | analysis_metrics | s$lidar_kappa(...) | wbw_run_tool("lidar_kappa", args = list(...), session = s) | Raster | Raster output |
lidar_nearest_neighbour_gridding | lidar | interpolation_gridding | s$lidar_nearest_neighbour_gridding(...) | wbw_run_tool("lidar_nearest_neighbour_gridding", args = list(...), session = s) | Raster | Raster output |
lidar_point_density | lidar | analysis_metrics | s$lidar_point_density(...) | wbw_run_tool("lidar_point_density", args = list(...), session = s) | Raster | Raster output |
lidar_point_return_analysis | lidar | analysis_metrics | s$lidar_point_return_analysis(...) | wbw_run_tool("lidar_point_return_analysis", args = list(...), session = s) | str | Report/path string output |
lidar_point_stats | lidar | analysis_metrics | s$lidar_point_stats(...) | wbw_run_tool("lidar_point_stats", args = list(...), session = s) | str | Report/path string output |
lidar_qa_and_confidence | lidar | workflow_products | s$lidar_qa_and_confidence(...) | wbw_run_tool("lidar_qa_and_confidence", args = list(...), session = s) | Any | See tool docs |
lidar_radial_basis_function_interpolation | lidar | interpolation_gridding | s$lidar_radial_basis_function_interpolation(...) | wbw_run_tool("lidar_radial_basis_function_interpolation", args = list(...), session = s) | Raster | Raster output |
lidar_ransac_planes | lidar | analysis_metrics | s$lidar_ransac_planes(...) | wbw_run_tool("lidar_ransac_planes", args = list(...), session = s) | Lidar | LiDAR output |
lidar_remove_outliers | lidar | filtering_classification | s$lidar_remove_outliers(...) | wbw_run_tool("lidar_remove_outliers", args = list(...), session = s) | Lidar | LiDAR output |
lidar_rooftop_analysis | lidar | analysis_metrics | s$lidar_rooftop_analysis(...) | wbw_run_tool("lidar_rooftop_analysis", args = list(...), session = s) | Vector | Vector output |
lidar_segmentation | lidar | filtering_classification | s$lidar_segmentation(...) | wbw_run_tool("lidar_segmentation", args = list(...), session = s) | Lidar | LiDAR output |
lidar_segmentation_based_filter | lidar | filtering_classification | s$lidar_segmentation_based_filter(...) | wbw_run_tool("lidar_segmentation_based_filter", args = list(...), session = s) | Lidar | LiDAR output |
lidar_shift | lidar | io_management | s$lidar_shift(...) | wbw_run_tool("lidar_shift", args = list(...), session = s) | Lidar | LiDAR output |
lidar_sibson_interpolation | lidar | interpolation_gridding | s$lidar_sibson_interpolation(...) | wbw_run_tool("lidar_sibson_interpolation", args = list(...), session = s) | Raster | Raster output |
lidar_terrain_product_suite | lidar | workflow_products | s$lidar_terrain_product_suite(...) | wbw_run_tool("lidar_terrain_product_suite", args = list(...), session = s) | Any | See tool docs |
lidar_thin | lidar | interpolation_gridding | s$lidar_thin(...) | wbw_run_tool("lidar_thin", args = list(...), session = s) | Lidar | LiDAR output |
lidar_thin_high_density | lidar | interpolation_gridding | s$lidar_thin_high_density(...) | wbw_run_tool("lidar_thin_high_density", args = list(...), session = s) | Lidar | LiDAR output |
lidar_tile | lidar | io_management | s$lidar_tile(...) | wbw_run_tool("lidar_tile", args = list(...), session = s) | Lidar | LiDAR output |
lidar_tile_footprint | lidar | interpolation_gridding | s$lidar_tile_footprint(...) | wbw_run_tool("lidar_tile_footprint", args = list(...), session = s) | Vector | Vector output |
lidar_tin_gridding | lidar | interpolation_gridding | s$lidar_tin_gridding(...) | wbw_run_tool("lidar_tin_gridding", args = list(...), session = s) | Raster | Raster output |
lidar_tophat_transform | lidar | io_management | s$lidar_tophat_transform(...) | wbw_run_tool("lidar_tophat_transform", args = list(...), session = s) | Lidar | LiDAR output |
line_detection_filter | remote_sensing | filters | s$line_detection_filter(...) | wbw_run_tool("line_detection_filter", args = list(...), session = s) | Raster | Raster output |
line_intersections | vector | overlay_analysis | s$line_intersections(...) | wbw_run_tool("line_intersections", args = list(...), session = s) | Vector | Vector output |
line_polygon_clip | vector | overlay_analysis | s$line_polygon_clip(...) | wbw_run_tool("line_polygon_clip", args = list(...), session = s) | Vector | Vector output |
line_thinning | remote_sensing | filters | s$line_thinning(...) | wbw_run_tool("line_thinning", args = list(...), session = s) | Raster | Raster output |
linear_spectral_unmixing | remote_sensing | spectral_analytics | s$linear_spectral_unmixing(...) | wbw_run_tool("linear_spectral_unmixing", args = list(...), session = s) | Any | See tool docs |
linearity_index | vector | shape_metrics | s$linearity_index(...) | wbw_run_tool("linearity_index", args = list(...), session = s) | Vector | Vector output |
lines_to_polygons | conversion | geometry_topology | s$lines_to_polygons(...) | wbw_run_tool("lines_to_polygons", args = list(...), session = s) | Vector | Vector output |
list_unique_values | vector | attribute_analysis | s$list_unique_values(...) | wbw_run_tool("list_unique_values", args = list(...), session = s) | str | Report/path string output |
list_unique_values_raster | raster | general | s$list_unique_values_raster(...) | wbw_run_tool("list_unique_values_raster", args = list(...), session = s) | str | Report/path string output |
ln | raster | general | s$ln(...) | wbw_run_tool("ln", args = list(...), session = s) | Raster | Raster output |
local_hypsometric_analysis | terrain | general | s$local_hypsometric_analysis(...) | wbw_run_tool("local_hypsometric_analysis", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
locate_points_along_routes | vector | linear_referencing | s$locate_points_along_routes(...) | wbw_run_tool("locate_points_along_routes", args = list(...), session = s) | Vector | Vector output |
location_allocation_network | vector | network_analysis | s$location_allocation_network(...) | wbw_run_tool("location_allocation_network", args = list(...), session = s) | Vector | Vector output |
log10 | raster | general | s$log10(...) | wbw_run_tool("log10", args = list(...), session = s) | Raster | Raster output |
log2 | raster | general | s$log2(...) | wbw_run_tool("log2", args = list(...), session = s) | Raster | Raster output |
logistic_regression | remote_sensing | classification | s$logistic_regression(...) | wbw_run_tool("logistic_regression", args = list(...), session = s) | Raster | Raster output |
long_profile | streams | longitudinal_analysis | s$long_profile(...) | wbw_run_tool("long_profile", args = list(...), session = s) | `str | None` |
long_profile_from_points | streams | longitudinal_analysis | s$long_profile_from_points(...) | wbw_run_tool("long_profile_from_points", args = list(...), session = s) | `str | None` |
longest_flowpath | hydrology | watersheds_basins | s$longest_flowpath(...) | wbw_run_tool("longest_flowpath", args = list(...), session = s) | Vector | Vector output |
low_points_on_headwater_divides | terrain | general | s$low_points_on_headwater_divides(...) | wbw_run_tool("low_points_on_headwater_divides", args = list(...), session = s) | Vector | Vector output |
lowest_position | raster | overlay_math | s$lowest_position(...) | wbw_run_tool("lowest_position", args = list(...), session = s) | Raster | Raster output |
majority_filter | remote_sensing | filters | s$majority_filter(...) | wbw_run_tool("majority_filter", args = list(...), session = s) | Raster | Raster output |
map_features | raster | general | s$map_features(...) | wbw_run_tool("map_features", args = list(...), session = s) | Raster | Raster output |
map_matching_v1 | vector | network_analysis | s$map_matching_v1(...) | wbw_run_tool("map_matching_v1", args = list(...), session = s) | Vector | Vector output |
map_off_terrain_objects | terrain | general | s$map_off_terrain_objects(...) | wbw_run_tool("map_off_terrain_objects", args = list(...), session = s) | Raster | Raster output |
market_access_and_site_intelligence_workflow | vector | network_analysis | s$market_access_and_site_intelligence_workflow(...) | wbw_run_tool("market_access_and_site_intelligence_workflow", args = list(...), session = s) | Any | See tool docs |
max | raster | general | s$max(...) | wbw_run_tool("max", args = list(...), session = s) | Raster | Raster output |
max_absolute_overlay | raster | overlay_math | s$max_absolute_overlay(...) | wbw_run_tool("max_absolute_overlay", args = list(...), session = s) | Raster | Raster output |
max_anisotropy_dev | terrain | multiscale_signatures | s$max_anisotropy_dev(...) | wbw_run_tool("max_anisotropy_dev", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
max_anisotropy_dev_signature | terrain | multiscale_signatures | s$max_anisotropy_dev_signature(...) | wbw_run_tool("max_anisotropy_dev_signature", args = list(...), session = s) | str | Report/path string output |
max_branch_length | hydrology | watersheds_basins | s$max_branch_length(...) | wbw_run_tool("max_branch_length", args = list(...), session = s) | Raster | Raster output |
max_difference_from_mean | terrain | multiscale_signatures | s$max_difference_from_mean(...) | wbw_run_tool("max_difference_from_mean", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
max_downslope_elev_change | terrain | general | s$max_downslope_elev_change(...) | wbw_run_tool("max_downslope_elev_change", args = list(...), session = s) | Raster | Raster output |
max_elev_dev_signature | terrain | multiscale_signatures | s$max_elev_dev_signature(...) | wbw_run_tool("max_elev_dev_signature", args = list(...), session = s) | str | Report/path string output |
max_elevation_deviation | terrain | multiscale_signatures | s$max_elevation_deviation(...) | wbw_run_tool("max_elevation_deviation", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
max_overlay | raster | overlay_math | s$max_overlay(...) | wbw_run_tool("max_overlay", args = list(...), session = s) | Raster | Raster output |
max_upslope_elev_change | terrain | general | s$max_upslope_elev_change(...) | wbw_run_tool("max_upslope_elev_change", args = list(...), session = s) | Raster | Raster output |
max_upslope_flowpath_length | hydrology | flow_routing | s$max_upslope_flowpath_length(...) | wbw_run_tool("max_upslope_flowpath_length", args = list(...), session = s) | Raster | Raster output |
max_upslope_value | hydrology | flow_routing | s$max_upslope_value(...) | wbw_run_tool("max_upslope_value", args = list(...), session = s) | Raster | Raster output |
maximal_curvature | terrain | derivatives | s$maximal_curvature(...) | wbw_run_tool("maximal_curvature", args = list(...), session = s) | Raster | Raster output |
maximum_filter | remote_sensing | filters | s$maximum_filter(...) | wbw_run_tool("maximum_filter", args = list(...), session = s) | Raster | Raster output |
mdinf_flow_accum | hydrology | flow_routing | s$mdinf_flow_accum(...) | wbw_run_tool("mdinf_flow_accum", args = list(...), session = s) | Raster | Raster output |
mean_curvature | terrain | derivatives | s$mean_curvature(...) | wbw_run_tool("mean_curvature", args = list(...), session = s) | Raster | Raster output |
mean_filter | remote_sensing | filters | s$mean_filter(...) | wbw_run_tool("mean_filter", args = list(...), session = s) | Raster | Raster output |
median_filter | remote_sensing | filters | s$median_filter(...) | wbw_run_tool("median_filter", args = list(...), session = s) | Raster | Raster output |
medoid | vector | sampling_gridding | s$medoid(...) | wbw_run_tool("medoid", args = list(...), session = s) | Vector | Vector output |
merge_line_segments | vector | geometry_processing | s$merge_line_segments(...) | wbw_run_tool("merge_line_segments", args = list(...), session = s) | Vector | Vector output |
merge_table_with_csv | conversion | vector_table_io | s$merge_table_with_csv(...) | wbw_run_tool("merge_table_with_csv", args = list(...), session = s) | Vector | Vector output |
merge_vectors | conversion | vector_table_io | s$merge_vectors(...) | wbw_run_tool("merge_vectors", args = list(...), session = s) | Vector | Vector output |
min | raster | general | s$min(...) | wbw_run_tool("min", args = list(...), session = s) | Raster | Raster output |
min_absolute_overlay | raster | overlay_math | s$min_absolute_overlay(...) | wbw_run_tool("min_absolute_overlay", args = list(...), session = s) | Raster | Raster output |
min_dist_classification | remote_sensing | classification | s$min_dist_classification(...) | wbw_run_tool("min_dist_classification", args = list(...), session = s) | Raster | Raster output |
min_downslope_elev_change | terrain | general | s$min_downslope_elev_change(...) | wbw_run_tool("min_downslope_elev_change", args = list(...), session = s) | Raster | Raster output |
min_max_contrast_stretch | remote_sensing | enhancement_contrast | s$min_max_contrast_stretch(...) | wbw_run_tool("min_max_contrast_stretch", args = list(...), session = s) | Raster | Raster output |
min_overlay | raster | overlay_math | s$min_overlay(...) | wbw_run_tool("min_overlay", args = list(...), session = s) | Raster | Raster output |
mine_site_reclamation_compliance_tracker | terrain | workflow_products | s$mine_site_reclamation_compliance_tracker(...) | wbw_run_tool("mine_site_reclamation_compliance_tracker", args = list(...), session = s) | Any | See tool docs |
minimal_curvature | terrain | derivatives | s$minimal_curvature(...) | wbw_run_tool("minimal_curvature", args = list(...), session = s) | Raster | Raster output |
minimal_dispersion_flow_algorithm | hydrology | flow_routing | s$minimal_dispersion_flow_algorithm(...) | wbw_run_tool("minimal_dispersion_flow_algorithm", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
minimum_bounding_box | vector | geometry_processing | s$minimum_bounding_box(...) | wbw_run_tool("minimum_bounding_box", args = list(...), session = s) | Vector | Vector output |
minimum_bounding_circle | vector | geometry_processing | s$minimum_bounding_circle(...) | wbw_run_tool("minimum_bounding_circle", args = list(...), session = s) | Vector | Vector output |
minimum_bounding_envelope | vector | geometry_processing | s$minimum_bounding_envelope(...) | wbw_run_tool("minimum_bounding_envelope", args = list(...), session = s) | Vector | Vector output |
minimum_convex_hull | vector | geometry_processing | s$minimum_convex_hull(...) | wbw_run_tool("minimum_convex_hull", args = list(...), session = s) | Vector | Vector output |
minimum_filter | remote_sensing | filters | s$minimum_filter(...) | wbw_run_tool("minimum_filter", args = list(...), session = s) | Raster | Raster output |
minimum_noise_fraction | remote_sensing | spectral_analytics | s$minimum_noise_fraction(...) | wbw_run_tool("minimum_noise_fraction", args = list(...), session = s) | Any | See tool docs |
modified_k_means_clustering | remote_sensing | classification | s$modified_k_means_clustering(...) | wbw_run_tool("modified_k_means_clustering", args = list(...), session = s) | `tuple[Raster, int, str | None]` |
modified_shepard_interpolation | raster | general | s$modified_shepard_interpolation(...) | wbw_run_tool("modified_shepard_interpolation", args = list(...), session = s) | Raster | Raster output |
modify_lidar | lidar | filtering_classification | s$modify_lidar(...) | wbw_run_tool("modify_lidar", args = list(...), session = s) | Lidar | LiDAR output |
modify_nodata_value | conversion | raster_vector_conversion | s$modify_nodata_value(...) | wbw_run_tool("modify_nodata_value", args = list(...), session = s) | Raster | Raster output |
modulo | raster | overlay_math | s$modulo(...) | wbw_run_tool("modulo", args = list(...), session = s) | Raster | Raster output |
mosaic | remote_sensing | enhancement_contrast | s$mosaic(...) | wbw_run_tool("mosaic", args = list(...), session = s) | Raster | Raster output |
mosaic_with_feathering | remote_sensing | enhancement_contrast | s$mosaic_with_feathering(...) | wbw_run_tool("mosaic_with_feathering", args = list(...), session = s) | Raster | Raster output |
multi_sensor_fusion_monitoring | remote_sensing | workflow_products | s$multi_sensor_fusion_monitoring(...) | wbw_run_tool("multi_sensor_fusion_monitoring", args = list(...), session = s) | Any | See tool docs |
multidirectional_hillshade | terrain | general | s$multidirectional_hillshade(...) | wbw_run_tool("multidirectional_hillshade", args = list(...), session = s) | Raster | Raster output |
multimodal_od_cost_matrix | vector | network_analysis | s$multimodal_od_cost_matrix(...) | wbw_run_tool("multimodal_od_cost_matrix", args = list(...), session = s) | Any | See tool docs |
multimodal_routes_from_od | vector | network_analysis | s$multimodal_routes_from_od(...) | wbw_run_tool("multimodal_routes_from_od", args = list(...), session = s) | Any | See tool docs |
multimodal_shortest_path | vector | network_analysis | s$multimodal_shortest_path(...) | wbw_run_tool("multimodal_shortest_path", args = list(...), session = s) | Any | See tool docs |
multipart_to_singlepart | conversion | geometry_topology | s$multipart_to_singlepart(...) | wbw_run_tool("multipart_to_singlepart", args = list(...), session = s) | Vector | Vector output |
multiply | raster | overlay_math | s$multiply(...) | wbw_run_tool("multiply", args = list(...), session = s) | Raster | Raster output |
multiply_overlay | raster | overlay_math | s$multiply_overlay(...) | wbw_run_tool("multiply_overlay", args = list(...), session = s) | Raster | Raster output |
multiscale_curvatures | terrain | multiscale_signatures | s$multiscale_curvatures(...) | wbw_run_tool("multiscale_curvatures", args = list(...), session = s) | Raster | Raster output |
multiscale_elevated_index | terrain | multiscale_signatures | s$multiscale_elevated_index(...) | wbw_run_tool("multiscale_elevated_index", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
multiscale_elevation_percentile | terrain | multiscale_signatures | s$multiscale_elevation_percentile(...) | wbw_run_tool("multiscale_elevation_percentile", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
multiscale_low_lying_index | terrain | multiscale_signatures | s$multiscale_low_lying_index(...) | wbw_run_tool("multiscale_low_lying_index", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
multiscale_roughness | terrain | multiscale_signatures | s$multiscale_roughness(...) | wbw_run_tool("multiscale_roughness", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
multiscale_roughness_signature | terrain | multiscale_signatures | s$multiscale_roughness_signature(...) | wbw_run_tool("multiscale_roughness_signature", args = list(...), session = s) | str | Report/path string output |
multiscale_std_dev_normals | terrain | multiscale_signatures | s$multiscale_std_dev_normals(...) | wbw_run_tool("multiscale_std_dev_normals", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
multiscale_std_dev_normals_signature | terrain | multiscale_signatures | s$multiscale_std_dev_normals_signature(...) | wbw_run_tool("multiscale_std_dev_normals_signature", args = list(...), session = s) | str | Report/path string output |
multiscale_topographic_position_class | terrain | landform_indices | s$multiscale_topographic_position_class(...) | wbw_run_tool("multiscale_topographic_position_class", args = list(...), session = s) | Raster | Raster output |
multiscale_topographic_position_image | terrain | multiscale_signatures | s$multiscale_topographic_position_image(...) | wbw_run_tool("multiscale_topographic_position_image", args = list(...), session = s) | Raster | Raster output |
narrowness_index | raster | general | s$narrowness_index(...) | wbw_run_tool("narrowness_index", args = list(...), session = s) | Raster | Raster output |
narrowness_index_vector | vector | shape_metrics | s$narrowness_index_vector(...) | wbw_run_tool("narrowness_index_vector", args = list(...), session = s) | Vector | Vector output |
natural_neighbour_interpolation | raster | local_neighborhood | s$natural_neighbour_interpolation(...) | wbw_run_tool("natural_neighbour_interpolation", args = list(...), session = s) | Raster | Raster output |
ndvi_based_emissivity | remote_sensing | thermal_emissivity | s$ndvi_based_emissivity(...) | wbw_run_tool("ndvi_based_emissivity", args = list(...), session = s) | Any | See tool docs |
near | vector | overlay_analysis | s$near(...) | wbw_run_tool("near", args = list(...), session = s) | Vector | Vector output |
nearest_neighbour_interpolation | raster | local_neighborhood | s$nearest_neighbour_interpolation(...) | wbw_run_tool("nearest_neighbour_interpolation", args = list(...), session = s) | Raster | Raster output |
negate | raster | general | s$negate(...) | wbw_run_tool("negate", args = list(...), session = s) | Raster | Raster output |
network_accessibility_metrics | vector | network_analysis | s$network_accessibility_metrics(...) | wbw_run_tool("network_accessibility_metrics", args = list(...), session = s) | Any | See tool docs |
network_centrality_metrics | vector | network_analysis | s$network_centrality_metrics(...) | wbw_run_tool("network_centrality_metrics", args = list(...), session = s) | Any | See tool docs |
network_connected_components | vector | network_analysis | s$network_connected_components(...) | wbw_run_tool("network_connected_components", args = list(...), session = s) | Vector | Vector output |
network_node_degree | vector | network_analysis | s$network_node_degree(...) | wbw_run_tool("network_node_degree", args = list(...), session = s) | Vector | Vector output |
network_od_cost_matrix | vector | network_analysis | s$network_od_cost_matrix(...) | wbw_run_tool("network_od_cost_matrix", args = list(...), session = s) | str | Report/path string output |
network_readiness_and_diagnostics_intelligence | vector | network_analysis | s$network_readiness_and_diagnostics_intelligence(...) | wbw_run_tool("network_readiness_and_diagnostics_intelligence", args = list(...), session = s) | Any | See tool docs |
network_routes_from_od | vector | network_analysis | s$network_routes_from_od(...) | wbw_run_tool("network_routes_from_od", args = list(...), session = s) | Vector | Vector output |
network_service_area | vector | network_analysis | s$network_service_area(...) | wbw_run_tool("network_service_area", args = list(...), session = s) | Vector | Vector output |
network_topology_audit | vector | network_analysis | s$network_topology_audit(...) | wbw_run_tool("network_topology_audit", args = list(...), session = s) | Vector | Vector output |
new_raster_from_base_raster | conversion | raster_vector_conversion | s$new_raster_from_base_raster(...) | wbw_run_tool("new_raster_from_base_raster", args = list(...), session = s) | Raster | Raster output |
new_raster_from_base_vector | conversion | raster_vector_conversion | s$new_raster_from_base_vector(...) | wbw_run_tool("new_raster_from_base_vector", args = list(...), session = s) | Raster | Raster output |
nibble | raster | general | s$nibble(...) | wbw_run_tool("nibble", args = list(...), session = s) | Raster | Raster output |
nnd_classification | remote_sensing | classification | s$nnd_classification(...) | wbw_run_tool("nnd_classification", args = list(...), session = s) | Raster | Raster output |
non_local_means_filter | remote_sensing | filters | s$non_local_means_filter(...) | wbw_run_tool("non_local_means_filter", args = list(...), session = s) | Raster | Raster output |
normal_vectors | lidar | analysis_metrics | s$normal_vectors(...) | wbw_run_tool("normal_vectors", args = list(...), session = s) | Lidar | LiDAR output |
normalize_lidar | lidar | filtering_classification | s$normalize_lidar(...) | wbw_run_tool("normalize_lidar", args = list(...), session = s) | Lidar | LiDAR output |
normalized_difference_index | remote_sensing | enhancement_contrast | s$normalized_difference_index(...) | wbw_run_tool("normalized_difference_index", args = list(...), session = s) | Raster | Raster output |
not_equal_to | raster | general | s$not_equal_to(...) | wbw_run_tool("not_equal_to", args = list(...), session = s) | Raster | Raster output |
num_downslope_neighbours | terrain | general | s$num_downslope_neighbours(...) | wbw_run_tool("num_downslope_neighbours", args = list(...), session = s) | Raster | Raster output |
num_inflowing_neighbours | hydrology | flow_routing | s$num_inflowing_neighbours(...) | wbw_run_tool("num_inflowing_neighbours", args = list(...), session = s) | Raster | Raster output |
num_upslope_neighbours | terrain | general | s$num_upslope_neighbours(...) | wbw_run_tool("num_upslope_neighbours", args = list(...), session = s) | Raster | Raster output |
obia_audit_report_pro | remote_sensing | obia | s$obia_audit_report_pro(...) | wbw_run_tool("obia_audit_report_pro", args = list(...), session = s) | str | Report/path string output |
obia_batch_orchestrator_pro | remote_sensing | obia | s$obia_batch_orchestrator_pro(...) | wbw_run_tool("obia_batch_orchestrator_pro", args = list(...), session = s) | dict[str, Any] | Report/path string output |
obia_pipeline_basic | remote_sensing | obia | s$obia_pipeline_basic(...) | wbw_run_tool("obia_pipeline_basic", args = list(...), session = s) | dict[str, Any] | Report/path string output |
object_class_probability_maps | remote_sensing | obia | s$object_class_probability_maps(...) | wbw_run_tool("object_class_probability_maps", args = list(...), session = s) | str | Report/path string output |
object_features_context_neighbors | remote_sensing | obia | s$object_features_context_neighbors(...) | wbw_run_tool("object_features_context_neighbors", args = list(...), session = s) | str | Report/path string output |
object_features_shape_basic | remote_sensing | obia | s$object_features_shape_basic(...) | wbw_run_tool("object_features_shape_basic", args = list(...), session = s) | str | Report/path string output |
object_features_spectral_basic | remote_sensing | obia | s$object_features_spectral_basic(...) | wbw_run_tool("object_features_spectral_basic", args = list(...), session = s) | str | Report/path string output |
object_features_texture_glcm_basic | remote_sensing | obia | s$object_features_texture_glcm_basic(...) | wbw_run_tool("object_features_texture_glcm_basic", args = list(...), session = s) | str | Report/path string output |
object_features_topology_relations | remote_sensing | obia | s$object_features_topology_relations(...) | wbw_run_tool("object_features_topology_relations", args = list(...), session = s) | str | Report/path string output |
object_uncertainty_diagnostics_pro | remote_sensing | obia | s$object_uncertainty_diagnostics_pro(...) | wbw_run_tool("object_uncertainty_diagnostics_pro", args = list(...), session = s) | str | Report/path string output |
objects_boundary_refinement_pro | remote_sensing | obia | s$objects_boundary_refinement_pro(...) | wbw_run_tool("objects_boundary_refinement_pro", args = list(...), session = s) | Raster | Raster output |
objects_enforce_min_mapping_unit | remote_sensing | obia | s$objects_enforce_min_mapping_unit(...) | wbw_run_tool("objects_enforce_min_mapping_unit", args = list(...), session = s) | Raster | Raster output |
od_sensitivity_analysis | vector | network_analysis | s$od_sensitivity_analysis(...) | wbw_run_tool("od_sensitivity_analysis", args = list(...), session = s) | Any | See tool docs |
olympic_filter | remote_sensing | filters | s$olympic_filter(...) | wbw_run_tool("olympic_filter", args = list(...), session = s) | Raster | Raster output |
opening | remote_sensing | filters | s$opening(...) | wbw_run_tool("opening", args = list(...), session = s) | Raster | Raster output |
openness | terrain | visibility | s$openness(...) | wbw_run_tool("openness", args = list(...), session = s) | tuple[Raster, Raster] | Multiple outputs (tuple) |
orthorectification | projection_georeferencing | general | s$orthorectification(...) | wbw_run_tool("orthorectification", args = list(...), session = s) | Any | See tool docs |
otsu_thresholding | remote_sensing | classification | s$otsu_thresholding(...) | wbw_run_tool("otsu_thresholding", args = list(...), session = s) | Raster | Raster output |
paired_sample_t_test | raster | general | s$paired_sample_t_test(...) | wbw_run_tool("paired_sample_t_test", args = list(...), session = s) | str | Report/path string output |
panchromatic_sharpening | remote_sensing | enhancement_contrast | s$panchromatic_sharpening(...) | wbw_run_tool("panchromatic_sharpening", args = list(...), session = s) | Raster | Raster output |
parallelepiped_classification | remote_sensing | classification | s$parallelepiped_classification(...) | wbw_run_tool("parallelepiped_classification", args = list(...), session = s) | Raster | Raster output |
parcel_and_land_fabric_topology_compliance_workflow | vector | workflow_products | s$parcel_and_land_fabric_topology_compliance_workflow(...) | wbw_run_tool("parcel_and_land_fabric_topology_compliance_workflow", args = list(...), session = s) | Any | See tool docs |
patch_orientation | vector | shape_metrics | s$patch_orientation(...) | wbw_run_tool("patch_orientation", args = list(...), session = s) | Vector | Vector output |
pca_based_change_detection | remote_sensing | change_detection | s$pca_based_change_detection(...) | wbw_run_tool("pca_based_change_detection", args = list(...), session = s) | Any | See tool docs |
pennock_landform_classification | terrain | landform_indices | s$pennock_landform_classification(...) | wbw_run_tool("pennock_landform_classification", args = list(...), session = s) | tuple[Raster, str] | Multiple outputs (tuple) |
percent_elev_range | terrain | landform_indices | s$percent_elev_range(...) | wbw_run_tool("percent_elev_range", args = list(...), session = s) | Raster | Raster output |
percent_equal_to | raster | overlay_math | s$percent_equal_to(...) | wbw_run_tool("percent_equal_to", args = list(...), session = s) | Raster | Raster output |
percent_greater_than | raster | overlay_math | s$percent_greater_than(...) | wbw_run_tool("percent_greater_than", args = list(...), session = s) | Raster | Raster output |
percent_less_than | raster | overlay_math | s$percent_less_than(...) | wbw_run_tool("percent_less_than", args = list(...), session = s) | Raster | Raster output |
percentage_contrast_stretch | remote_sensing | enhancement_contrast | s$percentage_contrast_stretch(...) | wbw_run_tool("percentage_contrast_stretch", args = list(...), session = s) | Raster | Raster output |
percentile_filter | remote_sensing | filters | s$percentile_filter(...) | wbw_run_tool("percentile_filter", args = list(...), session = s) | Raster | Raster output |
perimeter_area_ratio | vector | shape_metrics | s$perimeter_area_ratio(...) | wbw_run_tool("perimeter_area_ratio", args = list(...), session = s) | Vector | Vector output |
phi_coefficient | raster | general | s$phi_coefficient(...) | wbw_run_tool("phi_coefficient", args = list(...), session = s) | str | Report/path string output |
pick_from_list | raster | overlay_math | s$pick_from_list(...) | wbw_run_tool("pick_from_list", args = list(...), session = s) | Raster | Raster output |
piecewise_contrast_stretch | remote_sensing | enhancement_contrast | s$piecewise_contrast_stretch(...) | wbw_run_tool("piecewise_contrast_stretch", args = list(...), session = s) | Raster | Raster output |
plan_curvature | terrain | derivatives | s$plan_curvature(...) | wbw_run_tool("plan_curvature", args = list(...), session = s) | Raster | Raster output |
points_along_lines | vector | linear_referencing | s$points_along_lines(...) | wbw_run_tool("points_along_lines", args = list(...), session = s) | Vector | Vector output |
polygon_area | vector | shape_metrics | s$polygon_area(...) | wbw_run_tool("polygon_area", args = list(...), session = s) | Vector | Vector output |
polygon_long_axis | vector | shape_metrics | s$polygon_long_axis(...) | wbw_run_tool("polygon_long_axis", args = list(...), session = s) | Vector | Vector output |
polygon_perimeter | vector | shape_metrics | s$polygon_perimeter(...) | wbw_run_tool("polygon_perimeter", args = list(...), session = s) | Vector | Vector output |
polygon_short_axis | vector | shape_metrics | s$polygon_short_axis(...) | wbw_run_tool("polygon_short_axis", args = list(...), session = s) | Vector | Vector output |
polygonize | vector | geometry_processing | s$polygonize(...) | wbw_run_tool("polygonize", args = list(...), session = s) | Vector | Vector output |
polygons_to_lines | conversion | geometry_topology | s$polygons_to_lines(...) | wbw_run_tool("polygons_to_lines", args = list(...), session = s) | Vector | Vector output |
polygons_to_segments | remote_sensing | obia | s$polygons_to_segments(...) | wbw_run_tool("polygons_to_segments", args = list(...), session = s) | Raster | Raster output |
post_classification_change | remote_sensing | change_detection | s$post_classification_change(...) | wbw_run_tool("post_classification_change", args = list(...), session = s) | Any | See tool docs |
power | raster | overlay_math | s$power(...) | wbw_run_tool("power", args = list(...), session = s) | Raster | Raster output |
precision_ag_yield_zone_intelligence | precision_agriculture | general | s$precision_ag_yield_zone_intelligence(...) | wbw_run_tool("precision_ag_yield_zone_intelligence", args = list(...), session = s) | Any | See tool docs |
precision_irrigation_optimization | precision_agriculture | general | s$precision_irrigation_optimization(...) | wbw_run_tool("precision_irrigation_optimization", args = list(...), session = s) | Any | See tool docs |
prewitt_filter | remote_sensing | edge_feature_detection | s$prewitt_filter(...) | wbw_run_tool("prewitt_filter", args = list(...), session = s) | Raster | Raster output |
principal_component_analysis | raster | general | s$principal_component_analysis(...) | wbw_run_tool("principal_component_analysis", args = list(...), session = s) | list[Raster] | Raster output |
principal_curvature_direction | terrain | derivatives | s$principal_curvature_direction(...) | wbw_run_tool("principal_curvature_direction", args = list(...), session = s) | Raster | Raster output |
print_geotiff_tags | raster | general | s$print_geotiff_tags(...) | wbw_run_tool("print_geotiff_tags", args = list(...), session = s) | str | Report/path string output |
profile | terrain | general | s$profile(...) | wbw_run_tool("profile", args = list(...), session = s) | str | Report/path string output |
profile_curvature | terrain | derivatives | s$profile_curvature(...) | wbw_run_tool("profile_curvature", args = list(...), session = s) | Raster | Raster output |
propagate_labels_across_hierarchy | remote_sensing | obia | s$propagate_labels_across_hierarchy(...) | wbw_run_tool("propagate_labels_across_hierarchy", args = list(...), session = s) | str | Report/path string output |
prune_vector_streams | streams | network_extraction | s$prune_vector_streams(...) | wbw_run_tool("prune_vector_streams", args = list(...), session = s) | Vector | Vector output |
qin_flow_accumulation | hydrology | flow_routing | s$qin_flow_accumulation(...) | wbw_run_tool("qin_flow_accumulation", args = list(...), session = s) | Raster | Raster output |
quantiles | raster | general | s$quantiles(...) | wbw_run_tool("quantiles", args = list(...), session = s) | Raster | Raster output |
quinn_flow_accumulation | hydrology | flow_routing | s$quinn_flow_accumulation(...) | wbw_run_tool("quinn_flow_accumulation", args = list(...), session = s) | Raster | Raster output |
radial_basis_function_interpolation | raster | general | s$radial_basis_function_interpolation(...) | wbw_run_tool("radial_basis_function_interpolation", args = list(...), session = s) | Raster | Raster output |
radius_of_gyration | raster | general | s$radius_of_gyration(...) | wbw_run_tool("radius_of_gyration", args = list(...), session = s) | Raster | Raster output |
raise_walls | hydrology | depressions_storage | s$raise_walls(...) | wbw_run_tool("raise_walls", args = list(...), session = s) | Raster | Raster output |
random_field | raster | general | s$random_field(...) | wbw_run_tool("random_field", args = list(...), session = s) | Raster | Raster output |
random_forest_classification | remote_sensing | classification | s$random_forest_classification(...) | wbw_run_tool("random_forest_classification", args = list(...), session = s) | Raster | Raster output |
random_forest_classification_fit | raster | general | s$random_forest_classification_fit(...) | wbw_run_tool("random_forest_classification_fit", args = list(...), session = s) | list[int] | See tool docs |
random_forest_classification_predict | raster | general | s$random_forest_classification_predict(...) | wbw_run_tool("random_forest_classification_predict", args = list(...), session = s) | Raster | Raster output |
random_forest_regression | remote_sensing | classification | s$random_forest_regression(...) | wbw_run_tool("random_forest_regression", args = list(...), session = s) | Raster | Raster output |
random_forest_regression_fit | raster | general | s$random_forest_regression_fit(...) | wbw_run_tool("random_forest_regression_fit", args = list(...), session = s) | list[int] | See tool docs |
random_forest_regression_predict | raster | general | s$random_forest_regression_predict(...) | wbw_run_tool("random_forest_regression_predict", args = list(...), session = s) | Raster | Raster output |
random_points_in_polygon | vector | sampling_gridding | s$random_points_in_polygon(...) | wbw_run_tool("random_points_in_polygon", args = list(...), session = s) | Vector | Vector output |
random_sample | raster | general | s$random_sample(...) | wbw_run_tool("random_sample", args = list(...), session = s) | Raster | Raster output |
range_filter | remote_sensing | filters | s$range_filter(...) | wbw_run_tool("range_filter", args = list(...), session = s) | Raster | Raster output |
raster_area | raster | general | s$raster_area(...) | wbw_run_tool("raster_area", args = list(...), session = s) | Raster | Raster output |
raster_calculator | raster | general | s$raster_calculator(...) | wbw_run_tool("raster_calculator", args = list(...), session = s) | Raster | Raster output |
raster_cell_assignment | raster | general | s$raster_cell_assignment(...) | wbw_run_tool("raster_cell_assignment", args = list(...), session = s) | Raster | Raster output |
raster_histogram | raster | general | s$raster_histogram(...) | wbw_run_tool("raster_histogram", args = list(...), session = s) | str | Report/path string output |
raster_perimeter | raster | general | s$raster_perimeter(...) | wbw_run_tool("raster_perimeter", args = list(...), session = s) | Raster | Raster output |
raster_streams_to_vector | streams | network_extraction | s$raster_streams_to_vector(...) | wbw_run_tool("raster_streams_to_vector", args = list(...), session = s) | Vector | Vector output |
raster_summary_stats | raster | general | s$raster_summary_stats(...) | wbw_run_tool("raster_summary_stats", args = list(...), session = s) | str | Report/path string output |
raster_to_vector_lines | conversion | raster_vector_conversion | s$raster_to_vector_lines(...) | wbw_run_tool("raster_to_vector_lines", args = list(...), session = s) | Vector | Vector output |
raster_to_vector_points | conversion | raster_vector_conversion | s$raster_to_vector_points(...) | wbw_run_tool("raster_to_vector_points", args = list(...), session = s) | Vector | Vector output |
raster_to_vector_polygons | conversion | raster_vector_conversion | s$raster_to_vector_polygons(...) | wbw_run_tool("raster_to_vector_polygons", args = list(...), session = s) | Vector | Vector output |
rasterize_streams | streams | network_extraction | s$rasterize_streams(...) | wbw_run_tool("rasterize_streams", args = list(...), session = s) | Raster | Raster output |
reciprocal | raster | general | s$reciprocal(...) | wbw_run_tool("reciprocal", args = list(...), session = s) | Raster | Raster output |
reclass | raster | reclass_mask | s$reclass(...) | wbw_run_tool("reclass", args = list(...), session = s) | Raster | Raster output |
reclass_equal_interval | raster | reclass_mask | s$reclass_equal_interval(...) | wbw_run_tool("reclass_equal_interval", args = list(...), session = s) | Raster | Raster output |
recover_flightline_info | lidar | io_management | s$recover_flightline_info(...) | wbw_run_tool("recover_flightline_info", args = list(...), session = s) | Lidar | LiDAR output |
rectangular_grid_from_raster_base | vector | sampling_gridding | s$rectangular_grid_from_raster_base(...) | wbw_run_tool("rectangular_grid_from_raster_base", args = list(...), session = s) | Vector | Vector output |
rectangular_grid_from_vector_base | vector | sampling_gridding | s$rectangular_grid_from_vector_base(...) | wbw_run_tool("rectangular_grid_from_vector_base", args = list(...), session = s) | Vector | Vector output |
refined_lee_filter | remote_sensing | sar | s$refined_lee_filter(...) | wbw_run_tool("refined_lee_filter", args = list(...), session = s) | Raster | Raster output |
registration_oriented_feature_workflow | remote_sensing | workflow_products | s$registration_oriented_feature_workflow(...) | wbw_run_tool("registration_oriented_feature_workflow", args = list(...), session = s) | Any | See tool docs |
reinitialize_attribute_table | conversion | vector_table_io | s$reinitialize_attribute_table(...) | wbw_run_tool("reinitialize_attribute_table", args = list(...), session = s) | Vector | Vector output |
related_circumscribing_circle | vector | shape_metrics | s$related_circumscribing_circle(...) | wbw_run_tool("related_circumscribing_circle", args = list(...), session = s) | Vector | Vector output |
relative_aspect | terrain | derivatives | s$relative_aspect(...) | wbw_run_tool("relative_aspect", args = list(...), session = s) | Raster | Raster output |
relative_stream_power_index | hydrology | hydrologic_indices | s$relative_stream_power_index(...) | wbw_run_tool("relative_stream_power_index", args = list(...), session = s) | Raster | Raster output |
relative_topographic_position | terrain | landform_indices | s$relative_topographic_position(...) | wbw_run_tool("relative_topographic_position", args = list(...), session = s) | Raster | Raster output |
remote_sensing_change_detection | remote_sensing | change_detection | s$remote_sensing_change_detection(...) | wbw_run_tool("remote_sensing_change_detection", args = list(...), session = s) | tuple[Raster, Raster, str] | Multiple outputs (tuple) |
remove_duplicates | lidar | filtering_classification | s$remove_duplicates(...) | wbw_run_tool("remove_duplicates", args = list(...), session = s) | Lidar | LiDAR output |
remove_off_terrain_objects | terrain | general | s$remove_off_terrain_objects(...) | wbw_run_tool("remove_off_terrain_objects", args = list(...), session = s) | Raster | Raster output |
remove_polygon_holes | conversion | geometry_topology | s$remove_polygon_holes(...) | wbw_run_tool("remove_polygon_holes", args = list(...), session = s) | Vector | Vector output |
remove_raster_polygon_holes | conversion | raster_vector_conversion | s$remove_raster_polygon_holes(...) | wbw_run_tool("remove_raster_polygon_holes", args = list(...), session = s) | Raster | Raster output |
remove_short_streams | streams | network_extraction | s$remove_short_streams(...) | wbw_run_tool("remove_short_streams", args = list(...), session = s) | Raster | Raster output |
remove_spurs | remote_sensing | filters | s$remove_spurs(...) | wbw_run_tool("remove_spurs", args = list(...), session = s) | Raster | Raster output |
rename_field | vector | attribute_analysis | s$rename_field(...) | wbw_run_tool("rename_field", args = list(...), session = s) | Vector | Vector output |
repair_stream_vector_topology | streams | network_extraction | s$repair_stream_vector_topology(...) | wbw_run_tool("repair_stream_vector_topology", args = list(...), session = s) | Vector | Vector output |
representative_point_vector | vector | geometry_processing | s$representative_point_vector(...) | wbw_run_tool("representative_point_vector", args = list(...), session = s) | Any | See tool docs |
reproject_lidar | projection_georeferencing | general | s$reproject_lidar(...) | wbw_run_tool("reproject_lidar", args = list(...), session = s) | Any | See tool docs |
reproject_raster | projection_georeferencing | general | s$reproject_raster(...) | wbw_run_tool("reproject_raster", args = list(...), session = s) | Any | See tool docs |
reproject_vector | projection_georeferencing | general | s$reproject_vector(...) | wbw_run_tool("reproject_vector", args = list(...), session = s) | Any | See tool docs |
resample | remote_sensing | enhancement_contrast | s$resample(...) | wbw_run_tool("resample", args = list(...), session = s) | Raster | Raster output |
rescale_value_range | raster | general | s$rescale_value_range(...) | wbw_run_tool("rescale_value_range", args = list(...), session = s) | Raster | Raster output |
rgb_to_ihs | remote_sensing | enhancement_contrast | s$rgb_to_ihs(...) | wbw_run_tool("rgb_to_ihs", args = list(...), session = s) | tuple[Raster, Raster, Raster] | Multiple outputs (tuple) |
rho8_flow_accum | hydrology | flow_routing | s$rho8_flow_accum(...) | wbw_run_tool("rho8_flow_accum", args = list(...), session = s) | Raster | Raster output |
rho8_pointer | hydrology | flow_routing | s$rho8_pointer(...) | wbw_run_tool("rho8_pointer", args = list(...), session = s) | Raster | Raster output |
ridge_and_valley_vectors | terrain | general | s$ridge_and_valley_vectors(...) | wbw_run_tool("ridge_and_valley_vectors", args = list(...), session = s) | tuple[Vector, Vector] | Multiple outputs (tuple) |
ring_curvature | terrain | derivatives | s$ring_curvature(...) | wbw_run_tool("ring_curvature", args = list(...), session = s) | Raster | Raster output |
river_centerlines | streams | network_extraction | s$river_centerlines(...) | wbw_run_tool("river_centerlines", args = list(...), session = s) | Vector | Vector output |
river_corridor_health_assessment | terrain | workflow_products | s$river_corridor_health_assessment(...) | wbw_run_tool("river_corridor_health_assessment", args = list(...), session = s) | Any | See tool docs |
roberts_cross_filter | remote_sensing | edge_feature_detection | s$roberts_cross_filter(...) | wbw_run_tool("roberts_cross_filter", args = list(...), session = s) | Raster | Raster output |
root_mean_square_error | raster | general | s$root_mean_square_error(...) | wbw_run_tool("root_mean_square_error", args = list(...), session = s) | str | Report/path string output |
rotor | terrain | derivatives | s$rotor(...) | wbw_run_tool("rotor", args = list(...), session = s) | Raster | Raster output |
round | raster | general | s$round(...) | wbw_run_tool("round", args = list(...), session = s) | Raster | Raster output |
route_calibrate | vector | linear_referencing | s$route_calibrate(...) | wbw_run_tool("route_calibrate", args = list(...), session = s) | Any | See tool docs |
route_event_governance_for_linear_assets | vector | linear_referencing | s$route_event_governance_for_linear_assets(...) | wbw_run_tool("route_event_governance_for_linear_assets", args = list(...), session = s) | Any | See tool docs |
route_event_lines_from_layer | vector | linear_referencing | s$route_event_lines_from_layer(...) | wbw_run_tool("route_event_lines_from_layer", args = list(...), session = s) | Vector | Vector output |
route_event_lines_from_table | vector | linear_referencing | s$route_event_lines_from_table(...) | wbw_run_tool("route_event_lines_from_table", args = list(...), session = s) | Vector | Vector output |
route_event_merge | vector | linear_referencing | s$route_event_merge(...) | wbw_run_tool("route_event_merge", args = list(...), session = s) | Any | See tool docs |
route_event_overlay | vector | linear_referencing | s$route_event_overlay(...) | wbw_run_tool("route_event_overlay", args = list(...), session = s) | Any | See tool docs |
route_event_points_from_layer | vector | linear_referencing | s$route_event_points_from_layer(...) | wbw_run_tool("route_event_points_from_layer", args = list(...), session = s) | Vector | Vector output |
route_event_points_from_table | vector | linear_referencing | s$route_event_points_from_table(...) | wbw_run_tool("route_event_points_from_table", args = list(...), session = s) | Vector | Vector output |
route_event_split | vector | linear_referencing | s$route_event_split(...) | wbw_run_tool("route_event_split", args = list(...), session = s) | Any | See tool docs |
route_measure_qa | vector | linear_referencing | s$route_measure_qa(...) | wbw_run_tool("route_measure_qa", args = list(...), session = s) | Any | See tool docs |
route_recalibrate | vector | linear_referencing | s$route_recalibrate(...) | wbw_run_tool("route_recalibrate", args = list(...), session = s) | Any | See tool docs |
ruggedness_index | terrain | roughness_texture | s$ruggedness_index(...) | wbw_run_tool("ruggedness_index", args = list(...), session = s) | Raster | Raster output |
sar_analysis_readiness | remote_sensing | sar | s$sar_analysis_readiness(...) | wbw_run_tool("sar_analysis_readiness", args = list(...), session = s) | Any | See tool docs |
sar_coregistration | remote_sensing | sar | s$sar_coregistration(...) | wbw_run_tool("sar_coregistration", args = list(...), session = s) | Any | See tool docs |
sar_interferogram_coherence | remote_sensing | sar | s$sar_interferogram_coherence(...) | wbw_run_tool("sar_interferogram_coherence", args = list(...), session = s) | Any | See tool docs |
savitzky_golay_2d_filter | remote_sensing | filters | s$savitzky_golay_2d_filter(...) | wbw_run_tool("savitzky_golay_2d_filter", args = list(...), session = s) | Raster | Raster output |
scharr_filter | remote_sensing | filters | s$scharr_filter(...) | wbw_run_tool("scharr_filter", args = list(...), session = s) | Raster | Raster output |
sediment_transport_index | hydrology | hydrologic_indices | s$sediment_transport_index(...) | wbw_run_tool("sediment_transport_index", args = list(...), session = s) | Raster | Raster output |
segment_graph_felzenszwalb | remote_sensing | obia | s$segment_graph_felzenszwalb(...) | wbw_run_tool("segment_graph_felzenszwalb", args = list(...), session = s) | Raster | Raster output |
segment_multiresolution_hierarchical | remote_sensing | obia | s$segment_multiresolution_hierarchical(...) | wbw_run_tool("segment_multiresolution_hierarchical", args = list(...), session = s) | tuple[Raster, Raster, str] | Multiple outputs (tuple) |
segment_scale_parameter_optimizer | remote_sensing | obia | s$segment_scale_parameter_optimizer(...) | wbw_run_tool("segment_scale_parameter_optimizer", args = list(...), session = s) | str | Report/path string output |
segment_slic_superpixels | remote_sensing | obia | s$segment_slic_superpixels(...) | wbw_run_tool("segment_slic_superpixels", args = list(...), session = s) | Raster | Raster output |
segment_watershed_markers | remote_sensing | obia | s$segment_watershed_markers(...) | wbw_run_tool("segment_watershed_markers", args = list(...), session = s) | Raster | Raster output |
segments_merge_small_regions | remote_sensing | obia | s$segments_merge_small_regions(...) | wbw_run_tool("segments_merge_small_regions", args = list(...), session = s) | Raster | Raster output |
segments_split_low_cohesion | remote_sensing | obia | s$segments_split_low_cohesion(...) | wbw_run_tool("segments_split_low_cohesion", args = list(...), session = s) | Raster | Raster output |
segments_to_polygons | remote_sensing | obia | s$segments_to_polygons(...) | wbw_run_tool("segments_to_polygons", args = list(...), session = s) | str | Report/path string output |
select_by_location | vector | overlay_analysis | s$select_by_location(...) | wbw_run_tool("select_by_location", args = list(...), session = s) | Vector | Vector output |
select_tiles_by_polygon | lidar | io_management | s$select_tiles_by_polygon(...) | wbw_run_tool("select_tiles_by_polygon", args = list(...), session = s) | str | Report/path string output |
service_area_planning_and_coverage_optimization | vector | network_analysis | s$service_area_planning_and_coverage_optimization(...) | wbw_run_tool("service_area_planning_and_coverage_optimization", args = list(...), session = s) | Any | See tool docs |
set_nodata_value | conversion | raster_vector_conversion | s$set_nodata_value(...) | wbw_run_tool("set_nodata_value", args = list(...), session = s) | Raster | Raster output |
shadow_animation | terrain | visibility | s$shadow_animation(...) | wbw_run_tool("shadow_animation", args = list(...), session = s) | tuple[str, str] | Multiple outputs (tuple) |
shadow_image | terrain | visibility | s$shadow_image(...) | wbw_run_tool("shadow_image", args = list(...), session = s) | Raster | Raster output |
shape_complexity_index_raster | raster | general | s$shape_complexity_index_raster(...) | wbw_run_tool("shape_complexity_index_raster", args = list(...), session = s) | Raster | Raster output |
shape_complexity_index_vector | vector | shape_metrics | s$shape_complexity_index_vector(...) | wbw_run_tool("shape_complexity_index_vector", args = list(...), session = s) | Vector | Vector output |
shape_index | terrain | derivatives | s$shape_index(...) | wbw_run_tool("shape_index", args = list(...), session = s) | Raster | Raster output |
shortest_path_network | vector | network_analysis | s$shortest_path_network(...) | wbw_run_tool("shortest_path_network", args = list(...), session = s) | Vector | Vector output |
shreve_stream_magnitude | streams | ordering_metrics | s$shreve_stream_magnitude(...) | wbw_run_tool("shreve_stream_magnitude", args = list(...), session = s) | Raster | Raster output |
sidewalk_vegetation_accessibility_monitoring | lidar | workflow_products | s$sidewalk_vegetation_accessibility_monitoring(...) | wbw_run_tool("sidewalk_vegetation_accessibility_monitoring", args = list(...), session = s) | Any | See tool docs |
sieve | raster | general | s$sieve(...) | wbw_run_tool("sieve", args = list(...), session = s) | Raster | Raster output |
sigmoidal_contrast_stretch | remote_sensing | enhancement_contrast | s$sigmoidal_contrast_stretch(...) | wbw_run_tool("sigmoidal_contrast_stretch", args = list(...), session = s) | Raster | Raster output |
simplify_features | vector | geometry_processing | s$simplify_features(...) | wbw_run_tool("simplify_features", args = list(...), session = s) | Vector | Vector output |
sin | raster | general | s$sin(...) | wbw_run_tool("sin", args = list(...), session = s) | Raster | Raster output |
singlepart_to_multipart | conversion | geometry_topology | s$singlepart_to_multipart(...) | wbw_run_tool("singlepart_to_multipart", args = list(...), session = s) | Vector | Vector output |
sinh | raster | general | s$sinh(...) | wbw_run_tool("sinh", args = list(...), session = s) | Raster | Raster output |
sink | hydrology | depressions_storage | s$sink(...) | wbw_run_tool("sink", args = list(...), session = s) | Raster | Raster output |
sky_view_factor | terrain | visibility | s$sky_view_factor(...) | wbw_run_tool("sky_view_factor", args = list(...), session = s) | Raster | Raster output |
skyline_analysis | terrain | visibility | s$skyline_analysis(...) | wbw_run_tool("skyline_analysis", args = list(...), session = s) | tuple[Vector, str] | Multiple outputs (tuple) |
slope | terrain | derivatives | s$slope(...) | wbw_run_tool("slope", args = list(...), session = s) | Raster | Raster output |
slope_vs_aspect_plot | terrain | general | s$slope_vs_aspect_plot(...) | wbw_run_tool("slope_vs_aspect_plot", args = list(...), session = s) | str | Report/path string output |
slope_vs_elev_plot | terrain | general | s$slope_vs_elev_plot(...) | wbw_run_tool("slope_vs_elev_plot", args = list(...), session = s) | str | Report/path string output |
smooth_vectors | vector | geometry_processing | s$smooth_vectors(...) | wbw_run_tool("smooth_vectors", args = list(...), session = s) | Vector | Vector output |
smooth_vegetation_residual | terrain | general | s$smooth_vegetation_residual(...) | wbw_run_tool("smooth_vegetation_residual", args = list(...), session = s) | Raster | Raster output |
snap_endnodes | vector | geometry_processing | s$snap_endnodes(...) | wbw_run_tool("snap_endnodes", args = list(...), session = s) | Vector | Vector output |
snap_events_to_routes | vector | linear_referencing | s$snap_events_to_routes(...) | wbw_run_tool("snap_events_to_routes", args = list(...), session = s) | Any | See tool docs |
snap_points_to_network | vector | network_analysis | s$snap_points_to_network(...) | wbw_run_tool("snap_points_to_network", args = list(...), session = s) | Any | See tool docs |
snap_pour_points | hydrology | watersheds_basins | s$snap_pour_points(...) | wbw_run_tool("snap_pour_points", args = list(...), session = s) | Vector | Vector output |
sobel_filter | remote_sensing | edge_feature_detection | s$sobel_filter(...) | wbw_run_tool("sobel_filter", args = list(...), session = s) | Raster | Raster output |
soil_landscape_classification | precision_agriculture | general | s$soil_landscape_classification(...) | wbw_run_tool("soil_landscape_classification", args = list(...), session = s) | tuple[Raster, Raster, Vector, str] | Multiple outputs (tuple) |
solar_site_suitability_analysis | terrain | workflow_products | s$solar_site_suitability_analysis(...) | wbw_run_tool("solar_site_suitability_analysis", args = list(...), session = s) | Any | See tool docs |
sort_lidar | lidar | io_management | s$sort_lidar(...) | wbw_run_tool("sort_lidar", args = list(...), session = s) | Lidar | LiDAR output |
spatial_join | vector | overlay_analysis | s$spatial_join(...) | wbw_run_tool("spatial_join", args = list(...), session = s) | Vector | Vector output |
spectral_angle_mapper | remote_sensing | spectral_analytics | s$spectral_angle_mapper(...) | wbw_run_tool("spectral_angle_mapper", args = list(...), session = s) | Any | See tool docs |
spectral_library_matching | remote_sensing | spectral_analytics | s$spectral_library_matching(...) | wbw_run_tool("spectral_library_matching", args = list(...), session = s) | Any | See tool docs |
spherical_std_dev_of_normals | terrain | roughness_texture | s$spherical_std_dev_of_normals(...) | wbw_run_tool("spherical_std_dev_of_normals", args = list(...), session = s) | Raster | Raster output |
split_colour_composite | remote_sensing | enhancement_contrast | s$split_colour_composite(...) | wbw_run_tool("split_colour_composite", args = list(...), session = s) | tuple[Raster, Raster, Raster] | Multiple outputs (tuple) |
split_lidar | lidar | io_management | s$split_lidar(...) | wbw_run_tool("split_lidar", args = list(...), session = s) | Lidar | LiDAR output |
split_lines_at_intersections | vector | network_analysis | s$split_lines_at_intersections(...) | wbw_run_tool("split_lines_at_intersections", args = list(...), session = s) | Any | See tool docs |
split_vector_lines | vector | geometry_processing | s$split_vector_lines(...) | wbw_run_tool("split_vector_lines", args = list(...), session = s) | Vector | Vector output |
split_with_lines | vector | geometry_processing | s$split_with_lines(...) | wbw_run_tool("split_with_lines", args = list(...), session = s) | Vector | Vector output |
sqrt | raster | general | s$sqrt(...) | wbw_run_tool("sqrt", args = list(...), session = s) | Raster | Raster output |
square | raster | general | s$square(...) | wbw_run_tool("square", args = list(...), session = s) | Raster | Raster output |
standard_deviation_contrast_stretch | remote_sensing | enhancement_contrast | s$standard_deviation_contrast_stretch(...) | wbw_run_tool("standard_deviation_contrast_stretch", args = list(...), session = s) | Raster | Raster output |
standard_deviation_filter | remote_sensing | filters | s$standard_deviation_filter(...) | wbw_run_tool("standard_deviation_filter", args = list(...), session = s) | Raster | Raster output |
standard_deviation_of_slope | terrain | roughness_texture | s$standard_deviation_of_slope(...) | wbw_run_tool("standard_deviation_of_slope", args = list(...), session = s) | Raster | Raster output |
standard_deviation_overlay | raster | overlay_math | s$standard_deviation_overlay(...) | wbw_run_tool("standard_deviation_overlay", args = list(...), session = s) | Raster | Raster output |
stochastic_depression_analysis | hydrology | depressions_storage | s$stochastic_depression_analysis(...) | wbw_run_tool("stochastic_depression_analysis", args = list(...), session = s) | Raster | Raster output |
strahler_order_basins | streams | ordering_metrics | s$strahler_order_basins(...) | wbw_run_tool("strahler_order_basins", args = list(...), session = s) | Raster | Raster output |
strahler_stream_order | streams | ordering_metrics | s$strahler_stream_order(...) | wbw_run_tool("strahler_stream_order", args = list(...), session = s) | Raster | Raster output |
stream_link_class | streams | ordering_metrics | s$stream_link_class(...) | wbw_run_tool("stream_link_class", args = list(...), session = s) | Raster | Raster output |
stream_link_identifier | streams | ordering_metrics | s$stream_link_identifier(...) | wbw_run_tool("stream_link_identifier", args = list(...), session = s) | Raster | Raster output |
stream_link_length | streams | ordering_metrics | s$stream_link_length(...) | wbw_run_tool("stream_link_length", args = list(...), session = s) | Raster | Raster output |
stream_link_slope | streams | ordering_metrics | s$stream_link_slope(...) | wbw_run_tool("stream_link_slope", args = list(...), session = s) | Raster | Raster output |
stream_slope_continuous | streams | ordering_metrics | s$stream_slope_continuous(...) | wbw_run_tool("stream_slope_continuous", args = list(...), session = s) | Raster | Raster output |
subbasins | hydrology | watersheds_basins | s$subbasins(...) | wbw_run_tool("subbasins", args = list(...), session = s) | Raster | Raster output |
subtract | raster | overlay_math | s$subtract(...) | wbw_run_tool("subtract", args = list(...), session = s) | Raster | Raster output |
sum_overlay | raster | overlay_math | s$sum_overlay(...) | wbw_run_tool("sum_overlay", args = list(...), session = s) | Raster | Raster output |
surface_area_ratio | terrain | general | s$surface_area_ratio(...) | wbw_run_tool("surface_area_ratio", args = list(...), session = s) | Raster | Raster output |
svm_classification | remote_sensing | classification | s$svm_classification(...) | wbw_run_tool("svm_classification", args = list(...), session = s) | Raster | Raster output |
svm_regression | remote_sensing | classification | s$svm_regression(...) | wbw_run_tool("svm_regression", args = list(...), session = s) | Raster | Raster output |
symmetrical_difference | vector | overlay_analysis | s$symmetrical_difference(...) | wbw_run_tool("symmetrical_difference", args = list(...), session = s) | Vector | Vector output |
tan | raster | general | s$tan(...) | wbw_run_tool("tan", args = list(...), session = s) | Raster | Raster output |
tangential_curvature | terrain | derivatives | s$tangential_curvature(...) | wbw_run_tool("tangential_curvature", args = list(...), session = s) | Raster | Raster output |
tanh | raster | general | s$tanh(...) | wbw_run_tool("tanh", args = list(...), session = s) | Raster | Raster output |
terrain_constraint_and_conflict_analysis | terrain | workflow_products | s$terrain_constraint_and_conflict_analysis(...) | wbw_run_tool("terrain_constraint_and_conflict_analysis", args = list(...), session = s) | Any | See tool docs |
terrain_constructability_and_cost_analysis | terrain | workflow_products | s$terrain_constructability_and_cost_analysis(...) | wbw_run_tool("terrain_constructability_and_cost_analysis", args = list(...), session = s) | Any | See tool docs |
terrain_corrected_optical_analytics | remote_sensing | radiometric_correction | s$terrain_corrected_optical_analytics(...) | wbw_run_tool("terrain_corrected_optical_analytics", args = list(...), session = s) | Any | See tool docs |
thicken_raster_line | remote_sensing | filters | s$thicken_raster_line(...) | wbw_run_tool("thicken_raster_line", args = list(...), session = s) | Raster | Raster output |
time_in_daylight | terrain | visibility | s$time_in_daylight(...) | wbw_run_tool("time_in_daylight", args = list(...), session = s) | Raster | Raster output |
time_series_change_intelligence | remote_sensing | change_detection | s$time_series_change_intelligence(...) | wbw_run_tool("time_series_change_intelligence", args = list(...), session = s) | tuple[Raster, Raster, Raster, Raster, str] | Multiple outputs (tuple) |
tin_interpolation | raster | general | s$tin_interpolation(...) | wbw_run_tool("tin_interpolation", args = list(...), session = s) | Raster | Raster output |
to_degrees | raster | general | s$to_degrees(...) | wbw_run_tool("to_degrees", args = list(...), session = s) | Raster | Raster output |
to_radians | raster | general | s$to_radians(...) | wbw_run_tool("to_radians", args = list(...), session = s) | Raster | Raster output |
tophat_transform | remote_sensing | filters | s$tophat_transform(...) | wbw_run_tool("tophat_transform", args = list(...), session = s) | Raster | Raster output |
topo_render | terrain | workflow_products | s$topo_render(...) | wbw_run_tool("topo_render", args = list(...), session = s) | Raster | Raster output |
topographic_hachures | terrain | general | s$topographic_hachures(...) | wbw_run_tool("topographic_hachures", args = list(...), session = s) | Vector | Vector output |
topographic_position_animation | terrain | multiscale_signatures | s$topographic_position_animation(...) | wbw_run_tool("topographic_position_animation", args = list(...), session = s) | tuple[str, str] | Multiple outputs (tuple) |
topological_breach_burn | hydrology | depressions_storage | s$topological_breach_burn(...) | wbw_run_tool("topological_breach_burn", args = list(...), session = s) | tuple[Raster, Raster, Raster, Raster] | Multiple outputs (tuple) |
topological_stream_order | streams | ordering_metrics | s$topological_stream_order(...) | wbw_run_tool("topological_stream_order", args = list(...), session = s) | Raster | Raster output |
topology_rule_autofix | conversion | geometry_topology | s$topology_rule_autofix(...) | wbw_run_tool("topology_rule_autofix", args = list(...), session = s) | Any | See tool docs |
topology_rule_validate | conversion | geometry_topology | s$topology_rule_validate(...) | wbw_run_tool("topology_rule_validate", args = list(...), session = s) | Any | See tool docs |
topology_validation_report | conversion | geometry_topology | s$topology_validation_report(...) | wbw_run_tool("topology_validation_report", args = list(...), session = s) | str | Report/path string output |
total_curvature | terrain | derivatives | s$total_curvature(...) | wbw_run_tool("total_curvature", args = list(...), session = s) | Raster | Raster output |
total_filter | remote_sensing | filters | s$total_filter(...) | wbw_run_tool("total_filter", args = list(...), session = s) | Raster | Raster output |
trace_downslope_flowpaths | hydrology | flow_routing | s$trace_downslope_flowpaths(...) | wbw_run_tool("trace_downslope_flowpaths", args = list(...), session = s) | Raster | Raster output |
transfer_attributes | vector | network_analysis | s$transfer_attributes(...) | wbw_run_tool("transfer_attributes", args = list(...), session = s) | Any | See tool docs |
travelling_salesman_problem | vector | network_analysis | s$travelling_salesman_problem(...) | wbw_run_tool("travelling_salesman_problem", args = list(...), session = s) | Vector | Vector output |
trend_surface | raster | general | s$trend_surface(...) | wbw_run_tool("trend_surface", args = list(...), session = s) | Raster | Raster output |
trend_surface_vector_points | raster | general | s$trend_surface_vector_points(...) | wbw_run_tool("trend_surface_vector_points", args = list(...), session = s) | Raster | Raster output |
tributary_identifier | streams | ordering_metrics | s$tributary_identifier(...) | wbw_run_tool("tributary_identifier", args = list(...), session = s) | Raster | Raster output |
true_colour_composite | remote_sensing | enhancement_contrast | s$true_colour_composite(...) | wbw_run_tool("true_colour_composite", args = list(...), session = s) | Any | See tool docs |
truncate | raster | general | s$truncate(...) | wbw_run_tool("truncate", args = list(...), session = s) | Raster | Raster output |
turning_bands_simulation | raster | general | s$turning_bands_simulation(...) | wbw_run_tool("turning_bands_simulation", args = list(...), session = s) | Raster | Raster output |
two_sample_ks_test | raster | general | s$two_sample_ks_test(...) | wbw_run_tool("two_sample_ks_test", args = list(...), session = s) | str | Report/path string output |
union | vector | overlay_analysis | s$union(...) | wbw_run_tool("union", args = list(...), session = s) | Vector | Vector output |
unnest_basins | hydrology | watersheds_basins | s$unnest_basins(...) | wbw_run_tool("unnest_basins", args = list(...), session = s) | list[Raster] | Raster output |
unsharp_masking | remote_sensing | filters | s$unsharp_masking(...) | wbw_run_tool("unsharp_masking", args = list(...), session = s) | Raster | Raster output |
unsphericity | terrain | derivatives | s$unsphericity(...) | wbw_run_tool("unsphericity", args = list(...), session = s) | Raster | Raster output |
update | vector | overlay_analysis | s$update(...) | wbw_run_tool("update", args = list(...), session = s) | Vector | Vector output |
update_nodata_cells | raster | overlay_math | s$update_nodata_cells(...) | wbw_run_tool("update_nodata_cells", args = list(...), session = s) | Raster | Raster output |
upslope_depression_storage | hydrology | depressions_storage | s$upslope_depression_storage(...) | wbw_run_tool("upslope_depression_storage", args = list(...), session = s) | Raster | Raster output |
urban_expansion_impact_assessment | terrain | workflow_products | s$urban_expansion_impact_assessment(...) | wbw_run_tool("urban_expansion_impact_assessment", args = list(...), session = s) | Any | See tool docs |
user_defined_weights_filter | remote_sensing | filters | s$user_defined_weights_filter(...) | wbw_run_tool("user_defined_weights_filter", args = list(...), session = s) | Raster | Raster output |
utility_corridor_encroachment_and_access_planning | vector | workflow_products | s$utility_corridor_encroachment_and_access_planning(...) | wbw_run_tool("utility_corridor_encroachment_and_access_planning", args = list(...), session = s) | Any | See tool docs |
utility_corridor_encroachment_intelligence | terrain | workflow_products | s$utility_corridor_encroachment_intelligence(...) | wbw_run_tool("utility_corridor_encroachment_intelligence", args = list(...), session = s) | Any | See tool docs |
vector_hex_binning | vector | sampling_gridding | s$vector_hex_binning(...) | wbw_run_tool("vector_hex_binning", args = list(...), session = s) | Vector | Vector output |
vector_lines_to_raster | conversion | raster_vector_conversion | s$vector_lines_to_raster(...) | wbw_run_tool("vector_lines_to_raster", args = list(...), session = s) | Raster | Raster output |
vector_points_to_raster | conversion | raster_vector_conversion | s$vector_points_to_raster(...) | wbw_run_tool("vector_points_to_raster", args = list(...), session = s) | Raster | Raster output |
vector_polygons_to_raster | conversion | raster_vector_conversion | s$vector_polygons_to_raster(...) | wbw_run_tool("vector_polygons_to_raster", args = list(...), session = s) | Raster | Raster output |
vector_stream_network_analysis | streams | ordering_metrics | s$vector_stream_network_analysis(...) | wbw_run_tool("vector_stream_network_analysis", args = list(...), session = s) | Vector | Vector output |
vector_summary_statistics | conversion | vector_table_io | s$vector_summary_statistics(...) | wbw_run_tool("vector_summary_statistics", args = list(...), session = s) | str | Report/path string output |
vehicle_routing_cvrp | vector | network_analysis | s$vehicle_routing_cvrp(...) | wbw_run_tool("vehicle_routing_cvrp", args = list(...), session = s) | Any | See tool docs |
vehicle_routing_pickup_delivery | vector | network_analysis | s$vehicle_routing_pickup_delivery(...) | wbw_run_tool("vehicle_routing_pickup_delivery", args = list(...), session = s) | Any | See tool docs |
vehicle_routing_vrptw | vector | network_analysis | s$vehicle_routing_vrptw(...) | wbw_run_tool("vehicle_routing_vrptw", args = list(...), session = s) | Any | See tool docs |
vertical_excess_curvature | terrain | derivatives | s$vertical_excess_curvature(...) | wbw_run_tool("vertical_excess_curvature", args = list(...), session = s) | Raster | Raster output |
viewshed | terrain | visibility | s$viewshed(...) | wbw_run_tool("viewshed", args = list(...), session = s) | Raster | Raster output |
visibility_index | terrain | visibility | s$visibility_index(...) | wbw_run_tool("visibility_index", args = list(...), session = s) | Raster | Raster output |
voronoi_diagram | vector | sampling_gridding | s$voronoi_diagram(...) | wbw_run_tool("voronoi_diagram", args = list(...), session = s) | Vector | Vector output |
watershed | hydrology | watersheds_basins | s$watershed(...) | wbw_run_tool("watershed", args = list(...), session = s) | Raster | Raster output |
watershed_from_raster_pour_points | hydrology | watersheds_basins | s$watershed_from_raster_pour_points(...) | wbw_run_tool("watershed_from_raster_pour_points", args = list(...), session = s) | Raster | Raster output |
weighted_overlay | raster | overlay_math | s$weighted_overlay(...) | wbw_run_tool("weighted_overlay", args = list(...), session = s) | Raster | Raster output |
weighted_sum | raster | overlay_math | s$weighted_sum(...) | wbw_run_tool("weighted_sum", args = list(...), session = s) | Raster | Raster output |
wetland_hydrogeomorphic_classification | terrain | workflow_products | s$wetland_hydrogeomorphic_classification(...) | wbw_run_tool("wetland_hydrogeomorphic_classification", args = list(...), session = s) | Any | See tool docs |
wetness_index | hydrology | hydrologic_indices | s$wetness_index(...) | wbw_run_tool("wetness_index", args = list(...), session = s) | Raster | Raster output |
wiener_filter | remote_sensing | filters | s$wiener_filter(...) | wbw_run_tool("wiener_filter", args = list(...), session = s) | Raster | Raster output |
wilcoxon_signed_rank_test | raster | general | s$wilcoxon_signed_rank_test(...) | wbw_run_tool("wilcoxon_signed_rank_test", args = list(...), session = s) | str | Report/path string output |
wildfire_fuel_loading_and_risk_matrix | terrain | workflow_products | s$wildfire_fuel_loading_and_risk_matrix(...) | wbw_run_tool("wildfire_fuel_loading_and_risk_matrix", args = list(...), session = s) | Any | See tool docs |
wind_turbine_siting | terrain | workflow_products | s$wind_turbine_siting(...) | wbw_run_tool("wind_turbine_siting", args = list(...), session = s) | Any | See tool docs |
wisart_iterative_clustering | remote_sensing | sar | s$wisart_iterative_clustering(...) | wbw_run_tool("wisart_iterative_clustering", args = list(...), session = s) | Raster | Raster output |
write_function_memory_insertion | remote_sensing | change_detection | s$write_function_memory_insertion(...) | wbw_run_tool("write_function_memory_insertion", args = list(...), session = s) | Raster | Raster output |
yamaguchi_4component_decomposition | remote_sensing | sar | s$yamaguchi_4component_decomposition(...) | wbw_run_tool("yamaguchi_4component_decomposition", args = list(...), session = s) | Any | See tool docs |
yield_data_conditioning_and_qa | precision_agriculture | general | s$yield_data_conditioning_and_qa(...) | wbw_run_tool("yield_data_conditioning_and_qa", args = list(...), session = s) | Any | See tool docs |
z_scores | raster | general | s$z_scores(...) | wbw_run_tool("z_scores", args = list(...), session = s) | Raster | Raster output |
zonal_statistics | raster | general | s$zonal_statistics(...) | wbw_run_tool("zonal_statistics", args = list(...), session = s) | Raster | Raster output |
Script Index
Use this index to map manual chapters to runnable examples.
Treat this chapter as the transition from concept to implementation. When building a new workflow, start from the closest example script and adapt it with your paths and parameters rather than composing from isolated snippets. This usually produces safer and more maintainable scripts.
Core Session and Discovery
crates/wbw_r/examples/generated_session_example.R- baseline session creation and discovery flowcrates/wbw_r/r-package/whiteboxworkflows/inst/examples/generated_session_example.R- package-scoped session bootstrap patterncrates/wbw_r/r-package/whiteboxworkflows/inst/examples/golden_path_workflows.R- representative end-to-end workflow chain
Raster Workflows
crates/wbw_r/r-package/whiteboxworkflows/inst/examples/raster_object_quickstart.R- object lifecycle and metadata checkscrates/wbw_r/r-package/whiteboxworkflows/inst/examples/raster_array_roundtrip.R- array conversion and persistence roundtrip
Vector Workflows
crates/wbw_r/r-package/whiteboxworkflows/inst/examples/vector_object_quickstart.R- schema-first vector workflow baselinecrates/wbw_r/examples/vector_topojson_roundtrip.R- TopoJSON read/write roundtrip workflowcrates/wbw_r/examples/osm_download_vector.R- OpenStreetMap download workflow via Overpass API
Lidar Workflows
crates/wbw_r/r-package/whiteboxworkflows/inst/examples/lidar_object_quickstart.R- lidar object lifecycle and metadata checkscrates/wbw_r/r-package/whiteboxworkflows/inst/examples/lidar_chunked_matrix_streaming.R- chunked matrix processing at scalecrates/wbw_r/examples/lidar_write_options.R- output option tuning for lidar formats
Sensor Bundle Workflows
crates/wbw_r/r-package/whiteboxworkflows/inst/examples/sensor_bundle_quickstart.R- bundle intake and key inspection baselinecrates/wbw_r/r-package/whiteboxworkflows/inst/examples/sensor_bundle_multi_family_preview.R- cross-family preview pattern
Licensing
crates/wbw_r/examples/licensing_offline.R- local entitlement startup examplecrates/wbw_r/examples/licensing_floating_online.R- floating license provider startup example