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; }
|
||||
|
||||
private readonly Dictionary<tagType, object> _tags = new Dictionary<tagType, object>();
|
||||
private readonly Dictionary<tagType, object> _tags = new();
|
||||
|
||||
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)
|
||||
@ -62,12 +62,26 @@ namespace OSMDatastructure
|
||||
this._tags.Add(tagType.footway, cwType);
|
||||
break;
|
||||
case "busway":
|
||||
if(Enum.TryParse(value, out buswayType bwType))
|
||||
this._tags.Add(tagType.footway, bwType);
|
||||
//TODO
|
||||
break;
|
||||
case "maxspeed":
|
||||
this._tags.Add(tagType.maxspeed, Convert.ToByte(value));
|
||||
break;
|
||||
case "name":
|
||||
//TODO
|
||||
break;
|
||||
case "surface":
|
||||
//TODO
|
||||
break;
|
||||
case "lanes":
|
||||
//TODO
|
||||
break;
|
||||
case "access":
|
||||
//TODO
|
||||
break;
|
||||
case "tracktype":
|
||||
//TODO
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("Unknown Tag: {0} Value: {1}", key, value);
|
||||
break;
|
||||
@ -94,7 +108,7 @@ namespace OSMDatastructure
|
||||
this._tags.Add(tagType.cycleway, (cyclewayType)value);
|
||||
break;
|
||||
case tagType.busway:
|
||||
this._tags.Add(tagType.busway, (buswayType)value);
|
||||
//TODO
|
||||
break;
|
||||
case tagType.maxspeed:
|
||||
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,
|
||||
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
|
||||
}
|
Loading…
Reference in New Issue
Block a user