Add IsPriorityRoad to Way
This commit is contained in:
parent
a365c155b2
commit
334ff16253
@ -9,6 +9,14 @@ public class Way(ulong id, Dictionary<string, string> tags, List<ulong> nodeIds)
|
||||
public readonly ulong ID = id;
|
||||
public readonly List<ulong> 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))
|
||||
|
Loading…
Reference in New Issue
Block a user