From 8dee3f8c939ed184dc18f363e9025fba060a5bea Mon Sep 17 00:00:00 2001 From: Matt Amos Date: Fri, 2 Oct 2015 16:47:36 +0100 Subject: [PATCH] Set kind to `aboriginal_lands` for first nations state boundaries. --- TileStache/Goodies/VecTiles/transform.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/TileStache/Goodies/VecTiles/transform.py b/TileStache/Goodies/VecTiles/transform.py index 1dcbe713..7fd2b9d7 100644 --- a/TileStache/Goodies/VecTiles/transform.py +++ b/TileStache/Goodies/VecTiles/transform.py @@ -368,6 +368,15 @@ def boundary_kind(shape, properties, fid, zoom): kind = properties.get('kind') if kind: return shape, properties, fid + + # if the boundary is tagged as being that of a first nations + # state then skip the rest of the kind logic, regardless of + # the admin_level (see mapzen/vector-datasource#284). + boundary_type = properties.get('boundary_type') + if boundary_type == 'aboriginal_lands': + properties['kind'] = 'aboriginal_lands' + return shape, properties, fid + admin_level_str = properties.get('admin_level') if admin_level_str is None: return shape, properties, fid @@ -381,6 +390,13 @@ def boundary_kind(shape, properties, fid, zoom): return shape, properties, fid +def boundary_trim_properties(shape, properties, fid, zoom): + properties = _remove_properties( + properties, + 'boundary_type') + return shape, properties, fid + + def tags_create_dict(shape, properties, fid, zoom): tags_hstore = properties.get('tags') if tags_hstore: