Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Jun 28, 2024
2 parents a402474 + 34c0680 commit 9a93f4d
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 25 deletions.
3 changes: 2 additions & 1 deletion data/pscis_modelledcrossings_streams_xref.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3562,4 +3562,5 @@ stream_crossing_id,modelled_crossing_id,linear_feature_id,watershed_group_code,r
198883,11303791,,LNIC,LB,Matched to closest modelled crossing.
198881,11300797,,LNIC,LB,Matched to closest modelled crossing.
198882,11303627,,LNIC,LB,Matched to closest modelled crossing.
NULL,23800079,,USHU,LS,Point slightly off from satellite
197180,,701418136,HORS,MC,"PSCIS point is on a driveway with no modelled crossing, snapping point to nearest stream "
197571,4600316,,ELKR,MC,satellite imagery shows stream flowing to north before crossing under road. Matched PSCIS 197571
9 changes: 9 additions & 0 deletions data/user_habitat_classification.csv
Original file line number Diff line number Diff line change
Expand Up @@ -15248,6 +15248,7 @@
360887120,20,120,TSAY,SK,spawning,t,SN,2023-09-01,Pacific Salmon Foundation,source point snapped to closest stream within 250m
360887414,204,304,KITL,SK,spawning,t,SN,2023-09-01,Pacific Salmon Foundation,source point snapped to closest stream within 250m
360879788,0,100,NASC,SK,spawning,t,SN,2023-09-01,Pacific Salmon Foundation,manually matched
<<<<<<< HEAD
360804808,253,527.036659,BULK,CH,spawning,t,LB,2024-06-06,Pacific Salmon Foundation,"PSE point is not located on a modelled stream, closest modelled stream line to PSE point was selected."
360864873,633,937,BULK,CO,spawning,t,LB,2024-06-06,Pacific Salmon Foundation,
360864873,1218.44764,1570,BULK,CO,spawning,t,LB,2024-06-06,Pacific Salmon Foundation,
Expand Down Expand Up @@ -15294,3 +15295,11 @@
360873822,22478,22509.83251,BULK,SK,spawning,t,LB,2024-06-06,Pacific Salmon Foundation,River sockeye
360873822,168869,170329.9685,BULK,SK,spawning,t,LB,2024-06-06,Pacific Salmon Foundation,River sockeye
360881038,0,280.2148356,BULK,SK,spawning,t,LB,2024-06-06,Pacific Salmon Foundation,Lake sockeye
360804115,652.18,852.93,BULK,CO,spawning,t,LB,2024-06-17,Pacific Salmon Foundation,
356209928,25.6202005,486.7184822,SHUL,CO,Rearing,t,MC,2024-06-27,Local Knowledge,Local Knowledge -CO rearing habitati
356209928,486.719176,822,SHUL,CO,Spawning,t,MC,2024-06-27,Local Knowledge,Local Knowledge - CO Spawning
356343800,0,838,SHUL,SK,Spawning,t,MC,2024-06-27,Local Knowledge,Local Knowledge - CO and SK Spawning
356348431,1481,1681,SHUL,SK,Rearing,t,MC,2024-06-27,Local Knowledge,Local Knowledge - Some SK seen 300m upstream
356348431,1481,1781,SHUL,SK,Spawning,t,MC,2024-06-27,Local Knowledge,Local Knowledge - Some SK seen 300m upstream
356137288,265.6052138,408,SHUL,SK,Spawning,t,MC,2024-06-27,Local Knowledge,Local Knowledge - Adult SK observed up to rail line
356347377,0,558,BONP,CH,Spawning,t,MC,2024-06-27,Local Knowledge,Local Knowledge - major spawning for CH
16 changes: 16 additions & 0 deletions data/user_modelled_crossing_fixes.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6163,6 +6163,7 @@ modelled_crossing_id,structure,watershed_group_code,reviewer_name,review_date,so
3700192,NONE,CRKD,AI,2024-01-02,Bing/Google/ESRI, no structure
6800484,NONE,HORS,MC,2024-03-14,DWB field assessments 2023,no structure found during assessment
6801356,NONE,HORS,MC,2024-03-14,DWB field assessments 2023,no structure found during assessment
<<<<<<< HEAD
11304215,NONE,LNIC,LB,2024-04-09,Field assessment,Comments indicate this crossing has been removed
11300428,NONE,LNIC,LB,2024-04-09,Imagery review,
11300427,NONE,LNIC,LB,2024-04-09,Imagery review,
Expand Down Expand Up @@ -21680,6 +21681,21 @@ modelled_crossing_id,structure,watershed_group_code,reviewer_name,review_date,so
11304259,OBS,LNIC,LB,2024-06-11,Bing/Google/ESRI imagery,
11302218,FORD,LNIC,LB,2024-06-12,Bing/Google/ESRI imagery,
11302231,FORD,LNIC,LB,2024-06-13,Bing/Google/ESRI imagery,
1400002,NONE,BONP,MC,2024-06-27,Local Knowledge,Local Knowledge - Road no longer exists
18300020,CBS,SHUL,MC,2024-06-27,Local Knowledge,Local Knowledge - Replaced with new CBS in summer 2023
18303484,CBS,SHUL,MC,2024-06-27,Local Knowledge,Local Knowledge - Barrier confirmed
18303506,OBS,SHUL,MC,2024-06-27,Local Knowledge,Local Knowledge - Fish getting past this structure (Bridge)
1400589,CBS,BONP,MC,2024-06-27,Local Knowledge,Local Knowledge - Culvert is Barrier
1400042,CBS,BONP,MC,2024-06-27,Local Knowledge,"Local Knowledge - Two poorly installed culverts, Barrier. Entire Creek is groundwater"
4603156,NONE,ELKR,MC,2024-06-27,imagery,South Line Creek runs parallel to road in satellite imagery. Crossing does not exist. Remove.
4603391,NONE,ELKR,MC,2024-06-27,imagery,no sign of crossing on satellite imagery. Site of a landslide. Remove?
4603392,NONE,ELKR,MC,2024-06-27,imagery,no sign of crossing on satellite imagery. Remove?
4603432,NONE,ELKR,MC,2024-06-27,BC Parks,Confirmed by BC Parks to not exist. Recreational trail erroneously mapped in DRA. Remove crossing from model
4603971,NONE,ELKR,MC,2024-06-27,imagery,no sign of crossing on satellite imagery. Remove?
4604464,NONE,ELKR,MC,2024-06-27,imagery,South Line Creek runs parallel road in satellite imagery. Crossing does not exist. Remove.
24734832,NONE,ELKR,MC,2024-06-27,BC Parks,Confirmed by BC Parks to not exist. Recreational trail erroneously mapped in DRA. Remove crossing from model
4605600,OBS,ELKR,MC,2024-06-27,imagery,bridge
4603974,NONE,ELKR,MC,2024-06-27,imagery,No crossing visible
23800730,CBS,USHU,LS,2024-06-26,Bing/Google/ESRI imagery,Delete - no structure
23800940,OBS,USHU,LS,2024-06-26,Bing/Google/ESRI imagery,bridge - changed from CBS to OBS
23801453,OBS,USHU,LS,2024-06-26,Bing/Google/ESRI imagery,bridge - changed from CBS to OBS
Expand Down
38 changes: 36 additions & 2 deletions data/user_pscis_barrier_status.csv
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ stream_crossing_id,user_barrier_status,watershed_group_code,reviewer_name,review
50258,PASSABLE,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
50260,BARRIER,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
50261,BARRIER,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
50263,POTENTIAL,ELKR,CWF,2021-01-01,NJO - based on assessment comments (and imagery review where required)
50263,PASSABLE,ELKR,MC,2024-03-27,Ford crossing based on assessment
50264,PASSABLE,ELKR,CWF,2021-01-01,NJO - based on assessment comments (and imagery review where required)
50265,POTENTIAL,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
50266,POTENTIAL,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
Expand Down Expand Up @@ -784,7 +784,6 @@ stream_crossing_id,user_barrier_status,watershed_group_code,reviewer_name,review
61632,PASSABLE,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
61635,PASSABLE,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
61636,PASSABLE,ELKR,CWF,2021-01-01,NJO - Flag for review - based on assessment comments (and imagery review where required)
61637,BARRIER,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
62123,PASSABLE,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
62134,PASSABLE,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
62135,PASSABLE,ELKR,CWF,2021-01-01,based on assessment comments (and imagery review where required)
Expand Down Expand Up @@ -1319,3 +1318,38 @@ stream_crossing_id,user_barrier_status,watershed_group_code,reviewer_name,review
197017,PASSABLE,LNIC,LB,2024-04-09,"This is a ford, PSCIS barrier_status = UNKNOWN, edit existing record in fix table to PASSABLE"
196200,PASSABLE,TABR,SN,2024-06-03,"Crossing has been remediated, see https://news.gov.bc.ca/releases/2020TRAN0099-001219"
196223,PASSABLE,TABR,SN,2024-06-03,Imagery clearly shows crossing has been remediated with a bridge installation
197664,POTENTIAL,BULK,LB,2024-06-13,Updated to potential barrier for CWF WCRP reporting
197665,POTENTIAL,BULK,LB,2024-06-13,Updated to potential barrier for CWF WCRP reporting
197823,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197824,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197826,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197563,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197803,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197805,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197816,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197818,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197819,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197820,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197821,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197822,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197846,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197847,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197831,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197837,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197838,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197839,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197788,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197789,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197790,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197791,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197801,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197804,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197797,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197808,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197811,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197841,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197856,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197858,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
197860,PASSABLE,ELKR,MC,2024-06-27,Ford crossing based on assessment
62245,PASSABLE,ELKR,MC,2024-06-27,This crossing has been rehabilitated
62293,POTENTIAL,ELKR,MC,2024-06-27,"Channel blew out and formed a new channel through road. Not clear if this ""ford"" is passable."
10 changes: 6 additions & 4 deletions docs/03_model_habitat_linear.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(linear_habitat)=
# Linear spawning/rearing habitat model

Streams accessible to fish may be suitable for spawning or rearing, or may only be used as movement corridors to reach such habitats. When estimating fragmentation and prioritizing further work, the amount of usable spawning or rearing habitat (habitat quality) is of greater interest than the raw amount of corridor habitat. In addition to modelling barriers to fish passage, `bcfishpass` can model the intrinsic potential (IP) of streams to support spawning or rearing activities for several species (Pacific Salmon, Steelhead, Bull Trout, Westslope Cutthroat Trout).
Streams accessible to fish may be suitable for spawning or rearing, or may only be used as movement corridors to reach such habitats. When estimating fragmentation and prioritizing further work, the amount of potential spawning or rearing habitat is of greater interest than the raw amount of corridor habitat. In addition to modelling barriers to fish passage, `bcfishpass` can model the intrinsic potential (IP) of streams to support spawning or rearing activities for several species (Pacific Salmon, Steelhead, Bull Trout, Westslope Cutthroat Trout).

Linear spawning/rearing habitat modelling is currently based on species specific criteria for:

Expand Down Expand Up @@ -43,10 +43,12 @@ Channel width is modelled for all of BC:
- [Poisson Consulting](https://www.poissonconsulting.ca/temporary-hidden-link/859859031/channel-width-21b/) model based on upstream area / precipitation
- [data collection/preparation](https://github.com/smnorris/fwapg/tree/main/extras/channel_width)

**NOTE** contributing area (FWA watersheds) and precipitiation (ClimateBC) datasets used to model discharge / channel width are both cut off at the BC border:
**NOTES**

- *all results from the above models are only valid for streams with 100% of their contributing area with BC*
- *streams with contributing area outside of BC (and thus with invalid spawning/rearing models) ARE NOT CURRENTLY NOTED in model outputs/file distributions*
1. Discharge and channel width models are based on historic climate data
2. Contributing area (FWA watersheds) and precipitiation (ClimateBC) datasets used to model discharge / channel width are both cut off at the BC border:
- *all results from the above models are only valid for streams with 100% of their contributing area with BC*
- *streams with contributing area outside of BC (and thus with invalid spawning/rearing models) ARE NOT CURRENTLY NOTED in model outputs/file distributions*



Expand Down
21 changes: 21 additions & 0 deletions jobs/load_monthly
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ bcdata bc2pg -r whse_mineral_tenure.og_petrlm_dev_rds_pre06_pub_sp
bcdata bc2pg -r whse_tantalis.ta_conservancy_areas_svw
bcdata bc2pg -r whse_tantalis.ta_park_ecores_pa_svw

# DRA
mkdir -p tmp
# **
# ** note temp dra data cache, to be replaced with new download location or a bc2pg download **
# **
#curl ftp://ftp.geobc.gov.bc.ca/sections/outgoing/bmgs/DRA_Public/dgtl_road_atlas.gdb.zip \
# -o tmp/dgtl_road_atlas.gdb.zip
$PSQL -c "drop table if exists bcdata.transport_line" # in case of any failed loads
ogr2ogr \
-f PostgreSQL \
"PG:$DATABASE_URL" \
--config PG_USE_COPY YES \
-lco GEOMETRY_NAME=geom \
-lco FID=transport_line_id \
-nln bcdata.transport_line \
/vsizip//vsicurl/https://bcfishpass.s3.us-west-2.amazonaws.com/dgtl_road_atlas.gdb.zip \
TRANSPORT_LINE
$PSQL -c "truncate whse_basemapping.transport_line;
insert into whse_basemapping.transport_line select * from bcdata.transport_line"
$PSQL -c "drop table bcdata.transport_line"

# parcel fabric, renaming download so it can be read without unzipping
# ----
curl \
Expand Down
18 changes: 0 additions & 18 deletions jobs/load_weekly
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,3 @@ ogr2ogr -f PostgreSQL \
-nln cabd.waterfalls \
"https://cabd-web.azurewebsites.net/cabd-api/features/waterfalls?filter=province_territory_code:eq:bc&filter=use_analysis:eq:true" \
OGRGeoJSON

# DRA
mkdir -p tmp
curl ftp://ftp.geobc.gov.bc.ca/sections/outgoing/bmgs/DRA_Public/dgtl_road_atlas.gdb.zip \
-o tmp/dgtl_road_atlas.gdb.zip
$PSQL -c "drop table if exists bcdata.transport_line" # in case of any failed loads
ogr2ogr \
-f PostgreSQL \
"PG:$DATABASE_URL" \
--config PG_USE_COPY YES \
-lco GEOMETRY_NAME=geom \
-lco FID=transport_line_id \
-nln bcdata.transport_line \
/vsizip/tmp/dgtl_road_atlas.gdb.zip \
TRANSPORT_LINE
$PSQL -c "truncate whse_basemapping.transport_line;
insert into whse_basemapping.transport_line select * from bcdata.transport_line"
$PSQL -c "drop table bcdata.transport_line"

0 comments on commit 9a93f4d

Please sign in to comment.