Skip to content

Commit

Permalink
issue #55: Fix headings for annual fire statistics fields; Re-impleme…
Browse files Browse the repository at this point in the history
…nt selective end date for annual processing
  • Loading branch information
lbross committed Oct 28, 2024
1 parent 565cece commit ceb9323
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions bagis-pro/DockAdminToolsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
using ArcGIS.Desktop.Core.Geoprocessing;
using System.Diagnostics;
using bagis_pro.BA_Objects;
using Newtonsoft.Json.Linq;
using PdfSharp.Pdf.Content.Objects;
using Microsoft.VisualBasic.Devices;

namespace bagis_pro
{
Expand Down Expand Up @@ -2295,7 +2292,7 @@ private async void RunFireReportImplAsync(object param)
}
if (bAnnualStatistics)
{
for (int i = overrideMinYear; i <= ReportEndYear; i++)
for (int i = overrideMinYear; i <= SelectedMaxYear; i++)
{
IList<string> lstAnnualElements = await AnalysisTools.GenerateAnnualFireStatisticsList(oAoi, _strFireReportLogFile,
aoiAreaSqMeters, cellSizeSqMeters, i);
Expand Down Expand Up @@ -2363,15 +2360,17 @@ private async void RunFireReportImplAsync(object param)
string separator = ",";
if (bAnnualStatistics)
{
for (int i = overrideMinYear; i <= ReportEndYear; i++)
for (int i = overrideMinYear; i <= SelectedMaxYear; i++)
{
output.Clear();
string strYear = Convert.ToString(i);
string strYearPrefix = $@"YY{strYear.Substring(strYear.Length - 2)}_";
// Structures to manage data
strCsvFile = $@"{Path.GetDirectoryName(_strFireReportLogFile)}\{i}_annual_statistics.csv";
String[] headings = { "stationTriplet", "stationName", $@"newfireno_{i}", $@"nifc_burnedArea_SqMiles_{i}",
$@"nifc_burnedArea_pct_{i}", $@"mtbs_burnedArea_pct_{i}", $@"burnedForestedArea_SqMiles_{i}",
$@"burnedForestedArea_pct_{i}",$@"lowburnedSeverityArea_SqMiles_{i}", $@"lowburnedSeverityArea_pct_{i}",
$@"mediumburnedSeverityArea_SqMiles_{i}", $@"mediumburnedSeverityArea_pct_{i}",$@"highburnedSeverityArea_SqMiles_{i}", $@"highburnedSeverityArea_pct_{i}" };
String[] headings = { "stationTriplet", "stationName", $@"{strYearPrefix}newfireno", $@"{strYearPrefix}nifc_burnedArea_SqMiles",
$@"{strYearPrefix}nifc_burnedArea_pct", $@"{strYearPrefix}mtbs_burnedArea_pct", $@"{strYearPrefix}burnedForestedArea_SqMiles",
$@"{strYearPrefix}burnedForestedArea_pct",$@"{strYearPrefix}lowburnedSeverityArea_SqMiles", $@"{strYearPrefix}lowburnedSeverityArea_pct",
$@"{strYearPrefix}mediumburnedSeverityArea_SqMiles", $@"{strYearPrefix}mediumburnedSeverityArea_pct",$@"{strYearPrefix}highburnedSeverityArea_SqMiles", $@"{strYearPrefix}highburnedSeverityArea_pct" };
output.AppendLine(string.Join(separator, headings));

if (dictOutput.ContainsKey(i.ToString()))
Expand Down

0 comments on commit ceb9323

Please sign in to comment.