PSU-CSAR / vb-bagis

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

Options - Generate AOI Only: BA_GetDatumString Exception error #20

Closed jdduh closed 7 years ago

jdduh commented 8 years ago

When users checked the Generate AOI Only checkbox on the BAGIS Settings (Options) dialog window, it caused an error message in later steps. For some, the error occurred during the BASIN creation step. I got the error message when I tried to save the settings (on ArcGIS 10.4.1). It seems BAGIS tries to verify the data sources on the null strings.

image

jdduh commented 8 years ago

More images.

image

lbross commented 8 years ago

Do we want to include the snotel, snow course, and prism layers in the missing layers message if generate aoi only is selected? missingdata

jdduh commented 8 years ago

No.

lbross commented 8 years ago

This is fixed on the settings form (loading and saving). I did not get an error when creating a BASIN with these layers missing. This will be in the next BAGIS V3 release.

jdduh commented 7 years ago

Still get this warning message when the "Generate AOI Only" checkbox is selected. Does BAGIS's definition file contain a flag for this setting? If yes, then BAGIS shouldn't generate this warning message.

image

jdduh commented 7 years ago

I confirm that the original bug is fixed.

lbross commented 7 years ago

This is a comment in the code: "the definition file doesn't contain information on Generate AOI Only option, but sets it to true when SNOTEL, Snow Course, or PRISM data is missing."

We could add this but would mean updating the version of the BAGIS settings file. Currently at "Basin Analysis GIS Ver 2.0 11/30/2012". I know there is code in the add-in to handle version upgrades but don't know how invasive/annoying it is to the user.

I noticed that following the message above, we also show the message with the list of missing layers. Is this desired?

jdduh commented 7 years ago

How about changing the message to "The Generate AOI Only option is turned on for BAGIS because the sources for precipitation, SNOTEL, and snow course data are not specified."?

lbross commented 7 years ago

It's easy to change the message. Do you still want the second messagebox with the list of all the missing layers that pops up after the 'Generate AOI Only one? So 2 messages will pop up in succession.

jdduh commented 7 years ago

The Generate AOI Only is activated when PRISM, SNOTEL, AND Snow Course data are missing. BAGIS is designed to prohibit users from saving the definition file when any of the three data sources is not specified. Can we differentiate "data are not specified" from "data are missing"? This will require the separation of the data source checking routine into two parts: one checks for the AOI creation data sources (i.e., DEM, Gauge Stations, and other participating layers) and the other checks for the layers used only in Basin Analysis (i.e., SNOTEL, Snow Course, and Preceipiation). I prefer users only get one warning message instead of multiple notifications.

Here are the ideal ways of handling the conditions after BAGIS checked the SNOTEL, Snow Course, and Precipitation data:

"Data are not specified" The definition file contains null strings for SNOTEL, Snow Courses, and Precipitation. When this happens, users get only one message notification, saying "The Generate AOI Only option is turned on for BAGIS because the sources for precipitation, SNOTEL, and snow course data are not specified." This message should be "merged" with the message created by the routine that checks the other layers (i.e., DEM, Gauge Stations, and other participating layers).

"Data are missing" The definition file contains valid strings for SNOTEL, Snow Courses, and Precipitation, but the source data cannot be located. When this happens, users will get one message notification, saying "The Generate AOI Only option is turned on for BAGIS because at least one of the required sources is missing. SNOTEL (and/or Snow Course and/or PRISM) data missing: ...." Again, this message should be merged with the message created by the routine that checks the other layers (i.e., DEM, Gauge Stations, and other participating layers).

lbross commented 7 years ago

The messages have been updated and merged per your request. This will be in the next version of BAGIS v3.