OSMServer/OSMDatastructure/OsmEdge.cs

27 lines
659 B
C#
Raw Normal View History

using System.Text.Json.Serialization;
namespace OSMDatastructure.Graph;
2023-02-06 17:32:55 +01:00
[Serializable]
public class OsmEdge
2023-02-06 17:32:55 +01:00
{
public ulong wayId { get; }
public ulong startId { get; }
public ulong neighborId { get; }
public ulong neighborRegion { get; }
2023-02-06 17:32:55 +01:00
2023-02-07 23:52:57 +01:00
[JsonConstructor]
public OsmEdge(ulong wayId, ulong startId, ulong neighborId, ulong neighborRegion)
2023-02-06 17:32:55 +01:00
{
this.wayId = wayId;
this.startId = startId;
this.neighborId = neighborId;
this.neighborRegion = neighborRegion;
}
public override string ToString()
{
2023-04-01 14:21:11 +02:00
return $"w:{wayId} n1:{startId} n2:{neighborId} in r:{neighborRegion}";
}
2023-02-06 17:32:55 +01:00
}