libgeos / geos

Geometry Engine, Open Source
https://libgeos.org
GNU Lesser General Public License v2.1
1.1k stars 339 forks source link

AssertionFailedException: found two shells in EdgeRing list #1061

Open hmy930303 opened 2 months ago

hmy930303 commented 2 months ago

hello~ i meet a promble and it raise the AssertionFailedException, but i dont know what happen.

it happens when i use shapely union operation (unary_union()), is_valid of all geoms is True and without repeat. But when i use set operation such as result = list(set(geoms_list)) , seems to make random order , the unary_union(result) runs successfully.

language: Python 3.11 geoms data in the txt geoms_data.txt

theroggy commented 2 months ago

I suppose this is the same case as also posted in https://github.com/shapely/shapely/issues/2029? In that case the same remark from my side applies:

I cannot reproduce the problem using geos 3.12.1, so most likely it has been solved.

You could try with shapely 2.0.3, which includes geos 3.11.3. geos 3.11.3 contains most of the same bugfixes as geos 3.12.1.