From d062c5654e0a23efe5eea0c91dbc65a5f2ea4751 Mon Sep 17 00:00:00 2001 From: guille Date: Mon, 11 Apr 2022 14:53:22 -0400 Subject: [PATCH] change back city object name as readonly, add new property human_readable_name for building --- city_model_structure/building.py | 9 +++++++++ city_model_structure/city_object.py | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/city_model_structure/building.py b/city_model_structure/building.py index f2ac273b..9c00647d 100644 --- a/city_model_structure/building.py +++ b/city_model_structure/building.py @@ -33,6 +33,7 @@ class Building(CityObject): self._roof_type = None self._internal_zones = None self._shell = None + self._human_readable_name = None self._type = 'building' self._heating = dict() self._cooling = dict() @@ -322,3 +323,11 @@ class Building(CityObject): if usage_zone.thermal_control is not None: return True return False + + @property + def human_readable_name(self): + return self._human_readable_name + + @human_readable_name.setter + def human_readable_name(self, value): + self._human_readable_name = value \ No newline at end of file diff --git a/city_model_structure/city_object.py b/city_model_structure/city_object.py index bea861da..16447583 100644 --- a/city_model_structure/city_object.py +++ b/city_model_structure/city_object.py @@ -45,14 +45,6 @@ class CityObject: """ return self._name - @name.setter - def name(self, value): - """ - Set city object name - :return: str - """ - self._name = value - @property def lod(self) -> int: """