Added visualization to confirm paths
This commit is contained in:
@ -13,21 +13,15 @@ public class Server
|
||||
Console.SetOut(newConsole);
|
||||
Console.SetError(newConsole);
|
||||
|
||||
RegionConverter.ConvertXMLToRegions("D:/stuttgart-regbez-latest.osm", "D:/stuttgart-regbez-latest");
|
||||
//RegionConverter.ConvertXMLToRegions("D:/stuttgart-regbez-latest.osm", "D:/stuttgart-regbez-latest");
|
||||
//RegionConverter.ConvertXMLToRegions("D:/map.osm", "D:/map");
|
||||
//RegionConverter.ConvertXMLToRegions("D:/germany-latest.osm", "D:/germany-latest");
|
||||
|
||||
/*
|
||||
Coordinates start = new Coordinates(48.794567f, 9.820625f);
|
||||
Coordinates finish = new Coordinates(48.79593f, 9.824013f);
|
||||
DateTime startTime = DateTime.Now;
|
||||
OsmNode[] path = Pathfinder.CustomAStar("D:/map", start, finish, Tag.SpeedType.car).ToArray();
|
||||
TimeSpan duration = DateTime.Now - startTime;
|
||||
Console.WriteLine($"Took {duration.TotalMilliseconds}ms ({duration:g})");
|
||||
for (int i = 0; i < path.Length - 1; i++)
|
||||
{
|
||||
Console.WriteLine(path[i]);
|
||||
}
|
||||
Console.WriteLine();*/
|
||||
|
||||
Coordinates start = new Coordinates( 48.7933798f, 9.8275859f);
|
||||
Coordinates finish = new Coordinates( 48.8407632f, 10.0676979f);
|
||||
List<PathNode> result = Pathfinder.AStar("D:/stuttgart-regbez-latest", start,
|
||||
finish, Tag.SpeedType.car, 20, 2,
|
||||
0);
|
||||
RenderPath.Renderer.DrawFromPath(result);
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Pathfinding\Pathfinding.csproj" />
|
||||
<ProjectReference Include="..\RenderPath\RenderPath.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
Reference in New Issue
Block a user