PSU-CSAR / vb-bagis

Source code for BAGIS V3 ESRI Add-In
0 stars 1 forks source link

BASIN Tool - unable to create AOIs when using an AOI as a BASIN #52

Closed jdduh closed 7 years ago

jdduh commented 7 years ago

When a BASIN is selected, the AOI tool becomes enabled. image

However, when an AOI is selected as the target BASIN, the AOI tool is still disabled. The message prompted is incorrect.

Here is the wrong message after an AOI is selected as a BASIN.

image

Only a BASIN that doesn't have any AOI in it can have its DEM replaced. The DEM of an AOI cannot be replaced. The SET DEM Extent tool should be disabled and the AOI tool should be enabled.

image

lbross commented 7 years ago

Do you want me to fix this prior to 8/31? The logic to control these buttons is complicated and I am not surprised there is a bug. But it shouldn't take long to fix.

jdduh commented 7 years ago

Yes, please fix it ASAP and make it into the BAGIS V3.1.

Let me try to recap the logic (the dashes are for indentation):

If a folder is not a BASIN: then enable SET DEM EXT tool, disable all the other AOI tools Else: -----If the folder is a BASIN (with DEM) without any AOI, then prompt for reclipping DEM ----------If reclipping is Yes, then enable SET DEM EXT tool and disable all the other AOI tools ----------Else, disable the other BASIN tools and enable the AOI tool -----Else (that is, the folder is a BASIN with at least one AOI), then disable the other BASIN tools and enable the AOI tool

lbross commented 7 years ago

This is fixed. The problem was nowhere near where I expected to find it. If you look at the current version, you'll note that when you select an AOI as a basin, BAGIS fails to identify it as an AOI folder. This was due to an incorrect file name in the code for the dem that is checked when validating that it is an AOI. I fixed this so that BAGIS could properly identify the folder as an AOI and all the buttons appear to be working as desired. Holding off on posting a new add-in for v3.1 until I hear from you.