Save Pathfinding result to file.

Load result for render.
This commit is contained in:
2023-04-13 19:18:25 +02:00
parent 08ebc9a26b
commit 055a751c9d
8 changed files with 123 additions and 50 deletions

View File

@ -1,6 +1,7 @@
using OSMDatastructure;
using OSMDatastructure.Graph;
using Pathfinding;
using RenderPath;
namespace Server;
@ -17,10 +18,13 @@ public class Server
//RegionConverter.ConvertXMLToRegions("D:/map.osm", "D:/map");
//RegionConverter.ConvertXMLToRegions("D:/germany-latest.osm", "D:/germany-latest");
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,
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,
0);
Renderer.DrawGraph(result.name);
}
}