diff --git a/conductor/tracks/enhanced_water_processing_20260203/plan.md b/conductor/tracks/enhanced_water_processing_20260203/plan.md new file mode 100644 index 0000000..7cef1c0 --- /dev/null +++ b/conductor/tracks/enhanced_water_processing_20260203/plan.md @@ -0,0 +1,32 @@ +# Implementation Plan - Enhanced Water Processing + +## Phase 1: Configuration & Integration +- [x] Task: Update `geodata_pipeline/config.py` (62aa4ec) + - [ ] Add `hydrolakes_dir` to `RawConfig`. + - [ ] Define `LakeConfig` dataclass (enabled, source_path, default_depth_m, match_tolerance_m). + - [ ] Add `lakes` field to `RiverErosionConfig`. + +## Phase 2: Lake Depth Lookup & Verification +- [ ] Task: Implement `_find_lake_depths` in `geodata_pipeline/river_erosion.py` + - [ ] Input: Manual Blue Mask blobs (as polygons or centroids). + - [ ] Logic: Spatial query against HydroLAKES shapefile. + - [ ] Return: Depth for each blob + metadata (ID, Distance). +- [ ] Task: Create a verification mode/log + - [ ] Log the matching results (Tile, Blob location, Matched HydroLAKE ID, Depth, Distance). + +## Phase 3: Manual Mask Loading +- [ ] Task: Implement `_load_manual_mask` in `geodata_pipeline/river_erosion.py` + - [ ] Read PNG from `raw/river_masks_viz/{tile_id}.png`. + - [ ] Return semantic mask layers: Water (Blue), Island (Green), Bridge (Red). + +## Phase 4: Composition Logic +- [ ] Task: Update `erode_rivers` in `geodata_pipeline/river_erosion.py` + - [ ] Load Manual Mask (if exists). + - [ ] **Overlay Logic:** + - If Green: Set Depth = 0, Mask = 0. + - If Red: Set Depth = 0, Mask = 0. + - If Blue: Set Mask = 1. + - Look up depth using `_find_lake_depths`. + - Set Depth = Matched Lake Depth. + - [ ] Combine with existing River erosion (max depth wins for intersections, but Blue overrides River shape). + - [ ] Apply final depth map.