From ff27ee14bb309f391033600b634d1630c94a7f26 Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 16 Oct 2016 22:18:52 -0400 Subject: [PATCH] [osm] only add label props if the name property is identical (counterexample, Nottinghamshire's label is listed as West Bridgford, which is really its admin_center) --- scripts/geodata/osm/admin_boundaries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/geodata/osm/admin_boundaries.py b/scripts/geodata/osm/admin_boundaries.py index 02a1d307..0c783df5 100644 --- a/scripts/geodata/osm/admin_boundaries.py +++ b/scripts/geodata/osm/admin_boundaries.py @@ -277,7 +277,7 @@ class OSMPolygonReader(object): admin_centers.append(val) elif role == 'label' and elem_type == 'node': val = self.nodes.get(long(elem_id)) - if val is not None: + if val is not None and val.get('name', six.u('')).lower() == props.get('name', six.u('')).lower(): props.update({k: v for k, v in six.iteritems(val) if k not in props})