This commit is contained in:
C9Glax 2022-05-05 16:02:49 +02:00
parent f30cef46c9
commit 29eef71d4a
2 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,8 @@ namespace astar
public Astar() public Astar()
{ {
this.logger = new Logger(LogType.Console, loglevel.DEBUG); this.logger = new Logger(LogType.Console, loglevel.DEBUG);
Importer.Import(logger); Dictionary<UInt64, Node> nodes = Importer.Import(logger);
} }
} }
} }

View File

@ -5,7 +5,7 @@ namespace astar
{ {
public class Importer public class Importer
{ {
public static void Import(Logger logger) public static Dictionary<UInt64, Node> Import(Logger logger)
{ {
XmlReader reader = XmlReader.Create(new MemoryStream(osm_data.map)); XmlReader reader = XmlReader.Create(new MemoryStream(osm_data.map));
reader.MoveToContent(); reader.MoveToContent();
@ -84,6 +84,7 @@ namespace astar
} }
logger.log(loglevel.INFO, "Loaded. Nodes: {0}", nodes.Count); logger.log(loglevel.INFO, "Loaded. Nodes: {0}", nodes.Count);
return nodes;
} }
internal static void ImportWay(Way way) internal static void ImportWay(Way way)