# Changelog — RiverBankErosionAccretion_V2

## v3.0 (2026-05-30) — Regime-Adaptive Architecture
### Added
- **River morphological type selector** (Meandering / Braided / Deltaic / Straight / Anastomosing) — algorithm configuration adapts automatically per regime
- **Riparian buffer masking** — Union(T1,T2) → Buffer → clip fishnet; excludes non-river waterbodies from analysis (user-configurable, 100–5000 m)
- **Minimum Mapping Unit (MMU) filter** — contiguous patch threshold (default 3 cells = 0.0027 km²); removes sub-detection-limit artifacts
- **Voronoi skeleton centerline extraction** — replaces convex-hull method; works on sinuous and complex reaches; fallback to hull for straight reaches
- **Braiding Index auto-computation** — BI = wetted_perimeter / (2 × reach_length); per-stretch output with centerline_reliability flag (HIGH/MODERATE/LOW)
- **Connected Component Labelling (CCL)** — channel_id per distributary for deltaic regimes; min_polygon_area_ha filter excludes non-riverine features
- **Regime classification output** — stretch_regime_class.shp classifying each stretch as BRAIDED / MEANDERING / TRANSITIONAL based on BI, width:length ratio, and component count
- **Grid-Transect Consistency Index** — CI = transect_erosion_area / grid_erosion_area per stretch; confidence flag (HIGH/MODERATE/LOW)
- **Years interval parameter** — user-specified years between epochs (replaces hardcoded 10 years)
- **New output layers:** Riparian_Corridor.shp, PerGrid_MMU_Filtered.shp, Stretch_Regime_Class.shp, GridTransect_Consistency.csv, labelled waterbody shapefiles (deltaic)

### Changed
- **Plugin UI redesigned** — River Settings group, regime-adaptive parameter toggling, MMU threshold spinbox
- `change_analysis.py` expanded from 436→786 lines — 6 new functions
- `extract_centerline()` now uses Voronoi skeleton (Shapely 2.0+) as primary method
- GEE script removed from plugin (standalone companion file)
- Pipeline passes river_type, buffer_m, mmu_cells, years_interval, min_polygon_area_ha through all stages

### Fixed
- Hardcoded `years_interval=10` → user-configurable (was producing wrong rates)
- Fishnet spanned full extent → clipped to riparian corridor (reduces cells 40–70%)
- Convex-hull centerline produced incorrect geometry for sinuous reaches → Voronoi skeleton

## v2.0 (2026-05-15) — Grid + Transect Analysis
- Grid-based per-cell erosion/accretion computation
- Stretch aggregation with Top-N ranking
- Transect-based bank retreat rates (convex-hull centerline)
- GEE companion script tab (placeholder)
- CRS projection selection widget
- Configurable cell size (5–500 m)

## v1.0 — Original Plugin
- Basic polygon overlay differencing
- Manual input only
- No regime awareness, no buffer, no MMU, no transect rates
