Skip to content

Commit 508ec5e

Browse files
luca-della-vedovaxiyuoharjo129Yadunund
authored
Cherry-pick Shapely 1.8.0 deprecations (#496, #476) (#515)
* Fix MultiPolygon not iterable (#496) Signed-off-by: Xiyu Oh <[email protected]> Signed-off-by: Luca Della Vedova <[email protected]> * Handle geometry collections (#476) I was trying a clean build of RMF Demos and ran into a type error when trying to compile maps. This PR fixes the type error. I'm not sure what triggered it in the first place TBH. Signed-off-by: Arjo Chakravarty <[email protected]> Co-authored-by: Yadunund <[email protected]> Signed-off-by: Luca Della Vedova <[email protected]> --------- Signed-off-by: Xiyu Oh <[email protected]> Signed-off-by: Luca Della Vedova <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]> Co-authored-by: Xiyu <[email protected]> Co-authored-by: Arjo Chakravarty <[email protected]> Co-authored-by: Yadunund <[email protected]>
1 parent 9fc8d4b commit 508ec5e

File tree

1 file changed

+2
-2
lines changed
  • rmf_building_map_tools/building_map

1 file changed

+2
-2
lines changed

rmf_building_map_tools/building_map/floor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ def triangulate_polygon(self, polygon, triangles):
133133
plt.plot(poly_x, poly_y, 'b', linewidth=4)
134134

135135
elif geom.geom_type == 'MultiPolygon':
136-
for poly in list(geom):
136+
for poly in list(geom.geoms):
137137
self.triangulate_polygon(poly, triangles)
138138

139139
elif geom.geom_type == 'GeometryCollection':
140140
# this can happen if the original triangulation needed
141141
# to be clipped to lie within the original floor polygon
142142
# for example, if a long triangle crossed a concave region
143143
# and you end up with >=1 polygons and >=1 points or edges.
144-
for item in geom:
144+
for item in geom.geoms:
145145
if item.geom_type == 'Polygon':
146146
self.triangulate_polygon(item, triangles)
147147

0 commit comments

Comments
 (0)