is_segment_intersecting_polygon#

static GeometryOperators.is_segment_intersecting_polygon(a, b, polygon)[source]#

Determine if a segment defined by two points a and b intersects a polygon. Points on the vertices and on the polygon boundaries are not considered intersecting.

aList

First point of the segment. List of [x, y] coordinates.

bList

Second point of the segment. List of [x, y] coordinates.

polygonList

[[x1, x2, …, xn],[y1, y2, …, yn]]

Returns:
float

True if the segment intersect the polygon. False otherwise.