Combining Datastructures and Serialization

//TODO
This commit is contained in:
2023-03-30 18:24:57 +02:00
parent 7560d59c25
commit ac1ac62a00
17 changed files with 90 additions and 1350 deletions

View File

@ -2,20 +2,24 @@ using OSMDatastructure.Graph;
namespace OSMDatastructure;
[Serializable]
public class Region
{
public const float RegionSize = 0.01f;
[NonSerialized]public const float RegionSize = 0.01f;
public readonly HashSet<OsmNode> nodes = new();
public int regionHash { get; }
public ulong regionHash { get; }
public TagManager tagManager { get; }
public Region(int regionHash)
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)