Skip to content

Use fresh to fill gaps between patchy floodplain polygons before photo selection #20

@NewGraphEnvironment

Description

@NewGraphEnvironment

Problem

The flooded VCA produces patchy floodplain polygons — gaps between modelled floodplain chunks where the algorithm can't detect lateral habitat (steep banks, narrow canyon sections, model resolution limits). These gaps don't mean the riverscape stops being interesting. A side channel, wetland, or cottonwood stand can exist in a "gap" that the model misses.

When diggs uses the raw floodplain polygon as the AOI for photo selection, these gaps can create holes in ortho coverage. The footprint filter method helps — it's generous enough to catch photos whose coverage extends across gaps — but it's not guaranteed, especially for narrow gaps between patchy floodplain chunks on smaller tributaries.

Proposed Solution (in fresh)

fresh (FWA-Referenced Spatial Hydrology, NewGraphEnvironment/sred-2025-2026#18) should provide network-aware AOI preparation that:

  1. Prune isolated upstream fragmentsfrs_prune_isolated() drops dead-end floodplain pockets on upper tributaries (Foxy Creek, Crow Creek problem)
  2. Buffer gaps between retained chunksfrs_buffer_gaps() adds buffered stream corridors between surviving floodplain polygons so the AOI covers the full riverscape, not just the modelled floodplain. This mirrors what bcfishpass does in the lateral habitat generator — buffers on all streams, side channels, and wetlands included.
  3. Return a continuous AOI — the union of retained floodplain polygons + buffered gap-fill corridors, ready for diggs or drift

The network query driving this is the same frs_upstream() / frs_downstream() infrastructure fresh already needs. The buffer width could scale with stream order or channel width from bcfishpass.

Context

Discovered during diggs vignette — Neexdzii Kwah 1968 airphoto selection. Footprint filtering (258 photos) is much better than centroid filtering (40 photos) but gaps in the patchy floodplain AOI could still leave holes in ordered ortho coverage. The fix belongs in fresh, not diggs — diggs just consumes whatever AOI it's given.

Relates to NewGraphEnvironment/sred-2025-2026#18
Relates to NewGraphEnvironment/sred-2025-2026#15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions