using OSMDatastructure.Graph; namespace OSMDatastructure; [Serializable] public class Region { [NonSerialized]public const float RegionSize = 0.01f; public readonly HashSet nodes = new(); public ulong regionHash { get; } public TagManager tagManager { get; } public Region(ulong regionHash) { this.regionHash = regionHash; tagManager = new TagManager(); } public Region(Coordinates coordinates) { regionHash = Coordinates.GetRegionHashCode(coordinates); tagManager = new TagManager(); } public OsmNode? GetNodeWithCoordinates(Coordinates coordinates) { foreach(OsmNode node in this.nodes) if (node.coordinates.Equals(coordinates)) return node; return null; } }