geopandas.GeoSeries.is_simple

property GeoSeries.is_simple

Returns a Series of dtype('bool') with value True for geometries that do not cross themselves.

This is meaningful only for LineStrings and LinearRings.

Examples

>>> from shapely.geometry import LineString
>>> s = geopandas.GeoSeries(
...     [
...         LineString([(0, 0), (1, 1), (1, -1), (0, 1)]),
...         LineString([(0, 0), (1, 1), (1, -1)]),
...     ]
... )
>>> s
0    LINESTRING (0.00000 0.00000, 1.00000 1.00000, ...
1    LINESTRING (0.00000 0.00000, 1.00000 1.00000, ...
dtype: geometry
>>> s.is_simple
0    False
1     True
dtype: bool