Problem
The flood_* functions in R/utils_photos.R and estimate_footprint() in R/utils_geo.R are generic enough to work for any BC airphoto project. They should live in a standalone package (fly — Floodplain Land-use through Years) rather than being sourced from the app.
Additionally, the app currently filters photos by centroid-in-AOI which misses photos whose footprint overlaps the AOI but centroid falls outside. The package will fix this with proper footprint-polygon intersection.
Proposed Solution
New repo NewGraphEnvironment/fly with functions:
fly_footprint() — centroid + scale → footprint polygon (fix CRS to 3005, add GSD support)
fly_filter() — filter by footprint-intersects-AOI (replaces buffer hack)
fly_summary() — footprint sizes and date ranges by scale
fly_coverage() — % AOI covered, grouped by year/scale/roll
fly_select() — greedy set-cover with priority = TRUE for auto resolution sorting
fly_query_*() — bcfishpass DB helpers (optional)
airbc then becomes library(fly) instead of source("R/utils_photos.R").
Relates to NewGraphEnvironment/sred-2025-2026#17
Problem
The
flood_*functions inR/utils_photos.Randestimate_footprint()inR/utils_geo.Rare generic enough to work for any BC airphoto project. They should live in a standalone package (fly— Floodplain Land-use through Years) rather than being sourced from the app.Additionally, the app currently filters photos by centroid-in-AOI which misses photos whose footprint overlaps the AOI but centroid falls outside. The package will fix this with proper footprint-polygon intersection.
Proposed Solution
New repo
NewGraphEnvironment/flywith functions:fly_footprint()— centroid + scale → footprint polygon (fix CRS to 3005, add GSD support)fly_filter()— filter by footprint-intersects-AOI (replaces buffer hack)fly_summary()— footprint sizes and date ranges by scalefly_coverage()— % AOI covered, grouped by year/scale/rollfly_select()— greedy set-cover withpriority = TRUEfor auto resolution sortingfly_query_*()— bcfishpass DB helpers (optional)airbc then becomes
library(fly)instead ofsource("R/utils_photos.R").Relates to NewGraphEnvironment/sred-2025-2026#17