diff --git a/city_model_structure/polyhedron.py b/city_model_structure/polyhedron.py index ac34007f..0749b7e3 100644 --- a/city_model_structure/polyhedron.py +++ b/city_model_structure/polyhedron.py @@ -67,7 +67,6 @@ class Polyhedron: for point in points: face.append(self._position_of(point)) self._faces.append(face) - #self._faces = np.asarray(self._faces) return self._faces @property diff --git a/city_model_structure/surface.py b/city_model_structure/surface.py index 2c9dcf29..b0edeb5d 100644 --- a/city_model_structure/surface.py +++ b/city_model_structure/surface.py @@ -381,7 +381,9 @@ class Surface: if self._is_projected: return self if self._projected_surface is None: - self._projected_surface = self._polygon_to_surface(self.shapely) + shapely = self.shapely + if shapely is not None: + self._projected_surface = self._polygon_to_surface(shapely) return self._projected_surface def intersect(self, surface) -> Union[Surface, None]: diff --git a/geometry/geometry_feeders/city_gml.py b/geometry/geometry_feeders/city_gml.py index a98f71ea..c782b8f7 100644 --- a/geometry/geometry_feeders/city_gml.py +++ b/geometry/geometry_feeders/city_gml.py @@ -135,7 +135,6 @@ class CityGml: ground = ground and self._geometry.almost_equal(row, ground_point) if ground: ground_points = self._geometry.to_points_matrix(ground_points) - # Do i need to remove the duplicated? terrains.append(ground_points) return surfaces diff --git a/helpers/geometry_helper.py b/helpers/geometry_helper.py index d27162ed..513baedf 100644 --- a/helpers/geometry_helper.py +++ b/helpers/geometry_helper.py @@ -20,7 +20,8 @@ class GeometryHelper: def __init__(self, delta=0.5): self._delta = delta - def adjacent_locations(self, location1, location2): + @staticmethod + def adjacent_locations(location1, location2): """ Determine when two buildings may be adjacent or not based in the dis :param location1: