From 6f6d04966b46db93f725687838b069b72b37f650 Mon Sep 17 00:00:00 2001 From: Al Date: Wed, 21 Oct 2015 16:35:25 -0400 Subject: [PATCH] [fix] role in OSM polygon extraction --- scripts/geodata/osm/extract.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/geodata/osm/extract.py b/scripts/geodata/osm/extract.py index 300f4b1e..9d5e516e 100644 --- a/scripts/geodata/osm/extract.py +++ b/scripts/geodata/osm/extract.py @@ -51,7 +51,8 @@ def parse_osm(filename, allowed_types=ALL_OSM_TAGS, dependencies=False): elif dependencies and item_type == 'way' and e.tag == 'nd': deps.append(long(e.attrib['ref'])) elif dependencies and item_type == 'relation' and e.tag == 'member' and \ - e.attrib.get('type') in ('way', 'relation'): + e.attrib.get('type') in ('way', 'relation') and \ + e.attrib.get('role') in ('inner', 'outer'): deps.append((long(e.attrib['ref']), e.attrib.get('role'))) key = elem_id if single_type else '{}:{}'.format(item_type, elem_id)