Skip to content

Commit

Permalink
Merge pull request #129 from Nikolai558/development
Browse files Browse the repository at this point in the history
Releasing 2.5.0
  • Loading branch information
Nikolai558 authored Feb 20, 2023
2 parents 02f7574 + 7d0f398 commit 75df6d1
Show file tree
Hide file tree
Showing 16 changed files with 1,500 additions and 70 deletions.
16 changes: 16 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# CHANGELOG

---
- ## Version 2.5.0
- Added feature: SCT2 to GeoJson
- Data from the following headers will be included
with the conversion:
- ARTCC
- ARTCC HIGH
- ARTCC LOW
- SID
- STAR
- LOW AIRWAY
- HIGH AIRWAY
- GEO
- REGIONS
- LABELS
- Each individual SID and STAR diagram will be output to a GeoJson file.

- ## Version 2.4.2
- BUG FIX #127: Missing Lines when vERAM to Geojson
conversions using the filter and properties option.
Expand Down
1 change: 1 addition & 0 deletions FeBuddyLibrary/Dat/DatConversion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static void ReadDAT(string datFilepath, string outputDirectory, double di
};

StringBuilder sb = new StringBuilder();
sb.AppendLine("[SID]");

sb.AppendLine($"{outputDirectory.Split('\\')[^1].PadRight(26, ' ')}N000.00.00.000 W000.00.00.000 N000.00.00.000 W000.00.00.000");

Expand Down
370 changes: 360 additions & 10 deletions FeBuddyLibrary/DataAccess/GeoJson.cs

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions FeBuddyLibrary/Dxf/Data/DataFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -870,10 +870,15 @@ private List<SctAirportModel> GetSctAirports(string[] vs)
return results;
}

private SctInfoModel GetSctInfo(string[] vs)
private SctInfoModel? GetSctInfo(string[] vs)
{
Logger.LogMessage("INFO", "GETTING SCT INFO in SCT FILE");

if (vs.Count() == 0)
{
return new SctInfoModel();
}

SctInfoModel result = new SctInfoModel()
{
Header = vs[0],
Expand All @@ -894,7 +899,7 @@ private SctInfoModel GetSctInfo(string[] vs)
return result;
}

private List<SctColorModel> GetSctColors(string[] SctColorSection)
private List<SctColorModel>? GetSctColors(string[] SctColorSection)
{
Logger.LogMessage("INFO", "GETTING COLORS IN SCT FILE");

Expand Down
6 changes: 4 additions & 2 deletions FeBuddyLibrary/Dxf/Models/SctArtccModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
namespace FeBuddyLibrary.Dxf.Models
using FeBuddyLibrary.DataAccess;

namespace FeBuddyLibrary.Dxf.Models
{
public class SctArtccModel
public class SctArtccModel : IStartEndLat
{
public string Name { get; set; }
public string StartLat { get; set; }
Expand Down
34 changes: 17 additions & 17 deletions FeBuddyLibrary/Dxf/Models/SctFileModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ namespace FeBuddyLibrary.Dxf.Models
{
public class SctFileModel
{
public List<SctColorModel> SctFileColors { get; set; } // Example: #define Building 723723
public SctInfoModel SctInfoSection { get; set; } // Contains ENTIRE Info section, .Allinfo returns everything needed for the [INFO] section
public List<VORNDBModel> SctVORSection { get; set; } // Contains [VOR] Section, Need to put header before printing out if doing that.
public List<VORNDBModel> SctNDBSection { get; set; } // Contains [NDB] Section, Need to put header before printing out if doing that.
public List<SctAirportModel> SctAirportSection { get; set; } // Contains [AIRPORT] Section, Need to put header before printing out if doing that.
public List<SctRunwayModel> SctRunwaySection { get; set; } // Contains [RUNWAY] Section, Need to put header before printing out if doing that.
public List<SctFixesModel> SctFixesSection { get; set; } // Contains [FIXES] Section, Need to put header before printing out if doing that.
public List<SctArtccModel> SctArtccSection { get; set; } // Contains [ARTCC] Section, Need to put header before printing out if doing that.
public List<SctArtccModel> SctArtccHighSection { get; set; } // Contains [ARTCC HIGH] Section, Need to put header before printing out if doing that.
public List<SctArtccModel> SctArtccLowSection { get; set; } // Contains [ARTCC LOW] Section, Need to put header before printing out if doing that.
public List<SctSidStarModel> SctSidSection { get; set; } // Contains [SID] Section, Need to put header before printing out if doing that.
public List<SctSidStarModel> SctStarSection { get; set; } // Contains [STAR] Section, Need to put header before printing out if doing that.
public List<SctArtccModel> SctLowAirwaySection { get; set; } // Contains [LOW AIRWAY] Section, Need to put header before printing out if doing that.
public List<SctArtccModel> SctHighAirwaySection { get; set; } // Contains [HGIH AIRWAY] Section, Need to put header before printing out if doing that.
public List<SctGeoModel> SctGeoSection { get; set; } // Contains [GEO] Section, Need to put header before printing out if doing that.
public List<SctRegionModel> SctRegionsSection { get; set; } // Contains [REGIONS] Section, Need to put header before printing out if doing that.
public List<SctLabelModel> SctLabelSection { get; set; } // Contains [LABELS] Section, Need to put header before printing out if doing that.
public List<SctColorModel>? SctFileColors { get; set; } // Example: #define Building 723723
public SctInfoModel? SctInfoSection { get; set; } // Contains ENTIRE Info section, .Allinfo returns everything needed for the [INFO] section
public List<VORNDBModel>? SctVORSection { get; set; } // Contains [VOR] Section, Need to put header before printing out if doing that.
public List<VORNDBModel>? SctNDBSection { get; set; } // Contains [NDB] Section, Need to put header before printing out if doing that.
public List<SctAirportModel>? SctAirportSection { get; set; } // Contains [AIRPORT] Section, Need to put header before printing out if doing that.
public List<SctRunwayModel>? SctRunwaySection { get; set; } // Contains [RUNWAY] Section, Need to put header before printing out if doing that.
public List<SctFixesModel>? SctFixesSection { get; set; } // Contains [FIXES] Section, Need to put header before printing out if doing that.
public List<SctArtccModel>? SctArtccSection { get; set; } // Contains [ARTCC] Section, Need to put header before printing out if doing that.
public List<SctArtccModel>? SctArtccHighSection { get; set; } // Contains [ARTCC HIGH] Section, Need to put header before printing out if doing that.
public List<SctArtccModel>? SctArtccLowSection { get; set; } // Contains [ARTCC LOW] Section, Need to put header before printing out if doing that.
public List<SctSidStarModel>? SctSidSection { get; set; } // Contains [SID] Section, Need to put header before printing out if doing that.
public List<SctSidStarModel>? SctStarSection { get; set; } // Contains [STAR] Section, Need to put header before printing out if doing that.
public List<SctArtccModel>? SctLowAirwaySection { get; set; } // Contains [LOW AIRWAY] Section, Need to put header before printing out if doing that.
public List<SctArtccModel>? SctHighAirwaySection { get; set; } // Contains [HGIH AIRWAY] Section, Need to put header before printing out if doing that.
public List<SctGeoModel>? SctGeoSection { get; set; } // Contains [GEO] Section, Need to put header before printing out if doing that.
public List<SctRegionModel>? SctRegionsSection { get; set; } // Contains [REGIONS] Section, Need to put header before printing out if doing that.
public List<SctLabelModel>? SctLabelSection { get; set; } // Contains [LABELS] Section, Need to put header before printing out if doing that.


public string GetSection<T>(List<T> sctObjects)
Expand Down
6 changes: 4 additions & 2 deletions FeBuddyLibrary/Dxf/Models/SctGeoModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
namespace FeBuddyLibrary.Dxf.Models
using FeBuddyLibrary.DataAccess;

namespace FeBuddyLibrary.Dxf.Models
{
public class SctGeoModel
public class SctGeoModel: IStartEndLat
{
public string StartLat { get; set; }
public string StartLon { get; set; }
Expand Down
5 changes: 4 additions & 1 deletion FeBuddyWinFormUI/FeBuddyWinFormUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<AssemblyName>FE-BUDDY</AssemblyName>
<Version>2.4.2</Version>
<Version>2.5.0</Version>
<Copyright>Copyright © 2023 Nikolas Boling, Kyle Sanders</Copyright>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>FE_BUDDY_icon.ico</ApplicationIcon>
Expand Down Expand Up @@ -38,6 +38,9 @@
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Update="WinForms\SctToGeojsonForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="WinForms\GeoJsonFrom.cs">
<SubType>Form</SubType>
</Compile>
Expand Down
7 changes: 7 additions & 0 deletions FeBuddyWinFormUI/WinForms/LandingForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,13 @@ private void landingStartButton_Click(object sender, EventArgs e)
geojsonForm.Show();
this.Hide();
}
else if (SctToGeoRadioButton.Checked)
{
var sctToGeoForm = new SctToGeojsonForm(_currentVersion);
sctToGeoForm.FormClosing += (s, args) => this.Show();
sctToGeoForm.Show();
this.Hide();
}
else
{
MessageBox.Show("This feature has not been implemented yet.");
Expand Down
Loading

0 comments on commit 75df6d1

Please sign in to comment.