geopandas.GeoSeries.is_simple#
- property GeoSeries.is_simple#
返回一个
Series
的dtype('bool')
有价值的True
对于本身不相交的几何图形。这仅对以下情况有意义 LineStrings 和 LinearRings 。
示例
>>> 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