Check for coordinates length
Resolves
@@ -148,6 +148,9 @@ def geos_linestring_from_py(ob, update_geom=None, update_ndim=0):
if m == 0:
return None
+ elif m < 2:
+ raise ValueError(
+ "LineStrings must have at least 2 coordinate tuples")
def _coords(o):
if isinstance(o, Point):
