OSMServer/OSMImporter/Region.cs

29 lines
778 B
C#
Raw Normal View History

2023-02-02 22:30:43 +01:00
namespace OSMImporter
{
public class Region
{
private readonly Dictionary<ulong, Node> _nodesInRegion = new Dictionary<ulong, Node>();
public ulong regionHash { get; }
public Region(Coordinates regionCoordinates)
{
this.regionHash = regionCoordinates.GetRegionHash();
}
public Region(ulong nodeId, Node firstNode)
{
this.regionHash = firstNode.GetRegionHash();
this._nodesInRegion.Add(nodeId, value: firstNode);
}
public void AddNode(ulong nodeId, Node node)
{
this._nodesInRegion.Add(nodeId, value: node);
}
2023-02-03 00:02:04 +01:00
public Dictionary<ulong, Node> GetNodes()
2023-02-02 22:30:43 +01:00
{
2023-02-03 00:02:04 +01:00
return this._nodesInRegion;
2023-02-02 22:30:43 +01:00
}
}
}