Split highwayType.cs into multipleFiles and added most common tags
This commit is contained in:
parent
627c1895fa
commit
8c8aadc2e1
@ -6,11 +6,11 @@ namespace OSMDatastructure
|
|||||||
|
|
||||||
public Coordinates endNodeCoordinates { get; }
|
public Coordinates endNodeCoordinates { get; }
|
||||||
|
|
||||||
private readonly Dictionary<tagType, object> _tags = new Dictionary<tagType, object>();
|
private readonly Dictionary<tagType, object> _tags = new();
|
||||||
|
|
||||||
public enum tagType : byte
|
public enum tagType : byte
|
||||||
{
|
{
|
||||||
highway, oneway, footway, sidewalk, cycleway, busway, forward, maxspeed, unknown
|
highway, oneway, footway, sidewalk, cycleway, busway, forward, maxspeed, name, surface, lanes, access, tracktype
|
||||||
}
|
}
|
||||||
|
|
||||||
public Connection(ulong endNodeId, Coordinates endNodeCoordinates)
|
public Connection(ulong endNodeId, Coordinates endNodeCoordinates)
|
||||||
@ -62,12 +62,26 @@ namespace OSMDatastructure
|
|||||||
this._tags.Add(tagType.footway, cwType);
|
this._tags.Add(tagType.footway, cwType);
|
||||||
break;
|
break;
|
||||||
case "busway":
|
case "busway":
|
||||||
if(Enum.TryParse(value, out buswayType bwType))
|
//TODO
|
||||||
this._tags.Add(tagType.footway, bwType);
|
|
||||||
break;
|
break;
|
||||||
case "maxspeed":
|
case "maxspeed":
|
||||||
this._tags.Add(tagType.maxspeed, Convert.ToByte(value));
|
this._tags.Add(tagType.maxspeed, Convert.ToByte(value));
|
||||||
break;
|
break;
|
||||||
|
case "name":
|
||||||
|
//TODO
|
||||||
|
break;
|
||||||
|
case "surface":
|
||||||
|
//TODO
|
||||||
|
break;
|
||||||
|
case "lanes":
|
||||||
|
//TODO
|
||||||
|
break;
|
||||||
|
case "access":
|
||||||
|
//TODO
|
||||||
|
break;
|
||||||
|
case "tracktype":
|
||||||
|
//TODO
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Console.WriteLine("Unknown Tag: {0} Value: {1}", key, value);
|
Console.WriteLine("Unknown Tag: {0} Value: {1}", key, value);
|
||||||
break;
|
break;
|
||||||
@ -94,7 +108,7 @@ namespace OSMDatastructure
|
|||||||
this._tags.Add(tagType.cycleway, (cyclewayType)value);
|
this._tags.Add(tagType.cycleway, (cyclewayType)value);
|
||||||
break;
|
break;
|
||||||
case tagType.busway:
|
case tagType.busway:
|
||||||
this._tags.Add(tagType.busway, (buswayType)value);
|
//TODO
|
||||||
break;
|
break;
|
||||||
case tagType.maxspeed:
|
case tagType.maxspeed:
|
||||||
this._tags.Add(tagType.maxspeed, value);
|
this._tags.Add(tagType.maxspeed, value);
|
||||||
|
13
OSMDatastructure/cyclewayType.cs
Normal file
13
OSMDatastructure/cyclewayType.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
namespace OSMDatastructure;
|
||||||
|
|
||||||
|
public enum cyclewayType : byte
|
||||||
|
{
|
||||||
|
lane,
|
||||||
|
opposite,
|
||||||
|
opposite_lane,
|
||||||
|
track,
|
||||||
|
opposite_track,
|
||||||
|
share_busway,
|
||||||
|
opposite_share_busway,
|
||||||
|
shared_lane
|
||||||
|
}
|
7
OSMDatastructure/footwayType.cs
Normal file
7
OSMDatastructure/footwayType.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace OSMDatastructure;
|
||||||
|
|
||||||
|
public enum footwayType : byte
|
||||||
|
{
|
||||||
|
sidewalk,
|
||||||
|
crossing
|
||||||
|
}
|
@ -33,35 +33,4 @@ namespace OSMDatastructure
|
|||||||
proposed,
|
proposed,
|
||||||
construction
|
construction
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum footwayType : byte
|
|
||||||
{
|
|
||||||
sidewalk,
|
|
||||||
crossing
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum cyclewayType : byte
|
|
||||||
{
|
|
||||||
lane,
|
|
||||||
opposite,
|
|
||||||
opposite_lane,
|
|
||||||
track,
|
|
||||||
opposite_track,
|
|
||||||
share_busway,
|
|
||||||
opposite_share_busway,
|
|
||||||
shared_lane
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum sidewalkSide : byte
|
|
||||||
{
|
|
||||||
both,
|
|
||||||
left,
|
|
||||||
right,
|
|
||||||
no
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum buswayType : byte
|
|
||||||
{
|
|
||||||
lane
|
|
||||||
}
|
|
||||||
}
|
}
|
9
OSMDatastructure/sidewalkSide.cs
Normal file
9
OSMDatastructure/sidewalkSide.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace OSMDatastructure;
|
||||||
|
|
||||||
|
public enum sidewalkSide : byte
|
||||||
|
{
|
||||||
|
both,
|
||||||
|
left,
|
||||||
|
right,
|
||||||
|
no
|
||||||
|
}
|
Reference in New Issue
Block a user