Add implied types to IsPriorityRoad

This commit is contained in:
glax 2024-07-29 16:10:02 +02:00
parent 334ff16253
commit ceed833d37

View File

@ -14,6 +14,9 @@ public class Way(ulong id, Dictionary<string, string> tags, List<ulong> nodeIds)
string[] priorityValues = ["yes", "designated", "yes_unposted"];
if (Tags.TryGetValue("priority_road", out string? priorityValue))
return priorityValues.Contains(priorityValue);
HighwayType[] impliedTypes = [HighwayType.motorway, HighwayType.motorway_link, HighwayType.trunk, HighwayType.trunk_link];
if (impliedTypes.Contains(GetHighwayType()))
return true;
return false;
}