-
Notifications
You must be signed in to change notification settings - Fork 611
from_wkt and from_wkb crash on MULTISURFACE input #2159
Copy link
Copy link
Closed
Labels
Description
GEOS 3.13 introduced basic support for CURVE/SURFACE geometries, mainly to be able to parse them from WKB and WKT. However, shapely.from_wkt and shapely.from_wkb seem to crash on this type of input.
Noticed in a crashing test in pyogrio: geopandas/pyogrio#478
Testing GEOS directly using geosop doesn't seem to trigger the problem (see issue above)?
I've had a quick look at the shapely code and don't immediately see where it can go wrong specifically on the curve types... but I'm not very familiar with the code, so probably missed something.
I also wonder what is going to happen if other shapely functions are going to be called on these geometries... but that's to be seen after this is solved :-)
Script to reproduce:
import shapely
wkt = "MULTISURFACE (CURVEPOLYGON ((-95.29698763468994 63.36578165250125, -94.5991423640996 53.06992070409323, -73.7073995758013 60.149472648492385, -95.29698763468994 63.36578165250125)))"
print(shapely.from_wkt(wkt))
print("here")Reactions are currently unavailable