alexander-petkov / wfas

A placeholder for the WFAS project.
5 stars 1 forks source link

Prototype zonal analysis for multiple raster layers to support WildfireSAFE analytics #53

Open wmjolly opened 2 years ago

wmjolly commented 2 years ago

I'd like to streamline the way we sample lots of rasters all at once for an analysis region.

Let's start with the Terrain metrics from WildfireSAFE:

Elevation and Slope should come from the LANDFIRE layers.

Example analysis vector shared as GeoJSON by email.

wmjolly commented 2 years ago

The desired result would be a consolidated JSON file with the simplified results.

alexander-petkov commented 2 years ago

The example analysis JSON contains multiple features.

Should I plan on generating stats for each one of them?

Or would every feature/geometry be a separate zonal stats request?

wmjolly commented 2 years ago

I would like just one final stats file that contains stats for each feature/geometry.

On Fri, Feb 4, 2022 at 12:04 PM alexander-petkov @.***> wrote:

The example analysis JSON contains multiple features.

Should I plan on generating stats for each one of them?

Or would every feature/geometry be a separate zonal stats request?

— Reply to this email directly, view it on GitHub https://github.com/alexander-petkov/wfas/issues/53#issuecomment-1030269139, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4G3D2CLQZ453YLGLSZ3ADUZQPNFANCNFSM5NKNJ36Q . You are receiving this because you authored the thread.Message ID: @.***>

alexander-petkov commented 2 years ago

Couple of points to clarify:

  1. WildfireSafe shows min, median, and max stats for each zone, while this ticket specifies min/mean/max. Median is needed, and not Mean, correct?
  2. WildfireSafe lists histograms for Elevation and Slope, in addition to histogram from Landform. Are Elevation and Slope Histograms also needed?
  3. WildfireSafe shows each histogram with 5 buckets, instead of counts for each distinct value. How should the WPS represent the histogram?
wmjolly commented 2 years ago

On Tue, Mar 15, 2022, 02:30 alexander-petkov @.***> wrote:

Couple of points to clarify:

  1. WildfireSafe shows min, median, and max stats for each zone, while this ticket specifies min/mean/max. Median is needed, and not Mean, correct?

Yes, Median is needed but just to be safe let's include the mean as well, so: min, median, mean, max for all variables

  1. WildfireSafe lists histograms for Elevation and Slope, in addition to histogram from Landform. Are Elevation and Slope Histograms also needed?

Yes, histograms for elevation and alope are needed

  1. WildfireSafe shows each histogram with 5 buckets, instead of counts for each distinct value. How should the WPS represent the histogram?

It would be best if we binned the histograms like WildfireSAFE. So, 5 bins evenly spaced from the min to the max

— Reply to this email directly, view it on GitHub https://github.com/alexander-petkov/wfas/issues/53#issuecomment-1067700176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4G3DYPEHDAZ2EEWOFCSZ3VABDDBANCNFSM5NKNJ36Q . You are receiving this because you authored the thread.Message ID: @.***>

alexander-petkov commented 11 months ago

Added ERC, BI, and SFDI to the zonal_stats CGI script as requested. These rasters are at much coarser resolution (~2.5km) compared to Elevation, Landform, and Slope rasters (30m). Therefore, statistics and histogram strategy is changed to include pixels which are partially within a vector zone, even if the center of the pixel does not fall within.

The same strategy applies for all rasters.

Relevant rasterstats documentation: https://pythonhosted.org/rasterstats/manual.html#rasterization-strategy

alexander-petkov commented 9 months ago

Make the zonal_stats service "region-aware", and not just CONUS-centric.