PRO Production

Workflow-grade Pro analysis with audit-ready outputs.

workflow pro

## Workflow Narrative

Terrain-Corrected Optical Prep

### Problem It Solves

Can we reduce terrain illumination bias so downstream indices and change products are defensible?

### Who It Is For

- Remote sensing practitioners working in high-relief terrain.

### Primary User

EO analytics teams, natural resource agencies, and monitoring service providers.

### What It Does

- Applies terrain-aware optical correction (C-correction style) using DEM-derived geometry.
- Builds cloud/shadow masks and quality confidence diagnostics alongside corrected bands.
- Produces analysis-ready corrected optical outputs for downstream monitoring/classification.

### How It Works

- Derives slope/aspect illumination terms from the DEM and solar geometry parameters.
- Applies per-band topographic normalization (C-correction style) to reduce relief-driven bias.
- Generates cloud-shadow and quality layers from correction residual behavior and masking rules.
- Indicative formula: L_corr ~= L_obs * (cos(theta_s) + C) / (cos(i) + C), where i is incidence angle from DEM slope/aspect.

### Why It Wins

- Integrates correction and QA/mask outputs in one workflow rather than forcing separate ad hoc preprocessing scripts.

### Typical Buying Trigger

Teams see unstable index/change outputs across steep terrain and need a standardized correction stage.

### Typical Presets

- conservative: stricter correction and masking behavior.
- balanced: default profile.
- fast: quicker execution on large scenes.

## Inputs

Parameter | Optional | Description
--- | --- | ---
input_red, input_nir, input_dem | no | Core optical + terrain inputs used for topographic/reflectance normalization workflows.
optional input_green | yes | Optional green band used by workflows that include green-channel diagnostics.
solar_zenith_deg, solar_azimuth_deg | no | Solar geometry parameters used to model illumination and terrain incidence effects.
profile: conservative | balanced | fast | no | Processing profile controlling quality-vs-throughput behavior for correction workflow execution.

## Outputs

Parameter | Type | Description
--- | --- | ---
corrected optical bands | GeoTIFF | Terrain-corrected optical bands for downstream index and classification workflows.
cloud_shadow_mask | GeoTIFF | Cloud and shadow mask used to suppress unreliable optical pixels.
topographic_correction_factor | GeoTIFF | Per-pixel topographic correction factor used in radiometric normalization.
quality_confidence | GeoTIFF | Confidence surface indicating reliability of corrected optical values.
summary | JSON | Machine-readable summary report containing run metadata, QA diagnostics, and key metrics.
html_report | HTML | Human-readable customer-facing report generated from the summary contract for stakeholder review and QA traceability.

## Python Example

    import whitebox_workflows as wbw

    wbe = wbw.WbEnvironment(include_pro=True, tier="pro")

    result = wbe.terrain_corrected_optical_analytics(
        input_red="data/red.tif",
        input_nir="data/nir.tif",
        input_dem="data/dem.tif",
        solar_zenith_deg=40.0,
        solar_azimuth_deg=165.0,
        profile="balanced",
        output_prefix="output/tco",
    )

    print(result)

## License Notice

Use of this function requires a license for Whitebox Workflows Professional (WbW-Pro). Please visit www.whiteboxgeo.com to purchase a license.

## Project Links

WbW Homepage User Manual Support WbW