diff --git a/scripts/geodata/osm/formatter.py b/scripts/geodata/osm/formatter.py index 0ad328ac..fbb0db35 100644 --- a/scripts/geodata/osm/formatter.py +++ b/scripts/geodata/osm/formatter.py @@ -1089,19 +1089,22 @@ class OSMAddressFormatter(object): formatted_intersections = [] for (w1, w1_base), (w2, w2_base) in itertools.combinations(way_names, 2): + w1 = self.components.cleaned_name(w1) + w2 = self.components.cleaned_name(w2) + intersection = IntersectionQuery(road1=w1, intersection_phrase=intersection_phrase, road2=w2) formatted = self.formatter.format_intersection(intersection, address_components, country, language, tag_components=tag_components) formatted_intersections.append(formatted) if w1_base and not namespaced_language and random.random() < replace_with_base_name_prob: - w1 = w1_base + w1 = self.components.cleand_name(w1_base) intersection = IntersectionQuery(road1=w1, intersection_phrase=intersection_phrase, road2=w2) formatted = self.formatter.format_intersection(intersection, address_components, country, language, tag_components=tag_components) formatted_intersections.append(formatted) if w2_base and not namespaced_language and random.random() < replace_with_base_name_prob: - w2 = w2_base + w2 = self.components.cleaned_name(w2_base) intersection = IntersectionQuery(road1=w1, intersection_phrase=intersection_phrase, road2=w2) formatted = self.formatter.format_intersection(intersection, address_components, country, language, tag_components=tag_components)