Adjusted to new Functions and return values.
Now renders complete result with path and all loaded regions.
This commit is contained in:
parent
bfb117164e
commit
619cad61ee
@ -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<Image, Renderer.Bounds> area = Renderer.DrawArea(result.regionManager);
|
||||
|
||||
Renderer.DrawGraph(result.name);
|
||||
Console.WriteLine("Drawing route");
|
||||
Renderer.DrawGraph(result.name, area.Item1, area.Item2);
|
||||
}
|
||||
}
|
@ -13,6 +13,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
||||
<PackageReference Include="System.Runtime.Serialization.Json" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user