PRO Production

Coregister moving SAR imagery to a reference grid (translation/affine/local-offset-grid modes).

workflow pro

## Workflow Narrative

SAR Coregistration

### Problem It Solves

Can we put a moving SAR scene on the reference scene grid with enough geometric confidence for pairwise analytics?

### Who It Is For

- SAR analysts, infrastructure monitoring teams, and registration-first EO pipelines.

### Primary User

InSAR/infrastructure monitoring teams, geospatial intelligence groups, and SAR QA operations.

### What It Does

- Aligns a moving SAR raster or resolved SAR-bundle measurement onto a reference SAR grid.
- Supports `translation`, `affine`, and `local_offset_grid` modes (`affine` and `local_offset_grid` remain experimental).
- Emits aligned output plus transform/summary diagnostics, including compatibility and acceptance gates for machine-checkable downstream use.

### How It Works

- Harmonizes the moving SAR raster to the reference CRS/grid when needed and evaluates strict scene compatibility where metadata allows.
- Applies amplitude-domain matching with bounded search and subpixel refinement, then executes the selected transform model.
- Emits per-run QA including burst diagnostics (Sentinel-1), continuity checks, and Phase-A acceptance gates.
- Indicative formula: $\rho(\Delta x, \Delta y) = \mathrm{corr}(\log(1 + I_{ref}), \log(1 + I_{mov}(x-\Delta x, y-\Delta y)))$.

### Why It Wins

- Accepts both direct rasters and supported SAR bundles while turning pair alignment into a reproducible audited workflow artifact instead of an opaque manual preprocessing step.

### Typical Buying Trigger

A team needs a defensible alignment stage before coherence, pair differencing, or cross-sensor fusion.

### Typical Presets

- translation: default global shift path.
- affine: global affine refinement (experimental).
- local_offset_grid: local residual warp model (experimental).

## Inputs

Parameter | Optional | Description
--- | --- | ---
reference_sar or reference_sar_bundle | no | Reference SAR source provided either as a raster path or a supported SAR bundle.
moving_sar or moving_sar_bundle | no | Moving SAR source provided either as a raster path or a supported SAR bundle.
reference_measurement_key, moving_measurement_key | yes | Optional bundle measurement selectors when either SAR bundle contains multiple measurement assets.
coreg_mode | yes | Coregistration mode: `translation`, `affine`, or `local_offset_grid` (experimental for affine/local).
max_offset_px, decimation, min_overlap_fraction | yes | Search-radius and sampled-overlap controls for correlation-based shift estimation.
input_dem, dem_z_factor | yes | Optional DEM-assisted initialization controls used for geometry-informed matching support.
phase_a_* thresholds | yes | Optional acceptance/continuity threshold overrides for deterministic quality gating.
resample_method, output_prefix | yes | Output resampling mode and artifact prefix.

## Outputs

Parameter | Type | Description
--- | --- | ---
moving_aligned | GeoTIFF | Moving SAR raster resampled onto the reference SAR grid.
offset_x | GeoTIFF | Constant x-offset surface in map units for the estimated translation.
offset_y | GeoTIFF | Constant y-offset surface in map units for the estimated translation.
transform | JSON | Machine-readable transform and QA summary for the estimated alignment.
summary | JSON | Machine-readable workflow report containing parameters, QA diagnostics, and artifact paths.
html_report | HTML | Human-readable report generated from the summary contract for review and traceability.

## Python Example

    import whitebox_workflows as wbw

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

    result = wbe.sar_coregistration(
        reference_sar_bundle="data/S1_reference.SAFE",
        reference_measurement_key="vv",
        moving_sar_bundle="data/S1_pair.SAFE",
        moving_measurement_key="vv",
        max_offset_px=24,
        decimation=4,
        resample_method="bilinear",
        output_prefix="output/sar_coreg",
    )

    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