From 38f8ef45e771216f022997dce7524fefbbd5d286 Mon Sep 17 00:00:00 2001 From: Sean Donaghy Date: Thu, 26 Sep 2024 16:25:30 -0700 Subject: [PATCH] removed union_all to maintain compatibility with shapely 1.8.0 --- src/local_pathfinding/local_pathfinding/obstacles.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/local_pathfinding/local_pathfinding/obstacles.py b/src/local_pathfinding/local_pathfinding/obstacles.py index f9a8886d3..9c5aff9ee 100644 --- a/src/local_pathfinding/local_pathfinding/obstacles.py +++ b/src/local_pathfinding/local_pathfinding/obstacles.py @@ -5,7 +5,6 @@ import numpy as np from custom_interfaces.msg import HelperAISShip, HelperLatLon -from shapely import union_all from shapely.affinity import affine_transform from shapely.geometry import MultiPolygon, Point, Polygon, box @@ -144,8 +143,7 @@ def _update_land_collision_zone( """ if land_multi_polygon is not None: # for testing - # to remove overlaps between polygons - self.collision_zone = union_all(land_multi_polygon) + self.collision_zone = land_multi_polygon return if bbox is None: @@ -163,7 +161,7 @@ def _update_land_collision_zone( xy_polygons = Land._latlon_polygons_to_xy_polygons([latlon_polygons], self.reference) - collision_zone = union_all(MultiPolygon(xy_polygons)) + collision_zone = MultiPolygon(xy_polygons) if collision_zone.geom_type == "MultiPolygon": self.collision_zone = collision_zone