diff --git a/OSM_Graph/Way.cs b/OSM_Graph/Way.cs index 773a351..9ebd546 100644 --- a/OSM_Graph/Way.cs +++ b/OSM_Graph/Way.cs @@ -9,6 +9,14 @@ public class Way(ulong id, Dictionary tags, List nodeIds) public readonly ulong ID = id; public readonly List NodeIds = nodeIds; + public bool IsPriorityRoad() + { + string[] priorityValues = ["yes", "designated", "yes_unposted"]; + if (Tags.TryGetValue("priority_road", out string? priorityValue)) + return priorityValues.Contains(priorityValue); + return false; + } + public AccessEnum AccessType() { if (Tags.TryGetValue("access", out string? accessValue) && Enum.TryParse(accessValue, out AccessEnum access))