From 538861a88033b9e0db32869c991504ae7868c214 Mon Sep 17 00:00:00 2001 From: Al Date: Fri, 15 Jul 2016 19:41:07 -0400 Subject: [PATCH] [osm] update properties of a relation with its label's properties --- scripts/geodata/osm/admin_boundaries.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/geodata/osm/admin_boundaries.py b/scripts/geodata/osm/admin_boundaries.py index bca284e1..99e688dd 100644 --- a/scripts/geodata/osm/admin_boundaries.py +++ b/scripts/geodata/osm/admin_boundaries.py @@ -270,6 +270,11 @@ class OSMPolygonReader(object): val['type'] = 'node' val['id'] = long(elem_id) admin_centers.append(val) + elif role == 'label' and elem_type == 'node': + val = nodes.get(long(elem_id)) + if val is not None: + props.update({k: v for k, v in six.iteritems(val) + if k not in props}) admin_center = {} if len(admin_centers) == 1: