This code:
import shapely.geometry
x = shapely.geometry.asShape({'coordinates': [[1130.0, 1110.0]], 'type': 'LineString'})
assert x.is_valid
x.wkb
First, is_valid
returns True instead of False and I see this log when calling it:
IllegalArgumentException: point array must contain 0 or >1 elements
Then, when asking for the wkb, my python process crashes which is even worse:
python3.5: geos_ts_c.cpp:5240: unsigned char* GEOSWKBWriter_write_r(GEOSContextHandle_t, geos::io::WKBWriter*, const geos::geom::Geometry*, std::size_t*): Assertion `0 != geom' failed.
Aborted (core dumped)
import shapely.geometry
x = shapely.geometry.asShape({'coordinates': ((1130.0, 1110.0),), 'type': 'LineString'})
assert not x.is_valid
x.wkb
Ubuntu Xenial. python 3.5.2.
1.6.2 from pypi
Thanks for the report @pvalsecc. Looks like it is related to https://github.com/Toblerity/Shapely/issues/509.
Yep, indeed. I'm a bit surprised by how long it's been around, though.
Resolved. The fix will be in 1.6.3.
hi, i try with 1.7.0 and nothing. then return to 1.6.3 and its fixed..... its sad
Most helpful comment
hi, i try with 1.7.0 and nothing. then return to 1.6.3 and its fixed..... its sad