Skip to content

Commit

Permalink
issue #40: Use sites buffer distance instead of prism buffer distance…
Browse files Browse the repository at this point in the history
… when regenerating surfaces layers, if needed, because sites are outside of AOI. issue #43: Continue work on NotReady status
  • Loading branch information
lbross committed Jul 11, 2023
1 parent 0431226 commit 9b434c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions bagis-pro/AnalysisTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4968,10 +4968,10 @@ public static async Task<BA_ReturnCode> ReclipSurfacesAsync(string aoiFolderPath
string clipEnvelope = "";
string strOutputFeatures = GeodatabaseTools.GetGeodatabasePath(aoiFolderPath, GeodatabaseNames.Analysis, true) +
"tmpBuffer";
string strDistance = "1 Kilometers";
if (Module1.Current.BatchToolSettings.PrecipBufferDistance != null)
string strDistance = "5 Kilometers";
if (Module1.Current.BatchToolSettings.SnotelBufferDistance != null)
{
strDistance = (string)Module1.Current.BatchToolSettings.PrecipBufferDistance + " " +
strDistance = (string)Module1.Current.BatchToolSettings.SnotelBufferDistance + " " +
(string)Module1.Current.BatchToolSettings.PrecipBufferUnits;
}

Expand Down
17 changes: 11 additions & 6 deletions bagis-pro/DockAdminToolsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -714,15 +714,20 @@ private async void RunImplAsync(object param)
// Make sure that maps and maps_publish folders exist
for (int idxRow = 0; idxRow < Names.Count; idxRow++)
{
if (Names[idxRow].AoiBatchStateText.Equals(AoiBatchState.NotReady.ToString()))
{

}
else if (Names[idxRow].AoiBatchIsSelected)
if (Names[idxRow].AoiBatchIsSelected)
{
int errorCount = 0; // keep track of any non-fatal errors
string aoiFolder = Names[idxRow].FilePath;
Names[idxRow].AoiBatchStateText = AoiBatchState.Started.ToString(); // update gui
if (Names[idxRow].AoiBatchStateText.Equals(AoiBatchState.NotReady.ToString()))
{
strLogEntry = $@"Skipping report for {Names[idxRow].FilePath}. Required station information is missing.{System.Environment.NewLine}";
File.AppendAllText(_strLogFile, strLogEntry);
continue;
}
else
{
Names[idxRow].AoiBatchStateText = AoiBatchState.Started.ToString(); // update gui
}
string[] arrFolders = { aoiFolder + "\\" + Constants.FOLDER_MAPS, aoiFolder + "\\" + Constants.FOLDER_MAP_PACKAGE,
aoiFolder + "\\" + Constants.FOLDER_LOGS};
foreach (var directory in arrFolders)
Expand Down

0 comments on commit 9b434c7

Please sign in to comment.