Sorted Methods

This commit is contained in:
glax 2023-04-09 16:32:02 +02:00
parent 585a9213ce
commit a54b189b08

View File

@ -37,20 +37,6 @@ namespace Pathfinding
return this._regions.Values.ToArray();
}
public OsmNode? GetNode(Coordinates coordinates)
{
Region? regionWithNode = GetRegion(coordinates);
if (regionWithNode is not null)
return regionWithNode.GetNode(coordinates);
else return null;
}
public OsmNode? GetNode(ulong nodeId, ulong regionId)
{
Region? r = GetRegion(regionId);
return r?.GetNode(nodeId);
}
private Region? RegionFromFile(string filePath)
{
Region? retRegion = null;
@ -68,5 +54,19 @@ namespace Pathfinding
string filePath = Path.Join(workingDirectory, $"{regionId}.region");
return RegionFromFile(filePath);
}
public OsmNode? GetNode(Coordinates coordinates)
{
Region? regionWithNode = GetRegion(coordinates);
if (regionWithNode is not null)
return regionWithNode.GetNode(coordinates);
return null;
}
public OsmNode? GetNode(ulong nodeId, ulong regionId)
{
Region? r = GetRegion(regionId);
return r?.GetNode(nodeId);
}
}
}