geopandas.GeoSeries.is_simple#
- property GeoSeries.is_simple[source]#
Returns a
Series
ofdtype('bool')
with valueTrue
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 0, 1 1, 1 -1, 0 1) 1 LINESTRING (0 0, 1 1, 1 -1) dtype: geometry
>>> s.is_simple 0 False 1 True dtype: bool