smnorris / bcdams

Point locations of BC dams, compiled from several data sources by Canadian Wildlife Federation for fish passage modelling
0 stars 1 forks source link

barrier status codes #6

Closed smnorris closed 2 years ago

smnorris commented 2 years ago

I do not believe the barrier status of every dam has been checked.

While dams seem more likely to be barriers than culverts, in absence of better data, the barrier status of dams should probably be defaulting to "potential barrier" as per modelled culverts.

smnorris commented 2 years ago

I think we can just tweak the barrier coding.

Remove barrier_ind and replace with barrier_status as per bcfishpass.crossings.

Update current data like this:

ogr2ogr -f GeoJSON \
  dams_new.geojson \
  -dialect SQLITE \
  -sql "SELECT
bcdams_id,
source_dataset,
source_id,
dam_name,
waterbody_name,
owner,
hydro_dam_ind,
case 
  when barrier_ind = 'N' then 'PASSABLE'
  when barrier_ind = 'Y' and hydro_dam_ind = 'Y' then 'BARRIER'
  else 'POTENTIAL'
end as barrier_status
from bcdams" \
bcdams.geojson
smnorris commented 2 years ago

@nickw-CWF @captainmarmot @NewGraphEnvironment, any other thoughts on this?

Changing default dam barrier status to POTENTIAL should not have much (any?) effect on the modelling and reporting.

I notice the issue when mapping. When making this request: https://features.hillcrestgeo.ca/bcfishpass/collections/bcfishpass.crossings/items.html?barrier_status=BARRIER I only expected PSCIS confirmed barriers... because dams are returned as well there many more features than I expected.

nickw-CWF commented 2 years ago

I'm open to changing the default barrier status for dams to 'POTENTIAL', but dams aren't like stream crossings where 30%+ of unassessed crossings are going to be passable. Unless there is a fish passage structure or the dam has been decommissioned, then a dam will be a barrier, and the number that have fish passage/are decommissioned will be quite low.

Wouldn't this query solve your issue: https://features.hillcrestgeo.ca/bcfishpass/collections/bcfishpass.crossings/items.html?barrier_status=BARRIER&crossing_feature_type!=DAM?

smnorris commented 2 years ago

Yes - while that query is not doing the filter (I will have to look into why, it looks fine to me), there is no issue working around this if defaulting to barrier is preferred.

Agreed that most will be barriers, and far more than road crossings. For features coming from FISS and FWA though, I'm not as confident a dam will actually be present. It may be like falls from those sources - not reliable enough to confidently say there is a barrier present.

CaptainMarmot commented 2 years ago

I would agree that most dams will be barriers. Perhaps a further filter to say that the dams from the vetted dams layer are barriers but the dams from FISS and FWA are potentials?

From: Simon Norris @.> Sent: March 25, 2022 3:02 PM To: smnorris/bcdams @.> Cc: Mount, Craig A ENV:EX @.>; Mention @.> Subject: Re: [smnorris/bcdams] barrier status codes (Issue #6)

[EXTERNAL] This email came from an external source. Only open attachments or links that you are expecting from a known sender.

Yes - while that query is not doing the filter (I will have to look into why, it looks fine to me), there is no issue working around this if defaulting to barrier is preferred.

Agreed that most will be barriers, and far more than road crossings. For features coming from FISS and FWA though, I'm not as confident a dam will actually be present. It may be like falls from those sources - not reliable enough to confidently say there is a barrier present.

— Reply to this email directly, view it on GitHubhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsmnorris%2Fbcdams%2Fissues%2F6%23issuecomment-1079475359&data=04%7C01%7Ccraig.mount%40gov.bc.ca%7C3080def492cc4e165d0108da0eab251f%7C6fdb52003d0d4a8ab036d3685e359adc%7C0%7C0%7C637838425461686874%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=qkDzgKUINse%2FapeL9%2B%2BAcdLghqFyqZMa4LfTxEMWZ0Y%3D&reserved=0, or unsubscribehttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALKECN6J7NU32TTTUN2YTA3VBYZXBANCNFSM5RU4RB7A&data=04%7C01%7Ccraig.mount%40gov.bc.ca%7C3080def492cc4e165d0108da0eab251f%7C6fdb52003d0d4a8ab036d3685e359adc%7C0%7C0%7C637838425461686874%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vBT%2B2VC6SSc2CgZ%2FinQF9xKsSG0XlHvUqOIlzZ%2FOA4E%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.**@.>>

nickw-CWF commented 2 years ago

We just finished processing the CABD dam data for BC - this is essentially bcdams with additional data sources and full QA/QC. The dams layer has manually been deduplicated, georeferenced, and any non-existent structures removed.

The CABD dam layer could replace the base dams layer - I could have Katherine or Alex incorporate our manual updates to bcdamsin the CABD data.

smnorris commented 2 years ago

Great news. Is there an API to extract features from CABD?

nickw-CWF commented 2 years ago

Great news. Is there an API to extract features from CABD?

Yes, there is! The BC data is not loaded in just yet, we are just doing some final pre-release checks, but it should be up by the end of the week.

The relevant request would be: https://cabd-web.azurewebsites.net/cabd-api/features/dams?filter=province_territory_code:eq:bc

In the meantime if you want to test it out/see the data structure, you can try it for Alberta: https://cabd-web.azurewebsites.net/cabd-api/features/dams?filter=province_territory_code:eq:ab

smnorris commented 2 years ago

Excellent. I'll plan to archive this repository.

smnorris commented 2 years ago

It looks like up_passage_type_code would be the key attribute for bcfishpass purposes. AB has values 1, 2,3,6 - can you provide a list of codes and descriptions?

nickw-CWF commented 2 years ago

The most relevant would actually be passability_status_code:

Code Value
1 Barrier
2 Partial Barrier
3 Passable

Default value is 1/Barrier for dams. Because we need the passability status to be flexible across Canada (for all species, etc.), any dam with a known fish passage structure is assigned 2/Partial Barrier rather than 3/Passable. These structures will be passable for some species, but not for others.

up_passage_type_code identifies the type of fish passage structure that exists.

smnorris commented 2 years ago

Perfect, thanks @nickw-CWF.

Is there a preferred mechanism for requesting/submitting updates?