From 5a19316136c4c65dbb30285da74515a9b6ad12d6 Mon Sep 17 00:00:00 2001 From: pilar Date: Wed, 2 Dec 2020 06:23:47 -0500 Subject: [PATCH] solved another bug --- city_model_structure/attributes/surface.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/city_model_structure/attributes/surface.py b/city_model_structure/attributes/surface.py index d672691f..788dec4a 100644 --- a/city_model_structure/attributes/surface.py +++ b/city_model_structure/attributes/surface.py @@ -283,7 +283,11 @@ class Surface: point = polygon_2d.points[i] next_point = polygon_2d.points[i+1] area += (next_point[1] + point[1]) / 2 * (next_point[0] - point[0]) - self._area = area + next_point = polygon_2d.points[0] + point = polygon_2d.points[len(polygon_2d.points)-1] + area += (next_point[1] + point[1]) / 2 * (next_point[0] - point[0]) + self._area = abs(area) + print(self._area) return self._area def _is_almost_same_terrain(self, terrain_points, ground_points):