We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bd8d55 commit bcbe430Copy full SHA for bcbe430
libpysal/cg/voronoi.py
@@ -463,6 +463,11 @@ def voronoi_frames(
463
else:
464
polygons = polygons.iloc[ids_polygons].reset_index(drop=True)
465
466
+ # ensure validity as union can occasionally produce invalid polygons that may
467
+ # break the intersection below
468
+ if not polygons.is_valid.all():
469
+ polygons = polygons.make_valid()
470
+
471
# Clip polygons if limit is provided
472
if limit is not None:
473
to_be_clipped = polygons.sindex.query(limit.boundary, "intersects")
0 commit comments