OSMServer/OsmXmlToRegionConverter/TmpWay.cs

31 lines
922 B
C#
Raw Normal View History

2023-03-30 16:29:42 +02:00
namespace OsmXmlToRegionConverter;
public class TmpWay
{
public ulong id { get; }
public ulong[] wayNodeIds { get; }
public HashSet<Tag> tags { get; }
public TmpWay(ulong id, ulong[] wayNodeIds, HashSet<Tag> tags)
{
this.id = id;
this.wayNodeIds = wayNodeIds;
this.tags = tags;
}
public static TmpWay FromBytes(byte[] bytes)
{
2023-03-30 16:30:50 +02:00
throw new NotImplementedException();/*
2023-03-30 16:29:42 +02:00
using (MemoryStream m = new MemoryStream(bytes)) {
using (BinaryReader r = new BinaryReader(m))
{
int wayNodeIdsLength = r.ReadInt32();
ulong id = r.ReadUInt64();
ulong[] wayNodeIds = new ulong[wayNodeIdsLength];
for (int i = 0; i < wayNodeIds.Length; i++)
wayNodeIds[i] = r.ReadUInt64();
return new TmpWay(id, wayNodeIds);
}
2023-03-30 16:30:50 +02:00
}*/
2023-03-30 16:29:42 +02:00
}
}