Split into Datastructure, Added ByteConverter, Full Split & Load

This commit is contained in:
2023-02-03 21:13:51 +01:00
parent f31b1b577b
commit 311afcc02f
14 changed files with 332 additions and 187 deletions

View File

@ -0,0 +1,35 @@
namespace OSMDatastructure
{
public class Region
{
private readonly Dictionary<ulong, Node> _nodesInRegion = new();
public ulong regionHash { get; }
public Region(Coordinates regionCoordinates, float regionSize)
{
this.regionHash = regionCoordinates.GetRegionHash(regionSize);
}
public Region(ulong nodeId, Node firstNode, float regionSize)
{
this.regionHash = firstNode.GetRegionHash(regionSize);
this._nodesInRegion.Add(nodeId, value: firstNode);
}
public Region(ulong regionHash)
{
this.regionHash = regionHash;
}
public void AddNode(ulong nodeId, Node node)
{
this._nodesInRegion.Add(nodeId, value: node);
}
public Dictionary<ulong, Node> GetNodes()
{
return this._nodesInRegion;
}
}
}