Datastructure rewrite
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using OSMDatastructure;
|
||||
using Pathfinding;
|
||||
|
||||
namespace OSMImporter
|
||||
{
|
||||
@@ -59,23 +60,9 @@ namespace OSMImporter
|
||||
return ByteConverter.ToRegion(regionBytes);
|
||||
}
|
||||
|
||||
public Node? GetNode(ulong id)
|
||||
public OsmNode? GetNode(Coordinates coordinates)
|
||||
{
|
||||
foreach (Region region in this._regions.Values)
|
||||
{
|
||||
Node? node = region.GetNode(id);
|
||||
if (node != null)
|
||||
return node;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Node? GetNode(Coordinates coordinates)
|
||||
{
|
||||
Region? regionWithNode = GetRegion(coordinates);
|
||||
if (regionWithNode == null)
|
||||
return null;//TODO null handling
|
||||
Region regionWithNode = GetRegion(coordinates);
|
||||
return regionWithNode.GetNode(coordinates);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user