[fix] include admin center id and type
This commit is contained in:
@@ -267,6 +267,7 @@ class OSMPolygonReader(object):
|
||||
elif role == 'admin_centre' and elem_type == 'node':
|
||||
val = self.nodes.get(long(elem_id))
|
||||
if val is not None:
|
||||
val['type'] = 'node'
|
||||
val['id'] = long(elem_id)
|
||||
admin_centers.append(val)
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ class OSMReverseGeocoder(RTreePolygonIndex):
|
||||
|
||||
if admin_center:
|
||||
props['admin_center'] = {k: v for k, v in six.iteritems(admin_center)
|
||||
if k in cls.include_property_patterns or (six.u(':') in k and
|
||||
if k in ('id', 'type') or k in cls.include_property_patterns or (six.u(':') in k and
|
||||
six.u('{}:*').format(k.split(six.u(':'), 1)[0]) in cls.include_property_patterns)}
|
||||
|
||||
if inner_polys and not outer_polys:
|
||||
|
||||
Reference in New Issue
Block a user