diff --git a/OSM_Regions/RegionLoader.cs b/OSM_Regions/RegionLoader.cs index 2669556..d53afc2 100644 --- a/OSM_Regions/RegionLoader.cs +++ b/OSM_Regions/RegionLoader.cs @@ -63,13 +63,11 @@ public class RegionLoader(float regionSize, string? importFolderPath = null, ILo ulong node2Id = w.NodeIds[i]; if (ret.Nodes.TryGetValue(node1Id, out Graph.Node? node1)) { - //TODO add oneway checks - node1.Neighbors.TryAdd(node2Id, w.ID); + node1.Neighbors.TryAdd(node2Id, new(w.ID, true)); } if (ret.Nodes.TryGetValue(node2Id, out Graph.Node? node2)) { - //TODO add oneway checks - node2.Neighbors.TryAdd(node1Id, w.ID); + node2.Neighbors.TryAdd(node1Id, new(w.ID, false)); } } } @@ -135,6 +133,6 @@ public class RegionLoader(float regionSize, string? importFolderPath = null, ILo public Graph.Graph? LoadRegionFromCoordinates(float lat, float lon) { logger?.LogDebug($"Loading Region for Coordinates {lat} {lon}"); - return LoadRegionFromRegionId(Utils.RegionUtils.GetRegionIdFromCoordinates(lat, lon, regionSize)); + return LoadRegionFromRegionId(Utils.RegionUtils.GetRegionIdFromCoordinates(lat, lon, RegionSize)); } } \ No newline at end of file