Skip to content

Commit

Permalink
removed union_all to maintain compatibility with shapely 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SPDonaghy committed Sep 26, 2024
1 parent dce9ad2 commit 38f8ef4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/local_pathfinding/local_pathfinding/obstacles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 38f8ef4

Please sign in to comment.