From b3cad9379e417ad2283f2024a1b1f7041a38f801 Mon Sep 17 00:00:00 2001 From: doorleyr Date: Tue, 2 Jun 2020 20:47:16 +0100 Subject: [PATCH] Compatibility with city_IO updates --- indicator_tools.py | 2 +- toolbox.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/indicator_tools.py b/indicator_tools.py index 4411cbe..3acf00c 100644 --- a/indicator_tools.py +++ b/indicator_tools.py @@ -691,7 +691,7 @@ def load_patent_data(self,pop_th=100000): def flatten_grid_cell_attributes(type_def, height, attribute_name, area_per_floor, return_units='capacity'): if isinstance(height, list): - height=height[1] + height=height[-1] grid_cell_total={} if type_def[attribute_name] is not None: if 'sqm_pperson' in type_def: diff --git a/toolbox.py b/toolbox.py index 1c6d684..b027983 100644 --- a/toolbox.py +++ b/toolbox.py @@ -658,6 +658,8 @@ def assign_geogrid_props(self, handler): ''' geogrid_props = handler.geogrid_props self.types_def = geogrid_props['types'] + if 'static_types' in geogrid_props: + self.types_def.update(geogrid_props['static_types']) self.geogrid_header = geogrid_props['header'] def restructure(self,geogrid_data):