PSU-CSAR / vb-bagis-p

VB .NET source code for ArcMap BAGIS Parameters add-in
1 stars 1 forks source link

Timberline Tool - Generate a timberline raster using HRU's timberline elevation data #40

Open jdduh opened 7 years ago

jdduh commented 7 years ago

Combine the timberline elevation value for each HRU and the DEM to create a binary raster showing areas above and below the timberline.

jdduh commented 7 years ago

The calculation is performed based on the steps below: (TBD by Geoffrey)

lbross commented 7 years ago

Suggestion for the calculation:

  1. Reclass raster setting value to the timberline elevation for each hru
  2. Raster calculator If dem < timberline reclass value then set value to 0 If dem >= timberline reclass value then set value to 1

If you think this would work, I will also need a design for the UI. New button to create and/or display this layer?

jdduh commented 7 years ago

Convert grid_zones_v to raster based on the values in TIMBER_ELEV field. Recode raster cell value to "A_REALLY_LARGE_NUMBER" when the cell value is 0. Use the output raster in your Step 2.

Notes: Pay attention to elevation unit. I believe the elevation in the TIMBER_ELEV field is always in Meters. The program also needs to have the capability to identify the default TIMBER_ELEV value (e.g., 0). If TIMBER_ELEV equals 0, then the whole HRU is set to 0.

lbross commented 7 years ago

To clarify 0 = below timberline, 1 = at or above timberline Note: TIMBER_ELEV is always in the units of the filled DEM so no conversion needed

  1. Convert grid_zones_v to raster based on the values in TIMBER_ELEV field (timber_r)
  2. Get unique values from timber_r
  3. If only unique value = 0 then do nothing. Entire AOI is below timberline
  4. If any unique values = 0 then reclass 0 values in timber_r to a value greater than the maximum value in the filled DEM
  5. timber_r and filled DEM are inputs to raster calculator If dem < timber_r value then set value to 0 If dem >= timber_r value then set value to 1

I need a design for how this should be handled in the timberline tool workflow

lbross commented 7 years ago

Where should I store the binary raster? I will put it in the hru folder for now, next to grid_zones_v.

lbross commented 7 years ago

Initial implementation is complete. It's currently initiated by clicking a button called 'Binary Raster'. When the process completes, the binary raster is added to the ArcMap viewer. I'm sure this isn't ideal but let me know when you have the workflow finalized.

lbross commented 6 years ago

Just realized that the timberline tool results depend on the hru selected. @jdduh requested that the output be stored in the layers.gdb at the AOI level. This means that we can only have one timberline layer at a time. I propose pre-pending the HRU name to the timberline file name. For example: hru_prms_timberline so we can have multiple timberline layers in the layers.gdb.

Will check to see if the layer exists before calculating and allow the user to abend processing if they want to keep the old layer. Will pop a MessageBox when the layer is complete informing the user of the location of the layer.

jdduh commented 6 years ago

Sounds good to include HRU name in the output timeberline layer.

lbross commented 6 years ago

Great! I just posted a new version of BAGIS-P (1.9.9-b1) that includes the Timberline tool. This way it is available when you would like to demo it for NWCC.