From 668a96d3c06fbe4bc01ce3e9e2fa267c222ca802 Mon Sep 17 00:00:00 2001 From: Xiyu Oh Date: Thu, 30 May 2024 09:00:42 +0000 Subject: [PATCH] Fix MultiPolygon not iterable Signed-off-by: Xiyu Oh --- rmf_building_map_tools/building_map/floor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmf_building_map_tools/building_map/floor.py b/rmf_building_map_tools/building_map/floor.py index f6cbe71f5..6449e1f0d 100644 --- a/rmf_building_map_tools/building_map/floor.py +++ b/rmf_building_map_tools/building_map/floor.py @@ -133,7 +133,7 @@ def triangulate_polygon(self, polygon, triangles): plt.plot(poly_x, poly_y, 'b', linewidth=4) elif geom.geom_type == 'MultiPolygon': - for poly in list(geom): + for poly in list(geom.geoms): self.triangulate_polygon(poly, triangles) elif geom.geom_type == 'GeometryCollection':