This commit is contained in:
glax 2023-04-01 14:43:22 +02:00
parent 01deb02666
commit 82d2de1537

View File

@ -1,5 +1,6 @@
using OSMDatastructure;
using OSMDatastructure.Graph;
using Pathfinding;
namespace Server;
@ -13,15 +14,13 @@ public class Server
Console.SetError(newConsole);
//RegionConverter.ConvertXMLToRegions("D:/stuttgart-regbez-latest.osm", "D:/stuttgart-regbez-latest");
RegionConverter.ConvertXMLToRegions("D:/map.osm", "D:/map");
//RegionConverter.ConvertXMLToRegions("D:/map.osm", "D:/map");
Console.WriteLine("Loaded");
Region? r = Region.FromFile("D:/map/13870001898000.region");
Console.WriteLine("loaded region");
/*
Coordinates start = new Coordinates(48.243351f, 11.640417f);
Coordinates finish = new Coordinates(48.25239f, 11.53272f);
OsmNode[] path = Pathfinder.CustomAStar("/home/glax/Downloads/oberbayern-latest", start, finish, OsmEdge.speedType.car).ToArray();
Coordinates start = new Coordinates(48.7933989f, 9.8301467f);
Coordinates finish = new Coordinates(48.7906258f, 9.8355983f);
OsmNode[] path = Pathfinder.CustomAStar("D:/map", start, finish, Tag.SpeedType.pedestrian).ToArray();
Console.WriteLine("{0}\n", path[0].ToString());
for (int i = 0; i < path.Length - 1; i++)
{
@ -33,6 +32,6 @@ public class Server
else
Console.WriteLine("NO EDGE\n{0}", n2.ToString());
}
Console.WriteLine();*/
Console.WriteLine();
}
}