Skip to content

Commit

Permalink
Crash on shapely 2.0a1 in region vectorizer
Browse files Browse the repository at this point in the history
On the way to restoring MacOS support #358
  • Loading branch information
mittagessen committed Sep 28, 2022
1 parent 903d760 commit 10a320e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kraken/lib/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def vectorize_regions(im: np.ndarray, threshold: float = 0.5):
if boundaries.type == 'Polygon':
boundaries = [boundaries.boundary.simplify(10)]
else:
boundaries = [x.boundary.simplify(10) for x in unary_union(boundaries)]
boundaries = [x.boundary.simplify(10) for x in boundaries.geoms]
return [np.array(x.coords, dtype=np.uint)[:, [1, 0]].tolist() for x in boundaries]


Expand Down

0 comments on commit 10a320e

Please sign in to comment.