-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
Column names like blue_line_key, downstream_route_measure, upstream_route_measure are hardcoded throughout fresh. This ties fresh to FWA naming conventions. When spyda (#41) builds networks from other sources (LiDAR, other jurisdictions), those networks will use different column names for the same concepts.
Proposed Solution
Use options() with FWA defaults — set once per session, used everywhere. Consistent with the existing fresh.partition_table and fresh.partition_col pattern in .frs_resolve_aoi().
options(
fresh.stream_table = "whse_basemapping.fwa_stream_networks_sp",
fresh.blk_col = "blue_line_key",
fresh.wscode_col = "wscode_ltree",
fresh.localcode_col = "localcode_ltree",
fresh.measure_ds_col = "downstream_route_measure",
fresh.measure_us_col = "upstream_route_measure",
fresh.segment_id_col = "linear_feature_id"
)Internal helper to read these:
.frs_col <- function(name) {
getOption(paste0("fresh.", name), default = .frs_defaults[[name]])
}Scope
Cross-cutting — touches every function that generates SQL with column names:
frs_network*,frs_point_snap,frs_point_locatefrs_break*,frs_classify,frs_aggregatefrs_stream_fetch,frs_lake_fetch,frs_wetland_fetchfrs_fish_obs,frs_fish_habitat- Internal helpers (
.frs_stream_guards,.frs_build_where, etc.)
Approach
Single PR after the habitat model functions (#36, #38, #39, #40) are complete. Do not mix with feature work.
Relates to #41
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels