From 619cad61eed86e84b1cf7ca5637758e0a90289d3 Mon Sep 17 00:00:00 2001 From: glax Date: Wed, 19 Apr 2023 22:55:49 +0200 Subject: [PATCH] Adjusted to new Functions and return values. Now renders complete result with path and all loaded regions. --- Server/Server.cs | 13 +++++++++---- Server/Server.csproj | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Server/Server.cs b/Server/Server.cs index c542bbe..d3dfcce 100644 --- a/Server/Server.cs +++ b/Server/Server.cs @@ -1,3 +1,4 @@ +using System.Drawing; using OSMDatastructure; using OSMDatastructure.Graph; using Pathfinding; @@ -19,12 +20,16 @@ public class Server //RegionConverter.ConvertXMLToRegions("D:/germany-latest.osm", "D:/germany-latest"); - Coordinates start = new Coordinates( 48.7933798f, 9.8275859f); - Coordinates finish = new Coordinates( 48.795918f, 9.021618f); + Coordinates start = new Coordinates(48.7933798f, 9.8275859f); + Coordinates finish = new Coordinates(48.795918f, 9.021618f); PathResult result = Pathfinder.AStar("D:/stuttgart-regbez-latest", start, - finish, Tag.SpeedType.car, 0.1, 0.2, + finish, Tag.SpeedType.car, 0.01, 0.0001, 0); + + Console.WriteLine("Drawing area"); + ValueTuple area = Renderer.DrawArea(result.regionManager); - Renderer.DrawGraph(result.name); + Console.WriteLine("Drawing route"); + Renderer.DrawGraph(result.name, area.Item1, area.Item2); } } \ No newline at end of file diff --git a/Server/Server.csproj b/Server/Server.csproj index 1fa3be0..4f40e19 100644 --- a/Server/Server.csproj +++ b/Server/Server.csproj @@ -13,6 +13,7 @@ +