Refactored Graph and Importer into separate projects
This commit is contained in:
parent
29eef71d4a
commit
e3fd034590
@ -1,4 +1,4 @@
|
|||||||
namespace astar
|
namespace Graph
|
||||||
{
|
{
|
||||||
public struct Edge
|
public struct Edge
|
||||||
{
|
{
|
14
Graph/Graph.csproj
Normal file
14
Graph/Graph.csproj
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Logging\Logging.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -1,4 +1,4 @@
|
|||||||
namespace astar
|
namespace Graph
|
||||||
{
|
{
|
||||||
public struct Node
|
public struct Node
|
||||||
{
|
{
|
@ -1,13 +1,14 @@
|
|||||||
using Logging;
|
using Logging;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using Graph;
|
||||||
|
|
||||||
namespace astar
|
namespace OpenStreetMap_Importer
|
||||||
{
|
{
|
||||||
public class Importer
|
public class Importer
|
||||||
{
|
{
|
||||||
public static Dictionary<UInt64, Node> Import(Logger logger)
|
public static Dictionary<UInt64, Node> Import(Logger logger)
|
||||||
{
|
{
|
||||||
XmlReader reader = XmlReader.Create(new MemoryStream(osm_data.map));
|
XmlReader reader = XmlReader.Create(new MemoryStream(OSM_Data.map));
|
||||||
reader.MoveToContent();
|
reader.MoveToContent();
|
||||||
Dictionary<UInt64, Node> nodes = new Dictionary<UInt64, Node>();
|
Dictionary<UInt64, Node> nodes = new Dictionary<UInt64, Node>();
|
||||||
|
|
@ -8,7 +8,7 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace astar {
|
namespace OpenStreetMap_Importer {
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
||||||
@ -22,14 +22,14 @@ namespace astar {
|
|||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class osm_data {
|
public class OSM_Data {
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
internal osm_data() {
|
internal OSM_Data() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -39,7 +39,7 @@ namespace astar {
|
|||||||
public static global::System.Resources.ResourceManager ResourceManager {
|
public static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("astar.osm-data", typeof(osm_data).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenStreetMap_Importer.OSM-Data", typeof(OSM_Data).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
29
OpenStreetMap Importer/OpenStreetMap Importer.csproj
Normal file
29
OpenStreetMap Importer/OpenStreetMap Importer.csproj
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<RootNamespace>OpenStreetMap_Importer</RootNamespace>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Graph\Graph.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="osm-data.Designer.cs">
|
||||||
|
<DependentUpon>osm-data.resx</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="osm-data.resx">
|
||||||
|
<LastGenOutput>osm-data.Designer.cs</LastGenOutput>
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
|||||||
|
using Logging;
|
||||||
using Logging;
|
using Graph;
|
||||||
|
using OpenStreetMap_Importer;
|
||||||
|
|
||||||
namespace astar
|
namespace astar
|
||||||
{
|
{
|
||||||
|
@ -7,22 +7,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Graph\Graph.csproj" />
|
||||||
<ProjectReference Include="..\Logging\Logging.csproj" />
|
<ProjectReference Include="..\Logging\Logging.csproj" />
|
||||||
</ItemGroup>
|
<ProjectReference Include="..\OpenStreetMap Importer\OpenStreetMap Importer.csproj" />
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Update="osm-data.Designer.cs">
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>osm-data.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Update="osm-data.resx">
|
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>osm-data.Designer.cs</LastGenOutput>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -5,9 +5,13 @@ VisualStudioVersion = 17.1.32421.90
|
|||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "astar", "astar.csproj", "{4B7782F4-DE4B-424D-B46B-E7BC750D0838}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "astar", "astar.csproj", "{4B7782F4-DE4B-424D-B46B-E7BC750D0838}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logging", "..\Logging\Logging.csproj", "{97F58928-BC5A-40C2-AA8A-83A795D85FAA}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Logging", "..\Logging\Logging.csproj", "{97F58928-BC5A-40C2-AA8A-83A795D85FAA}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Executable", "..\Executable\Executable.csproj", "{9B311732-9631-480D-97A3-54823CC27CC8}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Executable", "..\Executable\Executable.csproj", "{9B311732-9631-480D-97A3-54823CC27CC8}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenStreetMap Importer", "..\OpenStreetMap Importer\OpenStreetMap Importer.csproj", "{1E918E64-866F-4386-AA44-AF7120A9294F}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Graph", "..\Graph\Graph.csproj", "{41576467-1FC5-49CE-B5B3-832EEED353DE}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -27,6 +31,14 @@ Global
|
|||||||
{9B311732-9631-480D-97A3-54823CC27CC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{9B311732-9631-480D-97A3-54823CC27CC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{9B311732-9631-480D-97A3-54823CC27CC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{9B311732-9631-480D-97A3-54823CC27CC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{9B311732-9631-480D-97A3-54823CC27CC8}.Release|Any CPU.Build.0 = Release|Any CPU
|
{9B311732-9631-480D-97A3-54823CC27CC8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1E918E64-866F-4386-AA44-AF7120A9294F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1E918E64-866F-4386-AA44-AF7120A9294F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1E918E64-866F-4386-AA44-AF7120A9294F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1E918E64-866F-4386-AA44-AF7120A9294F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{41576467-1FC5-49CE-B5B3-832EEED353DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{41576467-1FC5-49CE-B5B3-832EEED353DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{41576467-1FC5-49CE-B5B3-832EEED353DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{41576467-1FC5-49CE-B5B3-832EEED353DE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
Loading…
Reference in New Issue
Block a user