From ceed833d3795d9f50ceff19cb03d16771a8e813a Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 29 Jul 2024 16:10:02 +0200 Subject: [PATCH] Add implied types to IsPriorityRoad --- OSM_Graph/Way.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OSM_Graph/Way.cs b/OSM_Graph/Way.cs index 9ebd546..d7ec575 100644 --- a/OSM_Graph/Way.cs +++ b/OSM_Graph/Way.cs @@ -14,6 +14,9 @@ public class Way(ulong id, Dictionary tags, List 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; }