PSU-CSAR / bagis-pro

BAGIS for ArcGIS Pro
4 stars 1 forks source link

Batch Tools - Elevation Zone Failed #46

Closed jdduh closed 1 year ago

jdduh commented 1 year ago

This is for 2.X addin. I will provide additional information when I get a chance to replicate the error, but in short the batch tools failed. The stationTriplet is 10166605:UT:USGS. The pourpoint of this AOI is 1.5 miles away from the forecast station. I had to manually update the stationTriplet and stationName values.

Here are some data from the logfile.

From the log file (2023-04-25_logfile.txt) in the AOI log folder

2023-04-25 19:41:18.3322 ERROR RunImplAsync: at bagis_pro.MapTools.<>cDisplayClass41_0.<b__0>d.MoveNext() in C:\workspace\bagis-pro\bagis-pro\MapTools.cs:line 2970 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at bagis_pro.MapTools.d41.MoveNext() in C:\workspace\bagis-pro\bagis-pro\MapTools.cs:line 2869 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at bagis_pro.MapTools.<DisplayMaps>d__5.MoveNext() in C:\workspace\bagis-pro\bagis-pro\MapTools.cs:line 338 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at bagis_pro.DockBatchToolsViewModel.d__79.MoveNext() in C:\workspace\bagis-pro\bagis-pro\DockBatchToolsViewModel.cs:line 747

Then I tries to use the Load Maps interactive UI to see the layers and got this error message. image

So I used the interactive UI to Generate Analysis Layers and got this. image

Followed by this. image

At that time, the Generate Analysis Layers dialog window looked like this: image

And the geoprocessor history had this:

Reclassify

Parameters

Input raster E:\NWCC\Missing_AOIs_2023\New_AOIs_2023\SaltLake_UtahLake_Basin_Hydrocon\10166605_UT_USGS_04252023\surfaces.gdb\dem_clipped Reclass field VALUE Reclassification 1372.264464 1524 1;1524 1676.400000 2;1676.400000 1828.800000 3;1828.800000 1981.200000 4;1981.200000 2133.600000 5;2133.600000 2286 6;2286 2438.400000 7;2438.400000 2590.800000 8;2590.800000 2743.200000 9;2743.200000 2895.600000 10;2895.600000 3048 11;3048 3200.400000 12;3200.400000 3352.800000 13;3352.800000 3505.200000 14;3505.200000 3635.718408 15 Output raster E:\NWCC\Missing_AOIs_2023\New_AOIs_2023\SaltLake_UtahLake_Basin_Hydrocon\10166605_UT_USGS_04252023\analysis.gdb\elevzone Change missing values to NoData DATA

Environments

Snap Raster E:\NWCC\Missing_AOIs_2023\New_AOIs_2023\SaltLake_UtahLake_Basin_Hydrocon\10166605_UT_USGS_04252023\surfaces.gdb\dem_filled Mask E:\NWCC\Missing_AOIs_2023\New_AOIs_2023\SaltLake_UtahLake_Basin_Hydrocon\10166605_UT_USGS_04252023\aoi.gdb\aoib_v Current Workspace E:\NWCC\Missing_AOIs_2023\New_AOIs_2023\SaltLake_UtahLake_Basin_Hydrocon\10166605_UT_USGS_04252023

Messages

Start Time: Tuesday, April 25, 2023 10:40:23 PM ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds. Failed to execute (Reclassify). Failed at Tuesday, April 25, 2023 10:40:25 PM (Elapsed Time: 2.11 seconds)

jdduh commented 1 year ago

The program ended with the dialog window looked like this with the error message in the log file.

image

2023-04-25 23:41:22.2941 DEBUG CalculateZonesAsync: New fields added 2023-04-25 23:41:23.9806 ERROR GenerateWinterPrecipitationLayerAsync: Missing start or end month from aoi master feature service. Unable to generate winter precipitation layer!

lbross commented 1 year ago

Can you post this AOI to basins? I need to try to replicate the error on the current 2.x codeline. I'm not 100% sure how the AddIn you are using might work with the changes/assumptions we have made for 3.x. I believe the addIn you are currently using is still trying to automatically set the stationTriplet based on the Forecast feature service so it probably overwrote your changes. Another option would be to try using the new 3.x AddIn that I will hopefully post sometime today.

jdduh commented 1 year ago

Here it is. 465MB ftp://bagis.geog.pdx.edu/BAGIS/BAGIS_aois/10166605_UT_USGS_04252023.zip

jdduh commented 1 year ago

FYI. I am working on a solution to make all AOIs available over a network drive and will keep you posted when that becomes available.

lbross commented 1 year ago

I have a potential fix for this ready to go. I copied the changes to the SetAoi method from the 3.x to the 2.x version. This should work better if the pourpoint is not found in the forecast list. Unfortunately I have run into another bug that may be related to 2.9.x. We download the Page Layouts from AGOL and save them in the BAGIS folder. In my case this is C:\Users\lbross\AppData\Roaming\BAGIS. Then we use the Pro API to retrieve the layout from that folder and add it to the project so that we can display the multi pane map. Since upgrading to 2.9.x, this fails on my computer with this error message: image

Windows sees the file in the AppData folder fine but Pro does not. I don't know if you have noticed, but the file browsing capabilities of Pro don't "see" the AppData folder. You can try ArcCatalog or adding a layout to the project through the menu. Using the C# code to add the layout to the project has worked until now.

I tested on CS3 to see if maybe it had something to do with Michael installing Pro instead of me. Interestingly, it was able to load the maps with a layout file from December 2022. I deleted that file to pick up a more recent version from AGOL and now I'm getting the same error on CS3 as on my laptop. I can see the file where it should be, Windows IO libraries can see it, but Pro cannot import it.

Not sure where we should go from here? Do you want me to post what I have and you can do some testing?

lbross commented 1 year ago

I had an idea about this on my walk. I updated the snodas layout on v3.1 and was trying to use this layout on v2.8. I just tested updating the version and build in the .pagx file to match what was on the other .pagx files that were created under v2.8. Initial tests indicate that seems to work. After I confirm this, I need to test if v3.1 can use the older .pagx file. If it can't, we will need to keep 2 versions on AGOL and update the code to know how to use them. Currently the snodas layout on AGOL is for 3.1 so you will run into this problem if a 2.9.x computer downloads and tries to use the newer layout.

lbross commented 1 year ago

Pro 3.1 is able to use the .pagx file generated from 2.8. The snodas layout for AGOL should now work for both versions.

lbross commented 1 year ago

Is this still a problem? I wonder if we should close this because it is related to v2.9?