Open theroggy opened 2 months ago
In the mean time GEOS 3.12.2 became available via conda, and the error is still the same.
I encountered a remark somewhere that voronoi creation can fail if there are points too close to each other.
So, when I first apply shapely.remove_repeated_points (=GEOSRemoveRepeatedPoints) with tolerance 1e-6 the error is gone.
Possibly a clearer error could be thrown to point the user in that direction?
For a specific polygon, when using the shapely function
voronoi_polygons
withonly_edges=True
on it, this leads to the following error: "IllegalArgumentException: point array must contain 0 or >1 elements".This function basically only calls GEOSVoronoiDiagram_r with flag
GEOS_VORONOI_ONLY_EDGES
.Tested using shapely 2.0.4 and GEOS 3.12.1 and GEOS 3.12.2.
The input polygon looks like this, so it is not super complicated (128 points):
Python script to reproduce, including the polygon as wkt:
reference to original issue: https://github.com/pygeoops/pygeoops/issues/95