From 9aa91cce550a1d51209d27583122e7d88936d95f Mon Sep 17 00:00:00 2001 From: Nathaniel Kelso Date: Mon, 25 Apr 2016 13:12:40 +0100 Subject: [PATCH] add transform for pois to convert capacity to int --- TileStache/Goodies/VecTiles/transform.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TileStache/Goodies/VecTiles/transform.py b/TileStache/Goodies/VecTiles/transform.py index f7fee3f8..4f380cc5 100644 --- a/TileStache/Goodies/VecTiles/transform.py +++ b/TileStache/Goodies/VecTiles/transform.py @@ -304,6 +304,14 @@ def place_population_int(shape, properties, fid, zoom): return shape, properties, fid +def pois_capacity_int(shape, properties, fid, zoom): + pois_capacity_str = properties.pop('capacity', None) + capacity = to_float(pois_capacity_str) + if capacity is not None: + properties['capacity'] = int(capacity) + return shape, properties, fid + + def water_tunnel(shape, properties, fid, zoom): tunnel = properties.pop('tunnel', None) if tunnel in (None, 'no', 'false', '0'):