Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precompute fuel type area by hfi threshold #3261

Merged
merged 13 commits into from
Nov 24, 2023
Merged

Conversation

dgboss
Copy link
Collaborator

@dgboss dgboss commented Nov 23, 2023

Precalculate and save the area of each fire zone unit covered by each fuel type for the hfi thresholds of interest (4k-10k and > 10k). General process for an hfi range of interest:

  1. Take an hfi GeoTiff from sfms and re-classify to zeros and ones. A value of 1 corresponds to a cell with an hfi value in the range defined by the threshold (eg. 4k - 10k). Cells with values outside this arrange are assigned a value of 0.
  2. Multiply this re-classified GeoTiff by the fuel type raster which leaves us with fuel types cells that overlap the hfi cells of interest, this is our masked fuel type layer.
  3. Take the geometry of a firezone unit and clip the masked fuel type layer leaving us with fuel type data for just the fire zone unit.
  4. Count up the pixels for each fuel type within that fire zone unit and save the info in the API database.

Test Links:

Landing Page
MoreCast 2.0
Percentile Calculator
MoreCast
C-Haines
FireBat
FireBat bookmark
Auto Spatial Advisory (ASA)
HFI Calculator

Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (b574ec3) 81.95% compared to head (e62c64f) 81.96%.

Files Patch % Lines
api/app/routers/fba.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3261      +/-   ##
==========================================
+ Coverage   81.95%   81.96%   +0.01%     
==========================================
  Files         276      276              
  Lines        9496     9504       +8     
  Branches      446      446              
==========================================
+ Hits         7782     7790       +8     
  Misses       1595     1595              
  Partials      119      119              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dgboss dgboss requested review from conbrad and brettedw November 23, 2023 23:17
@dgboss dgboss changed the title Precompute fuel type area by hfi threhold Precompute fuel type area by hfi threshold Nov 23, 2023
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dgboss dgboss temporarily deployed to production November 24, 2023 18:22 Inactive
@dgboss dgboss merged commit 788a2cd into main Nov 24, 2023
32 checks passed
@dgboss dgboss deleted the task/precompute-stats/2897 branch November 24, 2023 19:06
vanislekahuna pushed a commit to vanislekahuna/wps that referenced this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants