Render result to png after every routing
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using OSMDatastructure;
|
||||
using OSMDatastructure.Graph;
|
||||
using RenderPath;
|
||||
using static OSMDatastructure.Tag;
|
||||
using WayType = OSMDatastructure.Tag.WayType;
|
||||
|
||||
@ -28,7 +29,14 @@ public static class Pathfinder
|
||||
{
|
||||
OsmNode currentNode = openSetfScore.Dequeue();
|
||||
if (currentNode.Equals(goalNode))
|
||||
return GetPath(cameFromDict, goalNode, regionManager);
|
||||
{
|
||||
List<PathNode> path = GetPath(cameFromDict, goalNode, regionManager);
|
||||
List<Coordinates> coords = new();
|
||||
foreach(PathNode pn in path)
|
||||
coords.Add(pn.coordinates);
|
||||
Renderer.DrawLoadedNodes(gScore, coords, workingDir);
|
||||
return path;
|
||||
}
|
||||
|
||||
foreach (OsmEdge edge in currentNode.edges)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OSMDatastructure\OSMDatastructure.csproj" />
|
||||
<ProjectReference Include="..\RenderPath\RenderPath.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Reference in New Issue
Block a user