From 75dd90e02e47eca8925ec5ab02a10ba063df62fd Mon Sep 17 00:00:00 2001 From: Alexey Zakharenkov Date: Sat, 29 Aug 2020 11:01:13 +0300 Subject: [PATCH] Disallow railway=station tag on relations other than multipolygons, in particular on stop_areas --- subway_structure.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subway_structure.py b/subway_structure.py index a91758a..c59cfd0 100644 --- a/subway_structure.py +++ b/subway_structure.py @@ -1119,6 +1119,11 @@ class City: processed_stop_areas = set() for el in self.elements.values(): if Station.is_station(el, self.modes): + # See PR https://github.com/mapsme/subways/pull/98 + if el['type'] == 'relation' and el['tags'].get('type') != 'multipolygon': + self.error("A railway station cannot be a relation of type '{}'".format( + el['tags'].get('type')), el) + continue st = Station(el, self) self.station_ids.add(st.id) if st.id in self.stop_areas: