Skip to content

Commit

Permalink
fix: Deprecated shapely cascaded_union()
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieboldianus committed Jan 18, 2022
1 parent 728dcd4 commit 2dfb2a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tagmaps/classes/alpha_shapes.py
Expand Up @@ -14,7 +14,7 @@
from typing import List, Optional
from scipy.spatial import Delaunay # pylint: disable=E0611
import shapely.geometry as geometry
from shapely.ops import cascaded_union, polygonize
from shapely.ops import unary_union, polygonize
from dataclasses import dataclass
from tagmaps.classes.compile_output import Compile
from tagmaps.classes.shared_structure import ItemCounter
Expand Down Expand Up @@ -431,5 +431,5 @@ def add_edge(edges, edge_points, coords, i, j):

mmulti_line_str = geometry.MultiLineString(edge_points)
triangles = list(polygonize(mmulti_line_str))
return cascaded_union(triangles) # , edge_points
return unary_union(triangles) # , edge_points
# return geometry.polygon.asPolygon(edge_points,holes=None)

0 comments on commit 2dfb2a1

Please sign in to comment.