OSMServer/OSMDatastructure/Graph/OsmEdge.cs

27 lines
675 B
C#

using System.Text.Json.Serialization;
namespace OSMDatastructure.Graph;
[Serializable]
public class OsmEdge
{
public ulong wayId { get; }
public ulong startId { get; }
public ulong neighborId { get; }
public ulong neighborRegion { get; }
[JsonConstructor]
public OsmEdge(ulong wayId, ulong startId, ulong neighborId, ulong neighborRegion)
{
this.wayId = wayId;
this.startId = startId;
this.neighborId = neighborId;
this.neighborRegion = neighborRegion;
}
public override string ToString()
{
return $"Edge wayId:{wayId} n1:{startId} n2:{neighborId} in regionId:{neighborRegion}";
}
}