diff --git a/OSMDatastructure/Connection.cs b/OSMDatastructure/Connection.cs index f59b308..717db11 100644 --- a/OSMDatastructure/Connection.cs +++ b/OSMDatastructure/Connection.cs @@ -6,11 +6,11 @@ namespace OSMDatastructure public Coordinates endNodeCoordinates { get; } - private readonly Dictionary _tags = new Dictionary(); + private readonly Dictionary _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); diff --git a/OSMDatastructure/cyclewayType.cs b/OSMDatastructure/cyclewayType.cs new file mode 100644 index 0000000..afff7b9 --- /dev/null +++ b/OSMDatastructure/cyclewayType.cs @@ -0,0 +1,13 @@ +namespace OSMDatastructure; + +public enum cyclewayType : byte +{ + lane, + opposite, + opposite_lane, + track, + opposite_track, + share_busway, + opposite_share_busway, + shared_lane +} \ No newline at end of file diff --git a/OSMDatastructure/footwayType.cs b/OSMDatastructure/footwayType.cs new file mode 100644 index 0000000..b4fef67 --- /dev/null +++ b/OSMDatastructure/footwayType.cs @@ -0,0 +1,7 @@ +namespace OSMDatastructure; + +public enum footwayType : byte +{ + sidewalk, + crossing +} \ No newline at end of file diff --git a/OSMDatastructure/highwayType.cs b/OSMDatastructure/highwayType.cs index 4a51991..89f22f1 100644 --- a/OSMDatastructure/highwayType.cs +++ b/OSMDatastructure/highwayType.cs @@ -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 - } } \ No newline at end of file diff --git a/OSMDatastructure/sidewalkSide.cs b/OSMDatastructure/sidewalkSide.cs new file mode 100644 index 0000000..1efd141 --- /dev/null +++ b/OSMDatastructure/sidewalkSide.cs @@ -0,0 +1,9 @@ +namespace OSMDatastructure; + +public enum sidewalkSide : byte +{ + both, + left, + right, + no +} \ No newline at end of file