Update to include direction of connection/edge
This commit is contained in:
parent
a0418a6fae
commit
64bb5259a8
@ -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));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user