shapely.is_simple
shapely.is_simple#
- is_simple(geometry, **kwargs)#
Returns True if a Geometry has no anomalous geometric points, such as self-intersections or self tangency.
Note that polygons and linearrings are assumed to be simple. Use is_valid to check these kind of geometries for self-intersections.
- Parameters
- geometryGeometry or array_like
This function will return False for geometrycollections.
- **kwargs
For other keyword-only arguments, see the NumPy ufunc docs.
See also
Examples
>>> from shapely import LineString, Polygon >>> is_simple(Polygon([(1, 1), (2, 1), (2, 2), (1, 1)])) True >>> is_simple(LineString([(0, 0), (1, 1), (0, 1), (1, 0), (0, 0)])) False >>> is_simple(None) False