Problem
frs_break_find(attribute = "gradient") only creates breaks where gradient EXCEEDS the threshold. It does not create breaks where gradient drops BACK BELOW the threshold. This means the transition from "too steep" back to "suitable habitat" is not captured — the downstream portion stays merged with the steep section, and frs_col_generate computes an averaged gradient across the transition.
Example at 100m intervals, threshold 5.49%:
200m: 7% (above → break)
300m: 8% (above → break)
400m: 6% (above → break)
500m: 4% (below → NO break ← bug)
600m: 3% (below)
The 500-600m section at 3-4% (good habitat) stays attached to the 400-500m steep section. Classification is wrong.
Considerations before fixing
Segment count explosion
Adding "back below" breaks roughly doubles break points per threshold. With 7 gradient thresholds across species and 100m intervals, segment counts could go from 4x to 30x+ the base FWA network. Province-wide this is significant.
Interval parameter
The interval parameter (default 100m) controls sampling resolution. Options:
- 100m: precise, many breaks, 30x+ inflation risk
- 500m: coarser, fewer breaks, might miss short steep sections (<500m)
- User-configurable (already is): let users choose precision vs volume
FWA segment design
FWA segments come from 1:20k cartographic mapping — vertices at bends, confluences, waterbody boundaries. Segments are typically 100-500m. The gradient on each is computed from endpoint Z values. Understanding FWA segment design may inform what interval makes sense.
Questions
- What interval does bcfishpass use for gradient barrier detection?
- Does bcfishpass capture both edges of threshold crossings?
- What does the FWA User Guide say about segment construction and Z values?
- At 500m intervals, how many short steep sections (<500m) would we miss?
- Is the segment inflation acceptable for the spatial precision gained?
Relates to
Problem
frs_break_find(attribute = "gradient")only creates breaks where gradient EXCEEDS the threshold. It does not create breaks where gradient drops BACK BELOW the threshold. This means the transition from "too steep" back to "suitable habitat" is not captured — the downstream portion stays merged with the steep section, andfrs_col_generatecomputes an averaged gradient across the transition.Example at 100m intervals, threshold 5.49%:
The 500-600m section at 3-4% (good habitat) stays attached to the 400-500m steep section. Classification is wrong.
Considerations before fixing
Segment count explosion
Adding "back below" breaks roughly doubles break points per threshold. With 7 gradient thresholds across species and 100m intervals, segment counts could go from 4x to 30x+ the base FWA network. Province-wide this is significant.
Interval parameter
The
intervalparameter (default 100m) controls sampling resolution. Options:FWA segment design
FWA segments come from 1:20k cartographic mapping — vertices at bends, confluences, waterbody boundaries. Segments are typically 100-500m. The gradient on each is computed from endpoint Z values. Understanding FWA segment design may inform what interval makes sense.
Questions
Relates to