diff --git a/hub/catalog_factories/data_models/cost/archetype.py b/hub/catalog_factories/data_models/cost/archetype.py index cf24c6ee..97cabe1a 100644 --- a/hub/catalog_factories/data_models/cost/archetype.py +++ b/hub/catalog_factories/data_models/cost/archetype.py @@ -38,7 +38,7 @@ class Archetype: Get name :return: string """ - return f'{self._country}_{self._municipality}_{self._function}_{self._lod}' + return f'{self._country}_{self._municipality}_{self._function}_lod{self._lod}' @property def lod(self): diff --git a/hub/helpers/geometry_helper.py b/hub/helpers/geometry_helper.py index b4e20351..e9b9a6d9 100644 --- a/hub/helpers/geometry_helper.py +++ b/hub/helpers/geometry_helper.py @@ -100,9 +100,9 @@ class GeometryHelper: j = 0 next_coordinate = ground.perimeter_polygon.coordinates[j] distance = GeometryHelper.distance_between_points(coordinate, next_coordinate) - if distance == 0: - continue steps = int(distance * factor * 2) + if steps == 0: + continue delta_x = (next_coordinate[0] - coordinate[0]) / steps delta_y = (next_coordinate[1] - coordinate[1]) / steps diff --git a/hub/imports/geometry/geojson.py b/hub/imports/geometry/geojson.py index 4fd9d340..92086b22 100644 --- a/hub/imports/geometry/geojson.py +++ b/hub/imports/geometry/geojson.py @@ -173,8 +173,6 @@ class Geojson: GeometryHelper.distance_between_points(neighbour_line[0], neighbour_line[1]) - GeometryHelper.distance_between_points(line[1], neighbour_line[0]) - GeometryHelper.distance_between_points(line[0], neighbour_line[1])) / 2 - print(line_shared) - print() percentage_ground = line_shared / GeometryHelper.distance_between_points(line[0], line[1]) percentage_height = neighbour_height / building.max_height if percentage_height > 1: