From 82d2de1537cae7884783eaeddf3d51e245d27ee4 Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 1 Apr 2023 14:43:22 +0200 Subject: [PATCH] working --- Server/Server.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Server/Server.cs b/Server/Server.cs index 9cb5c7a..9453498 100644 --- a/Server/Server.cs +++ b/Server/Server.cs @@ -1,5 +1,6 @@ using OSMDatastructure; using OSMDatastructure.Graph; +using Pathfinding; namespace Server; @@ -13,15 +14,13 @@ public class Server Console.SetError(newConsole); //RegionConverter.ConvertXMLToRegions("D:/stuttgart-regbez-latest.osm", "D:/stuttgart-regbez-latest"); - RegionConverter.ConvertXMLToRegions("D:/map.osm", "D:/map"); + //RegionConverter.ConvertXMLToRegions("D:/map.osm", "D:/map"); Console.WriteLine("Loaded"); - Region? r = Region.FromFile("D:/map/13870001898000.region"); - Console.WriteLine("loaded region"); - /* - Coordinates start = new Coordinates(48.243351f, 11.640417f); - Coordinates finish = new Coordinates(48.25239f, 11.53272f); - OsmNode[] path = Pathfinder.CustomAStar("/home/glax/Downloads/oberbayern-latest", start, finish, OsmEdge.speedType.car).ToArray(); + + Coordinates start = new Coordinates(48.7933989f, 9.8301467f); + Coordinates finish = new Coordinates(48.7906258f, 9.8355983f); + OsmNode[] path = Pathfinder.CustomAStar("D:/map", start, finish, Tag.SpeedType.pedestrian).ToArray(); Console.WriteLine("{0}\n", path[0].ToString()); for (int i = 0; i < path.Length - 1; i++) { @@ -33,6 +32,6 @@ public class Server else Console.WriteLine("NO EDGE\n{0}", n2.ToString()); } - Console.WriteLine();*/ + Console.WriteLine(); } } \ No newline at end of file