You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it happens when i use shapely union operation (unary_union()), all of all geoms is_valid is True. But sometime when i use set operation such as result = list(set(geoms_list)) , seems to make random order , the unary_union(result) runs successfully.
Code
importshapelyfromshapely.opsimportunary_uniondeftest_unary_union():
# copy all datas from upload text file to heredatas_string="copy to here"geoms_data= [shapely.wkt.loads(geom_wkt) forgeom_wktindatas_string.split("\t")]
# all geoms are validassertall([geom.is_validforgeomingeoms_data])
# this operation will raise error, i don't know whyunion=unary_union(geoms_data)
# after set operation, the unary_union runs successfully (maybe random the order of geoms, the count of geoms is the same)new_geoms=list(set(geoms_data))
union=unary_union(new_geoms)
Please note
Expected behavior and actual behavior.
Expected unary_union successfully
Steps to reproduce the problem.
it happens when i use shapely union operation (unary_union()), all of all geoms is_valid is True. But sometime when i use set operation such as result = list(set(geoms_list)) , seems to make random order , the unary_union(result) runs successfully.
Code
Data
data.txt
Operating system
Ubuntu 22.04
Shapely version and provenance
2.0.2 with pip install GEOS ersion: 3.11.1
The text was updated successfully, but these errors were encountered: