如何查找 Shapely LineString 是否复杂(即自相交)
How to find if Shapely LineString is complex (i.e. self-intersects)
要么是我遗漏了什么——我在文档中看不到它——要么它不是 Shapely 的内置功能:如何确定 LineString 是否复杂,即自相交?
基础 class class shapely.geometry.base.BaseGeometry
有一个选项 is_simple
,表示
True if the geometry is simple, meaning that any self-intersections
are only at boundary points, else False
http://toblerity.org/shapely/shapely.geometry.html#shapely.geometry.base.BaseGeometry
line = LineString([(0, 0), (1, 1)])
line.is_simple
要么是我遗漏了什么——我在文档中看不到它——要么它不是 Shapely 的内置功能:如何确定 LineString 是否复杂,即自相交?
基础 class class shapely.geometry.base.BaseGeometry
有一个选项 is_simple
,表示
True if the geometry is simple, meaning that any self-intersections are only at boundary points, else False
http://toblerity.org/shapely/shapely.geometry.html#shapely.geometry.base.BaseGeometry
line = LineString([(0, 0), (1, 1)])
line.is_simple