Toolbox for geometry.

create_ellipse[source]

create_ellipse(center, lengths, angle=0)

Create a shapely ellipse. Adapted from https://gis.stackexchange.com/a/243462 center: a tuple with the center x and y coordinates lengths: a tuple with the x and y lengths angle: a rotation angle return: the rotated ellipse

ellipse_intersection_area[source]

ellipse_intersection_area(ellipse1, ellipse2)

Calculates the intersection of two ellipses. Adapted from https://stackoverflow.com/a/48812832 ellipse1: the first shapely ellipse ellipse2: the second shapely ellipse return: the intersection area