From ea7ce1f63035db16d3ba58c93c0014bcbc06ac3d Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 9 Apr 2023 17:06:45 +0200 Subject: [PATCH] Changed/Fixed Namespaces --- API/Program.cs | 5 +++-- OSMDatastructure/OsmNode.cs | 1 - OSMDatastructure/Tag.cs | 2 +- OSMDatastructure/TagManager.cs | 3 ++- Pathfinding/Pathfinder_Time.cs | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/API/Program.cs b/API/Program.cs index 19ff529..5a350d4 100644 --- a/API/Program.cs +++ b/API/Program.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using OSMDatastructure; using OSMDatastructure.Graph; using Pathfinding; @@ -24,10 +25,10 @@ app.MapGet("/getRouteDistance", (float latStart, float lonStart, float latEnd, f } ); -app.MapGet("/getRouteTime", (float latStart, float lonStart, float latEnd, float lonEnd) => +app.MapGet("/getRouteTime", (float latStart, float lonStart, float latEnd, float lonEnd, Tag.SpeedType vehicle) => { DateTime startCalc = DateTime.Now; - List result = Pathfinder.AStarTime("D:/stuttgart-regbez-latest", new Coordinates(latStart, lonStart), new Coordinates(latEnd, lonEnd), Tag.SpeedType.car); + List result = Pathfinder.AStarTime("D:/stuttgart-regbez-latest", new Coordinates(latStart, lonStart), new Coordinates(latEnd, lonEnd), vehicle); PathResult pathResult = new PathResult(DateTime.Now - startCalc, result); return pathResult; } diff --git a/OSMDatastructure/OsmNode.cs b/OSMDatastructure/OsmNode.cs index ebf0676..0469330 100644 --- a/OSMDatastructure/OsmNode.cs +++ b/OSMDatastructure/OsmNode.cs @@ -1,4 +1,3 @@ -using System.ComponentModel; using System.Runtime.Serialization; using System.Text.Json.Serialization; diff --git a/OSMDatastructure/Tag.cs b/OSMDatastructure/Tag.cs index 8bf2626..6895c37 100644 --- a/OSMDatastructure/Tag.cs +++ b/OSMDatastructure/Tag.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -namespace OSMDatastructure.Graph; +namespace OSMDatastructure; [Serializable] public class Tag diff --git a/OSMDatastructure/TagManager.cs b/OSMDatastructure/TagManager.cs index 3de7c5b..609828c 100644 --- a/OSMDatastructure/TagManager.cs +++ b/OSMDatastructure/TagManager.cs @@ -1,6 +1,7 @@ using System.Text.Json.Serialization; +using OSMDatastructure.Graph; -namespace OSMDatastructure.Graph; +namespace OSMDatastructure; [Serializable] public class TagManager diff --git a/Pathfinding/Pathfinder_Time.cs b/Pathfinding/Pathfinder_Time.cs index a3bba80..956c0ce 100644 --- a/Pathfinding/Pathfinder_Time.cs +++ b/Pathfinding/Pathfinder_Time.cs @@ -1,3 +1,4 @@ +using OSMDatastructure; using OSMDatastructure.Graph; using Utils = OSMDatastructure.Utils;