Changed Regionhashing and OsmDatastructure with OsmDatastructure.Graph
This commit is contained in:
@ -1,22 +1,24 @@
|
||||
using OSMDatastructure.Graph;
|
||||
|
||||
namespace OSMDatastructure;
|
||||
|
||||
public class Region
|
||||
{
|
||||
public const float regionSize = 0.01f;
|
||||
public const float RegionSize = 0.01f;
|
||||
public readonly HashSet<OsmNode> nodes = new();
|
||||
public ulong regionHash { get; }
|
||||
public int regionHash { get; }
|
||||
|
||||
public Region(ulong regionHash)
|
||||
public Region(int regionHash)
|
||||
{
|
||||
this.regionHash = regionHash;
|
||||
}
|
||||
|
||||
public Region(Coordinates regionCoordinates)
|
||||
public Region(Coordinates coordinates)
|
||||
{
|
||||
this.regionHash = regionCoordinates.GetRegionHash();
|
||||
regionHash = Coordinates.GetRegionHashCode(coordinates);
|
||||
}
|
||||
|
||||
public OsmNode? GetNode(Coordinates coordinates)
|
||||
public OsmNode? GetNodeWithCoordinates(Coordinates coordinates)
|
||||
{
|
||||
foreach(OsmNode node in this.nodes)
|
||||
if (node.coordinates.Equals(coordinates))
|
||||
|
Reference in New Issue
Block a user