is_segment_intersecting_polygon#
- static GeometryOperators.is_segment_intersecting_polygon(a: list, b: list, polygon: list) bool#
Determine if a segment defined by two points
aandbintersects a polygon.Points on the vertices and on the polygon boundaries are not considered intersecting.
- Parameters:
- a
List First point of the segment. List of
[x, y]coordinates.- b
List Second point of the segment. List of
[x, y]coordinates.- polygon
List [[x1, x2, …, xn],[y1, y2, …, yn]]
- a
- Returns:
floatTrueif the segment intersect the polygon.Falseotherwise.