Skip to content

Commit 24f2e72

Browse files
authored
REF: remove usage of deprecated cascaded_union (#685)
1 parent 9612089 commit 24f2e72

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

libpysal/cg/alpha_shapes.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,9 @@ def alpha_shape_auto(
529529
if return_circles:
530530
return_radius = True
531531
if xys.shape[0] < 4:
532-
from shapely import ops
533-
534532
if xys.shape[0] == 3:
535-
multipoint = ops.cascaded_union([geom.Point(xy) for xy in xys])
536-
alpha_shape = multipoint.convex_hull.buffer(0)
533+
multipoint = geom.MultiPoint(xys)
534+
alpha_shape = multipoint.convex_hull
537535
else:
538536
alpha_shape = geom.Polygon([])
539537
if xys.shape[0] == 1:

0 commit comments

Comments
 (0)