Skip to content

Commit

Permalink
filter out boundary relations wihout boundary tag
Browse files Browse the repository at this point in the history
  • Loading branch information
olt committed Nov 6, 2013
1 parent 56fe52f commit 66ea568
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions imposm/mapping.py
Expand Up @@ -261,6 +261,11 @@ def rel_filter(tags):
if tags.get('type') not in ('multipolygon', 'boundary', 'land_area'):
tags.clear()
return
if tags['type'] == 'boundary' and 'boundary' not in tags:
# a lot of the boundary relations are not multipolygon
# only import with boundary tags (e.g. boundary=administrative)
tags.clear()
return
tag_count = len(tags)
_rel_filter(tags)
if len(tags) < tag_count:
Expand Down

0 comments on commit 66ea568

Please sign in to comment.