Renamed OsmWay -> OsmEdge again
Prevented duplicate writes of Tags for way
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
namespace OSMDatastructure.Graph;
|
||||
|
||||
[Serializable]
|
||||
public class OsmWay
|
||||
public class OsmEdge
|
||||
{
|
||||
public ulong wayId { get; }
|
||||
public ulong startId { get; }
|
||||
@ -9,7 +9,7 @@ public class OsmWay
|
||||
public ulong neighborRegion { get; }
|
||||
|
||||
|
||||
public OsmWay(ulong wayId, ulong startId, ulong neighborId, ulong neighborRegion)
|
||||
public OsmEdge(ulong wayId, ulong startId, ulong neighborId, ulong neighborRegion)
|
||||
{
|
||||
this.wayId = wayId;
|
||||
this.startId = startId;
|
@ -4,7 +4,7 @@ namespace OSMDatastructure.Graph;
|
||||
public class OsmNode
|
||||
{
|
||||
public ulong nodeId { get; }
|
||||
public HashSet<OsmWay> edges { get; }
|
||||
public HashSet<OsmEdge> edges { get; }
|
||||
public Coordinates coordinates { get; }
|
||||
|
||||
[NonSerialized]public OsmNode? previousPathNode = null;
|
||||
@ -26,9 +26,9 @@ public class OsmNode
|
||||
this.coordinates = coordinates;
|
||||
}
|
||||
|
||||
public OsmWay? GetEdgeToNode(OsmNode n)
|
||||
public OsmEdge? GetEdgeToNode(OsmNode n)
|
||||
{
|
||||
foreach (OsmWay e in this.edges)
|
||||
foreach (OsmEdge e in this.edges)
|
||||
if (e.neighborId == n.nodeId)
|
||||
return e;
|
||||
return null;
|
||||
|
@ -7,7 +7,7 @@ public class Region
|
||||
{
|
||||
[NonSerialized]public const float RegionSize = 0.1f;
|
||||
public readonly HashSet<OsmNode> nodes = new();
|
||||
public readonly HashSet<OsmWay> ways = new();
|
||||
public readonly HashSet<OsmEdge> ways = new();
|
||||
public ulong regionHash { get; }
|
||||
public TagManager tagManager { get; }
|
||||
|
||||
|
Reference in New Issue
Block a user