Skip to content

Bug: TypeError with MultiPolygon object after installing latest Shapely #1

@MechaBear7

Description

@MechaBear7

Bug: TypeError with MultiPolygon object after installing latest Shapely

Description
I recently installed the latest version of the shapely package and encountered a TypeError when running my script. It seems that a MultiPolygon object is being treated as an iterable, which is not supported, leading to the following traceback.

Traceback

Traceback (most recent call last):
  File "/home/mechabear7/ros1_catkin_ws/src/polygon_mapping/src/read_dataset.py", line 349, in <module>
    main()
  File "/home/mechabear7/ros1_catkin_ws/src/polygon_mapping/src/read_dataset.py", line 323, in main
    map_manager.add_polygon_list(new_polygon_list)
  File "/home/mechabear7/ros1_catkin_ws/src/polygon_mapping/src/modules/mapmanager.py", line 136, in add_polygon_list
    z_distance = abs(self.compute_average_z_distance(new_polygon, existing_polygon))
  File "/home/mechabear7/ros1_catkin_ws/src/polygon_mapping/src/modules/mapmanager.py", line 204, in compute_average_z_distance
    for sub_poly in intersected_points:
TypeError: 'MultiPolygon' object is not iterable

Question
Could you please provide a requirements.txt file or a list of the specific package versions used for the Python environment where this code is known to run correctly? This would be very helpful for me to reproduce the correct environment and resolve this issue.

Thank you for your time and assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions