Skip to content

Commit

Permalink
Merge branch 'main' into tracking-table-views
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewp-CWF authored Nov 13, 2024
2 parents 3dc90eb + 51f47bd commit 3a1576c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion data/pscis_modelledcrossings_streams_xref.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ stream_crossing_id,modelled_crossing_id,linear_feature_id,watershed_group_code,r
112333,4606301,,ELKR,,
112334,4606298,,ELKR,,
112335,,,ELKR,,
112336,,706832864,ELKR,,
112336,,,ELKR,MC,On unmapped tributary. Nothing to match to
112337,4606616,,ELKR,,
112338,,,ELKR,,
112339,4606303,,ELKR,,
Expand Down
3 changes: 3 additions & 0 deletions data/user_modelled_crossing_fixes.csv
Original file line number Diff line number Diff line change
Expand Up @@ -21087,3 +21087,6 @@ modelled_crossing_id,structure,watershed_group_code,reviewer_name,review_date,so
11302064,NONE,LNIC,LB,2024-07-16,imagery,Ortho image indicates the stream has likely migrated/been redirected to the north and no longer crosses this road.
11301333,OBS,LNIC,LB,2024-07-16,imagery,Appears to be a bridge on sat imagery- stream goes to north of where it's mapped
2300291,NONE,CARR,LB,2024-11-04,Lhtako Dene WCRP Field Assessment 2023,"River left has an old concrete, log, and metal cribbing structure located on the bank immediately adjacent to the stream, perhaps used to draft water from stream. Large angle iron driven vertically into stream bed and intake pipe visible in stream bed. No manmade barrier to fish passage at this location but there is a beaver dam present immediately downstream of structure"
1004605216,NONE,ELKR,MC,2024-11-08,Elk WCRP excluded structures list,
1024735443,NONE,ELKR,MC,2024-11-08,Elk WCRP excluded structures list,Recreational trail erroneously mapped in Digital Road Atlas
1004606284,FORD,ELKR,MC,2024-11-08,Elk WCRP excluded structures list,Confirmed via literature: Cope et al. (2016)
10 changes: 5 additions & 5 deletions db/v0.5.3/sql/join_tracking_table_crossings_vw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ as
$$
begin
execute format('create or replace view wcrp_%I.combined_tracking_table_crossings_wcrp_vw_%I as
select
case
select
case
when tt.barrier_id is not null then tt.barrier_id
else cv.aggregated_crossings_id
end as barrier_id,
cv.crossing_source,
cv.crossing_source,
cv.crossing_feature_type,
cv.pscis_status,
cv.crossing_type_code,
Expand Down Expand Up @@ -88,7 +88,7 @@ begin
cv.rank_combined,
cv.tier_combined,
cv.geom,
tt.internal_name,
tt.internal_name,
tt.watercourse_name,
tt.road_name,
tt.structure_type,
Expand Down Expand Up @@ -117,7 +117,7 @@ begin
tt.notes,
tt.supporting_links
from bcfishpass.crossings_wcrp_vw cv
full outer join wcrp_%I.combined_tracking_table_%I tt
full outer join wcrp_%I.combined_tracking_table_%I tt
on tt.barrier_id = cv.aggregated_crossings_id
where (cv.watershed_group_code in
(select watershed_group_code
Expand Down

0 comments on commit 3a1576c

Please sign in to comment.